예제 #1
0
 public void Dismiss()
 {
     try
     {
         if (_popup != null)
             _popup.IsOpen = false;
         if (_timer != null)
         {
             _timer.Stop();
             _timer = null;
         }
         _popup = null;
         _current = null;
     }
     catch
     {
     }
 }
예제 #2
0
        public static CurtainPrompt Show(Action action, TimeSpan duration, string msg, params object[] args)
        {
            if (args != null)
            {
                msg = string.Format(msg, args);
            }

            if (_current != null)
            {
                _current.Dismiss();
            }

            var curtain = new CurtainPrompt(Colors.DarkGreen, msg, action)
            {
                _millisecondsToHide = duration.TotalMilliseconds
            };

            _current = curtain;
            return(curtain);
        }
예제 #3
0
 public void Dismiss()
 {
     try
     {
         if (_popup != null)
         {
             _popup.IsOpen = false;
         }
         if (_timer != null)
         {
             _timer.Stop();
             _timer = null;
         }
         _popup   = null;
         _current = null;
     }
     catch
     {
     }
 }
예제 #4
0
        public static CurtainPrompt ShowError(int milliToHide, Action action, string msg, params object[] args)
        {
            if (args != null)
            {
                msg = string.Format(msg, args);
            }

            if (_current != null)
            {
                _current.Dismiss();
            }

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

            _current = curtain;
            return(curtain);
        }
예제 #5
0
        public static CurtainPrompt Show(Action action, TimeSpan duration, string msg, params object[] args)
        {
            if (args != null)
            {
                msg = string.Format(msg, args);
            }

            if (_current != null)
                _current.Dismiss();

            var curtain = new CurtainPrompt(Colors.DarkGreen, msg, action) { _millisecondsToHide = duration.TotalMilliseconds};
            _current = curtain;
            return curtain;
        }
예제 #6
0
        public static CurtainPrompt ShowError(int milliToHide, Action action, string msg, params object[] args)
        {
            if (args != null)
            {
                msg = string.Format(msg, args);
            }

            if (_current != null)
                _current.Dismiss();

            var curtain = new CurtainPrompt(Colors.DarkRed, msg, action, true) {_millisecondsToHide = milliToHide};
            _current = curtain;
            return curtain;
        }