示例#1
0
文件: Main.cs 项目: civicacid/myevo
 /// <summary>
 ///   Updates the text.
 /// </summary>
 /// <param name = "lab">The lab.</param>
 /// <param name = "text">The text.</param>
 public void UpdateText(ButtonX lab, string text)
 {
     if (lab.InvokeRequired)
     {
         lab.Invoke(
             new MethodInvoker(
                 delegate { UpdateText(lab, text); }));
     }
     else
     {
         lab.Text = text;
     }
 }
示例#2
0
文件: Main.cs 项目: civicacid/myevo
 public void EnableButton(ButtonX button)
 {
     if (button.InvokeRequired)
     {
         button.Invoke(
             new MethodInvoker(
                 delegate { EnableButton(button); }));
     }
     else
     {
         button.Enabled = true;
     }
 }