예제 #1
0
 internal void ClearText(ListBox lista)
 {
     if (lista.InvokeRequired)
     {
         ClearTextCallBack f = new ClearTextCallBack(ClearText);
         lista.Invoke(f, new object[] { lista });
     }
     else
     {
         lista.Items.Clear();
     }
 }
예제 #2
0
 private void SetScrollListBox(ListBox _lista)
 {
     if (_lista.InvokeRequired)
     {
         ClearTextCallBack s = new ClearTextCallBack(SetScrollListBox);
         _lista.Invoke(s, new object[] { _lista });
     }
     else
     {
         _lista.TopIndex = _lista.Items.Count - 1;
     }
 }
예제 #3
0
 public static void ClearTextByAsync(this RichTextBox rtBox)
 {
     try
     {
         if (rtBox.IsDisposed)
         {
             return;
         }
         if (rtBox.InvokeRequired)
         {
             ClearTextCallBack stcb = new ClearTextCallBack(ClearTextColorfull);
             rtBox.Invoke(stcb, new object[] { rtBox });
         }
         else
         {
             rtBox.Clear();
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.StackTrace);
     }
 }