示例#1
0
 public static string GetText(Control control)
 {
     if (control.InvokeRequired)
     {
         GetTextCallBack d = new GetTextCallBack(GetText);
         return control.Invoke(d, new object[] { control }) as string;
     }
     else
     {
         return control.Text;
     }
 }
示例#2
0
 public static string GetText(Control control)
 {
     if (control.InvokeRequired)
     {
         GetTextCallBack d = new GetTextCallBack(GetText);
         return(control.Invoke(d, new object[] { control }) as string);
     }
     else
     {
         return(control.Text);
     }
 }