Ejemplo n.º 1
0
 /// <summary>
 /// Sets the text for the specified control in multithreading circumstances.
 /// </summary>
 /// <param name="control"></param>
 /// <param name="text"></param>
 public static void SetControlVisible(Control control, bool val)
 {
     if (control != null)
     {
         if (control.InvokeRequired)
         {
             SetControlVisibleSafe2 scts = new SetControlVisibleSafe2(SetControlVisible);
             control.Invoke(scts, new Object[] { control, val });
         }
         else
         {
             control.Visible = val;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the text for the specified control in multithreading circumstances.
 /// </summary>
 /// <param name="control"></param>
 /// <param name="text"></param>
 public static void SetControlVisible(Control control,  bool val)
 {
     if (control != null)
         {
             if (control.InvokeRequired)
             {
                 SetControlVisibleSafe2 scts = new SetControlVisibleSafe2(SetControlVisible);
                 control.Invoke(scts, new Object[] { control, val });
             }
             else
             {
                 control.Visible = val;
             }
         }
 }