ComponentFactory.Krypton.Docking.KryptonAutoHiddenSlidePanel.OnDismissTimerTick C# (CSharp) Метод

OnDismissTimerTick() приватный Метод

private OnDismissTimerTick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void OnDismissTimerTick(object sender, EventArgs e)
        {
            // Check to see if we allowed to perform operations
            if (Disposing || IsDisposed)
            {
                // Make sure the timer is disposed of correctly
                if (_dismissTimer != null)
                {
                    _dismissTimer.Stop();
                    _dismissTimer.Dispose();
                    _dismissTimer = null;
                    _dismissRunning = false;
                }

                return;
            }

            // Always stop the timer, we only need to be notified once
            _dismissTimer.Stop();

            // Only process if the timer is expected to be running
            if (_dismissRunning)
            {
                // Always stop the timer, we only need to be notified once
                _dismissRunning = false;

                // Action to take depends on current state
                switch (_state)
                {
                    case DockingAutoHiddenShowState.Hidden:
                    case DockingAutoHiddenShowState.SlidingIn:
                        // No sliding required, nothing to do
                        break;
                    case DockingAutoHiddenShowState.SlidingOut:
                    case DockingAutoHiddenShowState.Showing:
                        MakeSlideIn();
                        break;
                }
            }
        }