示例#1
0
 public void ShowBlocking(Rectangle rectangle, Color color, int durationInMs)
 {
     _dispatcher.Invoke(() =>
     {
         var win = new OverlayRectangleWindow(rectangle, color, durationInMs);
         win.ShowDialog();
     });
 }
示例#2
0
 public void Show(Rectangle rectangle, Color color, int durationInMs)
 {
     if (rectangle.IsValid)
     {
         _dispatcher.Invoke(() =>
         {
             var win = new OverlayRectangleWindow(rectangle, color, durationInMs);
             win.Show();
         });
     }
 }
示例#3
0
 public void ShowBlocking(Rectangle rectangle, Color color, int durationInMs)
 {
     if (rectangle.IsValid)
     {
         _dispatcher.Invoke(new Action(() =>
         {
             _currWin?.Close();
             var win = new OverlayRectangleWindow(rectangle, color, durationInMs);
             win.ShowDialog();
             _currWin = win;
         }));
     }
 }
 public void ShowBlocking(Rectangle rectangle, Color color, int durationInMs)
 {
     if (!rectangle.IsEmpty)
     {
         // ReSharper disable once RedundantDelegateCreation Used for older .Net versions
         _dispatcher.Invoke(new Action(() =>
         {
             _currWin?.Close();
             var win = new OverlayRectangleWindow(rectangle, color, durationInMs);
             win.ShowDialog();
             _currWin = win;
         }));
     }
 }