示例#1
0
 public void writing2(Label l, string a)
 {
     if (l.InvokeRequired)
     {
         TextDegisDelegate del = new TextDegisDelegate(writing);
         l.Invoke(del, new object[] { a });
     }
     else
     {
         l.Text = a;
     }
 }
示例#2
0
 public void writing(string a)
 {
     if (listBox1.InvokeRequired)
     {
         TextDegisDelegate del = new TextDegisDelegate(writing);
         listBox1.Invoke(del, new object[] { a });
     }
     else
     {
         listBox1.Items.Add(a);
     }
 }