Example #1
0
 override protected void OnStop()
 {
     if (mainForm != null && !mainForm.IsDisposed)
     {
         mainForm.Invoke(new Action(() => {
             if (!mainForm.IsDisposed)
             {
                 System.Windows.Forms.Application.ExitThread();
             }
         }));
     }
     mainThread.Join();
 }
Example #2
0
 public void Stop()
 {
     if (mainForm != null)
     {
         mainForm.Invoke(new Action(() => {
             System.Windows.Forms.Application.ExitThread();
         }));
     }
     mainThread.Join();
 }