Example #1
0
        private static CurtainPrompt InternalCreate(string msg, Action action, double milliseconds, Color color)
        {
            _current?.Dismiss();

            var curtain = new CurtainPrompt(color, msg, action, color == Colors.DarkRed)
            {
                _millisecondsToHide = milliseconds
            };

            _current = curtain;
            return(curtain);
        }
Example #2
0
 public void Dismiss()
 {
     try
     {
         if (_popup != null)
             _popup.IsOpen = false;
         if (_timer != null)
         {
             _timer.Stop();
             _timer = null;
         }
         _popup = null;
         _current = null;
     }
     catch
     {
         // ignored
     }
 }
Example #3
0
 public void Dismiss()
 {
     try
     {
         if (_popup != null)
         {
             _popup.IsOpen = false;
         }
         if (_timer != null)
         {
             _timer.Stop();
             _timer = null;
         }
         _popup   = null;
         _current = null;
     }
     catch
     {
         // ignored
     }
 }
Example #4
0
        private static CurtainPrompt InternalCreate(string msg, Action action, double milliseconds, Color color)
        {
            _current?.Dismiss();

            var curtain = new CurtainPrompt(color, msg, action, color == Colors.DarkRed)
            {
                _millisecondsToHide = milliseconds
            };

            _current = curtain;
            return curtain;
        }