C#??е???????
???????????? ???????[ 2014/8/15 10:50:43 ] ????????C# ??? .NET
??????????????????
?????????????2??betton????? 2??label?????????????
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 threadtest
{
public partial class Form1 : Form
{
int i;
private Thread thread1;//???????
delegate void set_Text(string s);//???????
set_Text Set_Text; //???????
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender?? EventArgs e)
{
label1.Text = "0";
label2.Text = "0";
Set_Text = new set_Text(set_lableText); //?????
}
private void button1_Click(object sender?? EventArgs e)
{
thread1 = new Thread(new ThreadStart(run));
thread1.Start();
}
private void run()
{
for (int i = 0; i < 101; i++)
{
label1.Invoke(Set_Text?? new object[] { i.ToString() }); //?????????У??????lable1???
Thread.Sleep(1000); //????????????λ??ms
}
}
private void set_lableText(string s)
{
label1.Text = s;
}
private void timer1_Tick(object sender?? EventArgs e)
{
i++;
if (i > 100)
{
timer1.Stop();
}
label2.Text = i.ToString();
}
private void Form1_FormClosing(object sender?? FormClosingEventArgs e)
{
if (thread1.IsAlive) //?ж?thread1???????????????????????????????????????
{
thread1.Abort(); //????thread1
}
}
private void button2_Click(object sender?? EventArgs e)
{
timer1.Start();
}
}
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細(xì)??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????