Exemplo n.º 1
0
 private void BtnSearch_Click(object sender, EventArgs e)
 {
     threadmethod += ReportBinding;
     using (WaitForm waitfrm = new WaitForm(() => { /*Thread.Sleep(2000);*/ dtpDate.Invoke(threadmethod); }))
     {
         waitfrm.ShowDialog(this);
     }
 }
Exemplo n.º 2
0
 public ThreadTask(threadAction mainAction)
 {
     myAction = () => {
         try
         {
             result = (T)(mainAction?.DynamicInvoke() ?? default(T));
             threadFinishedSuccessfully = true;
         }
         catch (Exception ex)
         {
             threadException = ex;
         }
     };
 }