Пример #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;
        }