コード例 #1
0
ファイル: FullRestyler.cs プロジェクト: seanofw/joy
 private void RunOnWinFormsThread(Action action)
 {
     if (ShouldCancel)
     {
         return;
     }
     try
     {
         _owner.BeginInvoke((Action)(() => action())).AsyncWaitHandle.WaitOne();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("Warning: Dispatch to WinForms thread failed: " + e.Message);
     }
 }