private void SetControlText(Control control, string text)
 {
     try
     {
         if (control.InvokeRequired == true)
         {
             SetControlTextHandler set = new SetControlTextHandler(SetControlText);
             control.Invoke(set, new object[] { control, text });
         }
         else
         {
             control.Text = text;
         }
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }
Пример #2
0
 private void SetControlText(Control control, string text)
 {
     try
     {
         if (control.InvokeRequired == true)
         {
             SetControlTextHandler set = new SetControlTextHandler(SetControlText);
             control.Invoke(set, new object[] { control, text });
         }
         else
         {
             control.Text = text;
         }
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }