예제 #1
0
 private void videosCleared(object sender, EventArgs e)
 {
     WindowUtil.Invoke(() =>
     {
         gridVideo.Children.Clear();
     });
 }
예제 #2
0
 private void monitor()
 {
     try
     {
         while (true)
         {
             Thread.Sleep(1000);
             if (_safeStop)
             {
                 break;
             }
             WindowUtil.Invoke(new Action(monitorProcess));
         }
     }
     catch (ThreadAbortException)
     {
         //不处理异常。
     }
     catch (NullReferenceException)
     {
         //在应用程序关闭时的异常。
     }
 }
예제 #3
0
 void setPane(object pane)
 {
     WindowUtil.Invoke(() => { _contentControl.Content = pane; });
 }