资源简介
简单的九宫格抽奖系统,入门级,winform系统,高手勿喷……
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LuckDraw
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// private readonly string connString = ConfigurationSettings.AppSettings[“CenterConnectionString“].ToString();
private void button10_Click(object sender EventArgs e)
{
this.button10.Enabled = false;
foreach (Control ctl in Controls)
{
if (ctl is Button && ctl.Name != “button10“)
{
ctl.BackColor = Color.NavajoWhite;
}
}
List arrStr = new List() {
“宜宾燃面“ “鱼面“ “蔬菜面“ “邓毛肚“ “浅草肆“ “蜀大侠“ “蜀九香“ “谭鸭血“ “大山鱼房“ “耗儿鱼“ “冒菜“ “红戈小馆“ “九尺鸭肠王“
};
List arrStrLuck = new List();
Random rm = new Random();
for (int i = 0; i < 8; i++)
{
int m = rm.Next(arrStr.Count);
arrStrLuck.Add(arrStr[m]);
arrStr.Remove(arrStr[m]);
}
this.button1.Text = arrStrLuck[0];
this.button2.Text = arrStrLuck[1];
this.button3.Text = arrStrLuck[2];
this.button4.Text = arrStrLuck[3];
this.button5.Text = arrStrLuck[4];
this.button6.Text = arrStrLuck[5];
this.button7.Text = arrStrLuck[6];
this.button8.Text = arrStrLuck[7];
//this.button9.Text = arrStrLuck[8];
int luckMan = rm.Next(arrStrLuck.Count);
string theMan = arrStrLuck[luckMan];
Task.Run(() =>
{
for (int i = 0; i < 7; i++)
{
for (int j = 1; j < 9; j++)
{
foreach (Control ctl in Controls)
{
if (ctl is Button && ctl.Name.Contains(j.ToString()) && ctl.Name != “button10“)
{
ctl.BackColor = Color.Red;
Thread.Sleep(i*i*10);
ctl.BackColor = Color.NavajoWhite;
continue;
}
}
}
}
for (int j = 1; j < 9; j++)
{
foreach (Control ctl in Controls)
{
if (ctl is Button && ctl.Name.Contains(j.ToString()) && ctl.Name != “button10“)
{
ctl.BackColor = Colo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 54272 2019-01-17 15:32 LuckDraw\.vs\LuckDraw\v15\.suo
文件 589824 2019-01-17 15:30 LuckDraw\.vs\LuckDraw\v15\sqlite3\storage.ide
文件 471 2019-01-17 15:12 LuckDraw\LuckDraw\App.config
文件 13312 2019-01-17 15:21 LuckDraw\LuckDraw\bin\Debug\LuckDraw.exe
文件 471 2019-01-17 15:12 LuckDraw\LuckDraw\bin\Debug\LuckDraw.exe.config
文件 24064 2019-01-17 15:21 LuckDraw\LuckDraw\bin\Debug\LuckDraw.pdb
文件 11776 2019-01-17 15:30 LuckDraw\LuckDraw\bin\Release\LuckDraw.exe
文件 471 2019-01-17 15:12 LuckDraw\LuckDraw\bin\Release\LuckDraw.exe.config
文件 22016 2019-01-17 15:30 LuckDraw\LuckDraw\bin\Release\LuckDraw.pdb
文件 4147 2019-01-17 15:32 LuckDraw\LuckDraw\Form1.cs
文件 7612 2019-01-17 15:28 LuckDraw\LuckDraw\Form1.Designer.cs
文件 5817 2019-01-17 15:28 LuckDraw\LuckDraw\Form1.resx
文件 3565 2019-01-17 15:20 LuckDraw\LuckDraw\LuckDraw.csproj
文件 868 2019-01-17 15:12 LuckDraw\LuckDraw\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7244 2019-01-17 15:14 LuckDraw\LuckDraw\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 42 2019-01-17 15:14 LuckDraw\LuckDraw\obj\Debug\LuckDraw.csproj.CoreCompileInputs.cache
文件 1854 2019-01-17 15:21 LuckDraw\LuckDraw\obj\Debug\LuckDraw.csproj.FileListAbsolute.txt
文件 1012 2019-01-17 15:20 LuckDraw\LuckDraw\obj\Debug\LuckDraw.csproj.GenerateResource.Cache
文件 2384 2019-01-17 15:12 LuckDraw\LuckDraw\obj\Debug\LuckDraw.csprojResolveAssemblyReference.cache
文件 13312 2019-01-17 15:21 LuckDraw\LuckDraw\obj\Debug\LuckDraw.exe
文件 1721 2019-01-17 15:20 LuckDraw\LuckDraw\obj\Debug\LuckDraw.Form1.resources
文件 24064 2019-01-17 15:21 LuckDraw\LuckDraw\obj\Debug\LuckDraw.pdb
文件 180 2019-01-17 15:20 LuckDraw\LuckDraw\obj\Debug\LuckDraw.Properties.Resources.resources
文件 0 2019-01-17 15:12 LuckDraw\LuckDraw\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2019-01-17 15:12 LuckDraw\LuckDraw\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2019-01-17 15:12 LuckDraw\LuckDraw\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
文件 3584 2019-01-17 15:14 LuckDraw\LuckDraw\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 7248 2019-01-17 15:24 LuckDraw\LuckDraw\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache
文件 42 2019-01-17 15:24 LuckDraw\LuckDraw\obj\Release\LuckDraw.csproj.CoreCompileInputs.cache
文件 891 2019-01-17 15:24 LuckDraw\LuckDraw\obj\Release\LuckDraw.csproj.FileListAbsolute.txt
............此处省略34个文件信息
相关资源
- WeifenLuo.WinFormsUI.Docking3.1.0
- ASP.NET Zero Core v8.1.0 (2019-12-20)
- EDSDK-13.11.0.rar
- C# 定时任务
- WinForm员工综合管理系统 v1.0.zip
- NModbus_net-3.5_1.11.0.0-source
- 协会管理系统V1.0 源代码
- asp.net 1.0论坛源码
- Microsoft.ReportViewer 11.0.0 dll
- FOCAS_API_DEMO_VS2015_C#_FORM_V1.0.rar
- rfid windows mobile6.5 仓库管理源码v1.0
- 美萍超市管理系统源码C#V1.0
- 最新版 Best HTTP v1.11.0.unitypackage
- System.Web.Mvc.dll 1.0-5.0各种版本
- MySkin V1.0
- TeeChartNET2010VSNET2010Eval_4.0.2011.02087完全
- sqlite-netFx40-setup-bundle-x86-2010-1.0.97.0.
- C#基于MVC+EasyUI+ECharts后台管理系统完整
- 微耕官方SDK 2017.11.02最新版本
- C#基于MVC+EasyUI+ECharts后台管理系统完整
- DotNetBar for WPF 7.1.0.14 破解版
- Professional C# 6 and .NET Core 1.0.pdf
- FastReport .NET V2016.1.0 最新破解版
- EurekaLog_7.5.1.0_Enterprise_for_Delphi_10.3_F
- B20_08_NNCase编译MobileNet_v1_1.0即tflite量化
- CefSharp.WinForms 支援MP4 Cef 71.0.1.0
- WinForm简单IE浏览器 1.0.zip
- 大学内部软件系统 v1.0.rar
- Microsoft.Office.Interop.Word.dll11.0.0.0
- C#高级编程(第10版)C# 6 .NET Core 1.0
评论
共有 条评论