using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Threading;namespace gzcj{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } int djs = 0; private void pictureBox1_Click(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { label1.BackColor = Color.Transparent; label1.Parent = pictureBox1; label2.BackColor = Color.Transparent; label2.Parent = pictureBox1; } private void textBox4_TextChanged(object sender, EventArgs e) { if (textBoxxygz2.Text.Equals(textBoxxygz1)) { textBoxxygz2.Text = huojianghao(textBox1.Text).ToString(); } } private void label8_Click(object sender, EventArgs e) { } private void timer1_Tick(object sender, EventArgs e) { string hj2, hj3, hj4, hj5; if (djs == 0) { djs = int.Parse(textBox2.Text); } djs = djs - 1; labeldjs.Text = "倒计时:" djs.ToString(); if (textBox3.Text == "1") { textBoxxygz1.Text = huojianghao(textBox1.Text).ToString(); Thread.Sleep(100); textBoxxygz2.Text = huojianghao(textBox1.Text).ToString();} if (textBox3.Text == "2") { textBoxxygz3.Text = huojianghao(textBox1.Text).ToString(); Thread.Sleep(100); textBoxxygz4.Text = huojianghao(textBox1.Text).ToString(); } if (textBox3.Text == "3") { textBoxxygz5.Text = huojianghao(textBox1.Text).ToString(); Thread.Sleep(100); textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } if (djs == 0) { timer1.Enabled = false; axWindowsMediaPlayer1.Ctlcontrols.stop(); textBox3.Text = (int.Parse(textBox3.Text) 1).ToString(); } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; labeldjs.Text = "倒计时:" textBox2.Text; axWindowsMediaPlayer1.URL = "D:\\bj.mp3"; axWindowsMediaPlayer1.Ctlcontrols.play();//播放文件 } private int huojianghao(string s) { int hm = 0; Random rd = new Random();//随机种子 hm = rd.Next(1, (int.Parse(s))); return hm; } private void button2_Click(object sender, EventArgs e) { textBox3.Text = "1"; textBoxxygz1.Text = ""; textBoxxygz2.Text = ""; textBoxxygz3.Text = ""; textBoxxygz4.Text = ""; textBoxxygz5.Text = ""; textBoxxygz6.Text = ""; } private void textBoxxygz3_TextChanged(object sender, EventArgs e) { if (textBoxxygz3.Text.Equals(textBoxxygz1)) { textBoxxygz3.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz3.Text.Equals(textBoxxygz2)) { textBoxxygz3.Text = huojianghao(textBox1.Text).ToString(); } } private void textBoxxygz4_TextChanged(object sender, EventArgs e) { if (textBoxxygz4.Text.Equals(textBoxxygz1)) { textBoxxygz4.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz4.Text.Equals(textBoxxygz2)) { textBoxxygz4.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz4.Text.Equals(textBoxxygz3)) { textBoxxygz4.Text = huojianghao(textBox1.Text).ToString(); } } private void textBoxxygz5_TextChanged(object sender, EventArgs e) { if (textBoxxygz5.Text.Equals(textBoxxygz1)) { textBoxxygz5.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz5.Text.Equals(textBoxxygz2)) { textBoxxygz5.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz5.Text.Equals(textBoxxygz3)) { textBoxxygz5.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz5.Text.Equals(textBoxxygz4)) { textBoxxygz5.Text = huojianghao(textBox1.Text).ToString(); } } private void textBoxxygz6_TextChanged(object sender, EventArgs e) { if (textBoxxygz6.Text.Equals(textBoxxygz1)) { textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz6.Text.Equals(textBoxxygz2)) { textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz6.Text.Equals(textBoxxygz3)) { textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz6.Text.Equals(textBoxxygz4)) { textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } if (textBoxxygz6.Text.Equals(textBoxxygz5)) { textBoxxygz6.Text = huojianghao(textBox1.Text).ToString(); } } private void button3_Click(object sender, EventArgs e) { FileDialog open = new OpenFileDialog(); //wxWindowsMediaplayer1是控件名 this.axWindowsMediaPlayer1.settings.playCount = 2;//播放次数; open.Filter = "*.mp3|*.mp3"; open.Title = "打开文件"; if (open.ShowDialog() == DialogResult.OK) { axWindowsMediaPlayer1.URL = open.FileName; axWindowsMediaPlayer1.Ctlcontrols.play();//播放文件 } } }}
下载迎春年会抽奖示例源码用户还喜欢
- 18480 文章数
- 500万+ 热度
作者专栏
编辑推荐
- 淡抹u2引擎,修复内容较多,物有所值
- 界域传说·经典巨作=传世单机(一键安装)
- 丸子版本(175个传世版本大集合)
- GS版本:神话公益服务端+客户端
- 图片放大工具(放大图片不模糊)
- 剪映无限制VIP版
- 传奇世界客户端下载器,史上最全传世客户端
- 传世GS20220920商业引擎注册+登录配置器 解压密码是1
- U2官方排行榜游戏网关 支持元神,支持传家宝
- GS开战传世客户端+服务端
- (淡漠夕阳)u2引擎合区工具
- 传世GS引擎消除“你的游戏客户端版本号过旧,请及时更新”提示
- 传世一机多区双线路配置器--免密码版本
- 传世凤凰登陆器劫持修复软件
- SQLite3 for Navicat
- 传奇世界npc对话框编辑工具
- 传世GS落霞铭文服务器端
- gs_20210409引擎包+注册机(无限制)
- 传奇世界NPC对话封包查看器[支持时长版和极速版]
- 彩虹引擎传世脚本编辑工具1.7版来了,支持函数脚本翻译
评论