日期:2014-05-17 浏览次数:20830 次
class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
run();
}
public void run()
{
for (int i = 0; i < 1500; i++)
{
writer wrt = new writer(i.ToString());
Thread th = new Thread(new ParameterizedThreadStart(wrt.Startwrite));
th.Start(this);
}
}
public void SetRichTextBoxText(string str)
{
this.BeginInvoke(new Action(delegate() { this.richTextBox1.Text += str; }));
}
}
class writer
{
string aline;
public writer(string str)
&nb