1.vb.net 多次滚动抽奖的奖源奖源程序代码
vb.net 多次滚动抽奖的程序代码
我用多线程写的,你可以参考下。码抽魔术网站源码系统界面图如下:(注:重置功能为清除已经中奖号码,代码兼职招聘平台源码回归1-都可以中奖状态。奖源奖源sar 布林源码)
代码:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
System.Threading.Thread g_Thread = null;
List<int> g_list = new List<int>();
int g_Num = 0;
delegate void g_delegate();
/// <summary>
/// 开始
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender,码抽面试熟悉flink源码 EventArgs e)
{
if(g_list.Count==)
{
MessageBox.Show("所有数字已使用,请重置!代码均线平行源码");
return;
}
button3.Enabled = true;
Random r = new Random();
g_delegate dele= ChangeTxt;
g_Thread = new System.Threading.Thread(() =>
{
while(this.IsDisposed==false)
{
g_Num = r.Next(1,奖源奖源 );
if(g_list.Contains(g_Num))
{
g_Num = 1;
}
while(g_list.Contains(g_Num))
{
g_Num++;
}
this.Invoke(dele);
System.Threading.Thread.Sleep();
}
});
g_Thread.Start();
}
void ChangeTxt()
{
label2.Text = g_Num.ToString();
}
/// <summary>
/// 停止
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button3_Click(object sender, EventArgs e)
{
//if(g_Thread.ThreadState==System.Threading.ThreadState.Running)
{
g_Thread.Abort();
g_list.Add(Convert.ToInt(label2.Text));
}
button3.Enabled = false;
}
/// <summary>
/// 重置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
g_list.Clear();
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
System.Environment.Exit(0);
}
}
2024-11-29 20:262694人浏览
2024-11-29 20:182539人浏览
2024-11-29 18:492220人浏览
2024-11-29 18:402260人浏览
2024-11-29 18:311974人浏览
2024-11-29 18:172401人浏览
1.10分钟快速精通rollup.js——Vue.js源码打包原理深度分析2.封装Vue组件库的方法3.Vue源码一)—— new vue()4.Vue3核心源码解析 (一) : 源码目录结构5.Vu
1.cci指标公式源码2.什么是指标源码3.指标源码有什么用4.指标源码是什么5.expma指标公式源码cci指标公式源码 CCI指标的公式源码为:CCI指标公式源码: CCI = ÷ 基准
1.applewatch表盘怎么安装2.ANT+技术简介applewatch表盘怎么安装 目前有三种办法可以安装第三方表盘: 1、使用“静静表盘”,它内置表盘商店,有大量第三方表盘,可以直接在