Inheritance: System.Windows.Forms.Form
示例#1
0
        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);
        }
示例#2
0
        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();
            }
        }
示例#3
0
        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);
        }
示例#4
0
        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();
            }
        }
示例#5
0
        public bool IsDisplaying()
        {
            var form = PopupForm.GetInstance(false);

            return(form.Current == this && form.PopupState != PopupState.Pending);
        }
示例#6
0
 public void Show()
 {
     PopupForm.GetInstance(true).Show(this);
 }