コード例 #1
0
 public static void ShowBlocking(Rect rectangle, Color color, TimeSpan duration)
 {
     Show(() =>
     {
         window?.Close();
         window = new OverlayRectangleWindow(rectangle, color, duration);
         window.ShowDialog();
     });
 }
コード例 #2
0
        private void TimerTick(object sender, EventArgs e)
        {
            var timer = (DispatcherTimer)sender;

            timer.Tick -= this.TimerTick;
            timer.Stop();
            this.Close();
            window = null;
        }