微信小程序,用自己的服务器,代码放在哪里

微信小程序,用自己的服务器,代码放在哪里,第1张

程序代码分为前端和后端。

前端代码:需要用“微信开发者工具”上传至微信官方审核就可以了;

后端代码:代码目录一般放在>

微信小程序可以添加闹钟代码。

整个闹钟项目的代码分为3部分,分别是:闹钟主页、闹钟记录、闹钟设置;

A 闹钟主页的功能有点类似番茄闹钟,它由一个倒计时工具构成,只要客户点击按钮,就会开始倒计时;

B 闹钟记录主要记录了客户每次的点击 *** 作,有点类似日志;

C 闹钟设置可以自定义设置一些参数,包括设置工作时长、休息时长、背景音乐、背景。

using System;

using SystemCollectionsGeneric;

using SystemComponentModel;

using SystemData;

using SystemDrawing;

using SystemText;

using SystemWindowsForms;

using SystemCollections;

namespace RIF

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

public class Arr

{

public int[,] arr = new int[25, 25];

public bool win;

}

Arr a = new Arr();

bool cc = true;

public void PaintLab()

{

Bitmap image = new Bitmap(300,300);

Graphics g = GraphicsFromImage(image);

gClear(ColorTan);

Pen pen = new Pen(ColorBlack, 1);

int i, j;

i = j = 0;

while (i <= 300)

{

gDrawLine(pen, i, 0, i, 300);

i = i + 20;

}

while (j <= 300)

{

gDrawLine(pen, 0, j, 300, j);

j = j + 20;

}

imgImage = image;

}

private void Form1_Load(object sender, EventArgs e)

{

PaintLab();

}

private void img_MouseClick(object sender, MouseEventArgs e)

{

if (eButton == MouseButtonsLeft)

{

int x = eX;

int y = eY;

Graphics g = GraphicsFromImage(imgImage);

Brush pen;

int myx = x / 20;

int myy = y / 20;

if (aarr[myx, myy] != 0)

{

MessageBoxShow("这里已经有棋子了!");

return;

}

else

{

if (cc)

{

pen = new SolidBrush(ColorWhite);

cc = false;

aarr[myx, myy] = 1;

}

else

{

pen = new SolidBrush(ColorBlack);

cc = true;

aarr[myx, myy] = 2;

}

gFillEllipse(pen, myx 20 + 2, myy 20 + 2, 16, 16);

imgInvalidate();

int z = IsWin(myx, myy, cc);

if (z != 0)

{

if (z == 1)

{

MessageBoxShow("白色获胜!");

}

else

{

MessageBoxShow("黑色获胜!");

}

imgEnabled = false;

}

}

}

else

{

MessageBoxShow("本程序由Cantahu开发","作者信息",MessageBoxButtonsOK,MessageBoxIconInformation);

}

}

private int IsWin(int x, int y,bool cc)

{

int m, n, count, p, q;

int val = 0;

bool win=false;

if (cc)

{

val = 2;

}

else

{

val = 1;

}

#region 横向判断

count = 1;

int f = 0;

m = x-1;

n = x+1;

while (1==1)

{

if (count == 5)

{

win = true;

break;

}

else if (f == 5)

{

win = false;

break;

}

if (m >= 0 && n <= 300)

{

if (aarr[m, y] == val)

{

count = count + 1;

m = m - 1;

}

if (aarr[n, y] == val)

{

count = count + 1;

n = n + 1;

}

}

f = f + 1;

}

if (win)

{

return val;

}

#endregion

#region 纵向判断

m = y - 1;

n = y + 1;

f = 0;

count = 1;

while (1 == 1)

{

if (count == 5)

{

win = true;

break;

}

if (f == 5)

{

win = false;

break;

}

if (m >= 0 && n <= 300)

{

if(aarr[x,m]==val)

{

count = count + 1;

m = m - 1;

}

if(aarr[x,n]==val)

{

count = count + 1;

n = n + 1;

}

}

f = f + 1;

}

if (win)

{

return val;

}

#endregion

#region 左斜向判断

count = 1;

f = 0;

m = x - 1;

n = y - 1;

p = x + 1;

q = y + 1;

while (1 == 1)

{

if (count == 5)

{

win = true;

break;

}

if (f == 5)

{

win = false;

break;

}

if (m >= 0 && n >= 0 && p <= 300 && q <= 300)

{

if (aarr[m, n] == val)

{

count = count + 1;

m = m - 1;

n = n - 1;

}

if (aarr[p, q] == val)

{

count = count + 1;

p = p + 1;

q = q + 1;

}

}

f = f + 1;

}

if (win)

{

return val;

}

#endregion

#region 右斜向

count = 1;

f = 0;

m = x - 1;

n = y + 1;

p = x + 1;

q = y - 1;

while (1 == 1)

{

if (count == 5)

{

win = true;

break;

}

if (f == 5)

{

win = false;

break;

}

if (m >= 0 && n <= 300 && p <= 300 && q >= 0)

{

if (aarr[m, n] == val)

{

count = count + 1;

m = m - 1;

n = n + 1;

}

if (aarr[p, q] == val)

{

count = count + 1;

p = p + 1;

q = q - 1;

}

}

f = f + 1;

}

if (win)

{

return val;

}

#endregion

return 0;

}

private void Btnstart_Click(object sender, EventArgs e)

{

imgEnabled = true;

PaintLab();

}

private void btnClose_Click(object sender, EventArgs e)

{

thisClose();

}

}

}

这是我自己写的 五子棋代码 希望对你有帮助

题主是否想问身份z微信小程序代码是什么意思身份z微信小程序代码是实名认证的功能。根据查询相关公开信息显示,身份z微信小程序代码是指一种可以通过微信扫描身份z进行实名认证的功能,通常由开发者编写的一段代码实现。这种代码可以嵌入在微信小程序中,方便用户进行身份验证,从而保障用户的信息安全和隐私。具体来说,当用户在微信小程序中需要进行身份验证时,可以使用微信小程序内置的扫码功能扫描身份z上的二维码,将扫描到的信息传递给小程序后台进行认证。

以上就是关于微信小程序,用自己的服务器,代码放在哪里全部的内容,包括:微信小程序,用自己的服务器,代码放在哪里、新地铁跑酷小程序用什么代码、微信小程序添加闹钟代码等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/9310583.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-27
下一篇2023-04-27

发表评论

登录后才能评论

评论列表(0条)

    保存