/// <summary>
        /// Finish tracking all popups.
        /// </summary>
        public void EndAllTracking()
        {
            // Are we tracking a popup?
            if (_current != null)
            {
                // Kill the popup window
                if (!_current.IsDisposed)
                {
                    _current.Dispose();
                    _current = null;
                }

                // Is there anything stacked?
                while (_stack.Count > 0)
                {
                    // Pop back the popup
                    _current = _stack.Pop();

                    // Kill the popup
                    _current.Dispose();
                    _current = null;
                }

                // No longer need to filter
                FilterMessages(false);
            }
        }
예제 #2
0
        private void RunInstantTest(int numPopups)
        {
            // make sure there are popups
            if (numPopups < 1)
            {
                throw new Exception("numPopups must be at least 1.");
            }

            // instantly create popups
            for (int i = 0; i < numPopups; ++i)
            {
                _popupStack.Push <Popup>(_testPopup);
            }

            // instantly destroy popups
            for (int i = 0; i < numPopups; ++i)
            {
                _popupStack.Pop();
            }
        }