using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading; namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
Control.CheckForIllegalCrossThreadCalls = false;
}
bool a;
public void playGame()
{
Random rd = new Random(); while (a)
{
this.label1.Text = rd.Next(0, 10).ToString();
this.label2.Text = rd.Next(0, 10).ToString();
this.label3.Text = rd.Next(0, 10).ToString();
} } private void button1_Click(object sender, EventArgs e)
{
if (!a)
{
a=true;
this.button1.Text = "暂停";
Thread th = new Thread(playGame);
th.IsBackground = true;
th.Start();
}
else { this.button1.Text = "开始";
a = false;
}
}
}
}

  

最新文章

  1. pointers on c (day 1,chapter3)
  2. centos 6.5重置Root密码
  3. The Managed Metadata Service or Connection is currently not available 分类: Sharepoint 2015-07-09 13:28 5人阅读 评论(0) 收藏
  4. php大力力 [050节] 兄弟连高洛峰 PHP教程 2014年[数据库、PDO教程]
  5. 贪心/字符串处理 Codeforces Round #291 (Div. 2) A. Chewbaсca and Number
  6. linux中的优先搜索树的实现--prio_tree【转】
  7. 配置 ASP.NET Linux( CentOS 6.5 ) 运行环境 MONO + Jexus
  8. ASP.NET Web API 2 对 CORS 的支持
  9. asp.net数据库操作类(一)
  10. ASP.NET - 对URL传递的值进行编码Server.UrlEncode()
  11. Django中的许可(Permissions)和用户组(Group)
  12. [.NET] 《Effective C#》快速笔记 - C# 中的动态编程
  13. mysql 在B数据库下 创建一个与A数据库中一样的表
  14. Linux记录~持续更新~
  15. Python-JSON和pickle
  16. SB!SB!SB!
  17. MonkeyRunner_手机触摸屏幕坐标获取
  18. mysql数据库----索引原理与慢查询优化
  19. 查看本地mysql安装路径
  20. 浅谈Storm流式处理框架

热门文章

  1. 【IOS】2.基础
  2. .NET C#: NameValueCollection
  3. C++之路进阶——bzoj3172(单词)
  4. linux第9天 UDP
  5. /Users/alamps/AndroidStudioProjects/Demo10ScrollView
  6. php操作oracle的方法类集全
  7. html5新增全局属性
  8. 夺命雷公狗—angularjs—18—angularjs的事件
  9. linux下奇怪的“重名”文件
  10. 【py分析】使用SGMLParser分析淘宝html