public void Dismiss() { try { if (_popup != null) _popup.IsOpen = false; if (_timer != null) { _timer.Stop(); _timer = null; } _popup = null; _current = null; } catch { } }
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); }
public void Dismiss() { try { if (_popup != null) { _popup.IsOpen = false; } if (_timer != null) { _timer.Stop(); _timer = null; } _popup = null; _current = null; } catch { } }
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); }
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; }
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; }