Authentiqr.NET.frmMain.SystemEvents_SessionSwitch C# (CSharp) Метод

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

private SystemEvents_SessionSwitch ( object sender, SessionSwitchEventArgs e ) : void
sender object
e SessionSwitchEventArgs
Результат void
        private void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
        {
            switch (e.Reason)
            {
                case SessionSwitchReason.SessionLock:
                case SessionSwitchReason.SessionLogoff:
                case SessionSwitchReason.RemoteDisconnect:
                case SessionSwitchReason.ConsoleDisconnect:
                    // Lock the 2FA data when the machine is locked
                    for (int i = 0; i < settings.Accounts.Count * 3; i++)
                    {
                        contextMenu.Items.RemoveAt(0);
                    }
                    settings.Lock();
                    TimeoutMenuItems.Clear();
                    tmrMain.Enabled = false;
                    mnuLockUnlock.Visible = true;
                    mnuAddAccount.Enabled = false;
                    break;
            }
        }