예제 #1
0
 public void BeginInvoke(AsyncDelegate del)
 {
     ControllerMainAction mainAction = new SimpleDefaultMainAction(this, del);
     try
     {
         if (!View.IsHandleCreated)
         {
             return;
         }
         View.BeginInvoke(new AsyncDelegate(mainAction.run), null);
     }
     catch (ObjectDisposedException)
     {
         //happens because there is no synchronization between the lifecycle of a form and callbacks of background threads.
         //catch silently
     }
 }
예제 #2
0
 public void Invoke(AsyncDelegate del, bool wait)
 {
     ControllerMainAction mainAction = new SimpleDefaultMainAction(this, del);
     invoke(mainAction, wait);
 }