Esempio n. 1
0
 public void AddListBoxItem(object item)
 {
     if (this.InvokeRequired)
     {
         AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem);
         this.Invoke(callback, new object[] { item });
     }
     else
     {
         this.listBox1.Items.Add(item);
     }
 }
Esempio n. 2
0
 public void AddListBoxItem(ListBox listBox, string item)
 {
     if (listBox.InvokeRequired)
     {
         AddListBoxItemCallback de = new AddListBoxItemCallback(DoAddListBoxItem);
         listBox.Invoke(de, new object[] { listBox, item });
     }
     else
     {
         DoAddListBoxItem(listBox, item);
     }
 }
Esempio n. 3
0
 public void AddListBoxItem(string item)
 {
     if (this.InvokeRequired)
     {
         AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem);
         this.Invoke(callback, new string[] { item });
     }
     else
     {
         this.lbKeywordList.Items.Add(item);
         alertList.Add(item);
     }
 }
Esempio n. 4
0
 public void AddListBoxItem(string item, string to)
 {
     if (this.InvokeRequired)
     {
         AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem);
         this.Invoke(callback, new string[] { item });
     }
     else
     {
         if (to == "Name")
         {
             this.lb_Byname.Items.Add(item);
         }
         if (to == "App")
         {
             this.lb_Byapp.Items.Add(item);
         }
         //alertList.Add(item);
     }
 }
Esempio n. 5
0
 public FormAsyncChat()
 {
     InitializeComponent();
     listBoxCallback = new AddListBoxItemCallback(AddListBoxItem);
 }