Пример #1
0
 public void getpMainFrame(Action job) // set the gui console to enabled depending on some conditions
 {
     try
     {
         if (this.rtbConsole.InvokeRequired)
         {
             dgetpMainFrame d = new dgetpMainFrame(getpMainFrame);
             this.Invoke(d, new object[] { job });
         }
         else
         {
             job();
         }
     }
     catch (Exception e) { };
 }
Пример #2
0
 public void getScreen(Action job) // set the gui console to enabled depending on some conditions
 {
     try
     {
         if (this.dataGridView1.InvokeRequired)
         {
             dgetpMainFrame d = new dgetpMainFrame(getScreen);
             this.Invoke(d, new object[] { job });
         }
         else
         {
             job();
         }
     }
     catch { };
 }