internal PopupForm() { _instance = this; _current = null; _mouseOver = false; _animationStep = 0; _popupScreen = null; _popupTimer = new Timer(); _popupTimer.Tick += new EventHandler(PopupTimer_Tick); _idleCompleteTimer = new Timer { Interval = 4000 }; _idleCompleteTimer.Tick += new EventHandler(IdleCompleteTimer_Tick); Disposed += new EventHandler(PopupForm_Disposed); SetStyle(ControlStyles.Opaque | ControlStyles.Selectable , false); SetStyle(ControlStyles.OptimizedDoubleBuffer| ControlStyles.SupportsTransparentBackColor, true); }
void PopupForm_Disposed(object sender, EventArgs e) { if (_current != null) { _current.Dispose(); _current = null; } _popupTimer.Dispose(); _idleCompleteTimer.Dispose(); _instance = null; while (_queue.Count > 0) { var popup = _queue[0]; _queue.RemoveAt(0); popup.Show(); } }
internal PopupForm() { _instance = this; _current = null; _mouseOver = false; _animationStep = 0; _popupScreen = null; _popupTimer = new Timer(); _popupTimer.Tick += new EventHandler(PopupTimer_Tick); _idleCompleteTimer = new Timer { Interval = 4000 }; _idleCompleteTimer.Tick += new EventHandler(IdleCompleteTimer_Tick); Disposed += new EventHandler(PopupForm_Disposed); SetStyle(ControlStyles.Opaque | ControlStyles.Selectable, false); SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); }
public bool IsDisplaying() { var form = PopupForm.GetInstance(false); return(form.Current == this && form.PopupState != PopupState.Pending); }
public void Show() { PopupForm.GetInstance(true).Show(this); }