Esempio n. 1
0
        private static void Completed(IAsyncResult result)
        {
            AsyncResult _result = (AsyncResult)result;
            ShowWaitFormEventHandler showHandler = (ShowWaitFormEventHandler)_result.AsyncDelegate;

            try { showHandler.EndInvoke(result); } catch { }
            WaitFormService.Close();
        }
Esempio n. 2
0
 public static void CreateForm()
 {
     waitForm = new WaitForm();
     waitForm.Show();
     for (int i = 0; i < 10000; i++)
     {
         if (!Cancle())
         {
             waitForm.Invoke((Action)(delegate
             {
                 WaitFormService.SetText("正在执行 ,请耐心等待...." + i.ToString());
             }));
             Application.DoEvents();
         }
         else
         {
             break;
         }
     }
 }