Ejemplo n.º 1
0
 public void ShowBlocking(Rectangle rectangle, Color color, int durationInMs)
 {
     _dispatcher.Invoke(() =>
     {
         var win = new OverlayRectangleWindow(rectangle, color, durationInMs);
         win.ShowDialog();
     });
 }
Ejemplo n.º 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();
         });
     }
 }
Ejemplo n.º 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;
         }));
     }
 }