【230907更新】原创“”抽奖工具“”,午饭选择神器,上课点名神器

【230907更新】原创“”抽奖工具“”,午饭选择神器,上课点名神器

【230907更新】原创“”抽奖工具“”,午饭选择神器,上课点名神器

2023-9-6更新内容如下:
1.增加背景设置
2.支持是否重复中奖
3.奖品及奖品数量设置
4.是否批量抽取

下载地址:

https://wwsp.lanzouw.com/b01rd2sjg

密码:32a5

使用范围很广泛,列如公司活动抽奖,学校上课点名,中午吃什么抽选,去哪儿旅行抽选

名单可以通过excel批量导入,也可以对中奖名单进行导出

C# NET4.8开发,win7可能要装NET环境,win10可直接运行,核心逻辑是产生随机数,找出对应列表随机数的名单,逻辑如下:

 private List<string> participants = new List<string>() ;
private Random random = new Random();
 private Timer timer;
private void initTimer()
        {
            timer = new Timer();
            timer.Interval = 1; // Set interval to 100ms for example.
            timer.Tick += (s, e) =>
            {
                int index = random.Next(participants.Count);
                xingming.Text = participants[index];
            };
        }
        private void uiButton2_Click(object sender, EventArgs e)
        {
            if (!timer.Enabled)
            {
                timer.Start();
                uiButton2.Text = "暂停";
                xingming.ForeColor = Color.Black;
            }
            else
            {
                timer.Stop();
                uiButton2.Text = "开始";
                xingming.ForeColor = Color.Green;
                if (xingming.Text != "等待开始")
                {
                    dgv.Rows.Add(xingming.Text + (checkBox1.Checked ? uiComboBox1.Text : ""));
                }
            }
        }
© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 共49条

请登录后发表评论