示例#1
0
        private static void OnTick_Open(object sender, EventArgs e)
        {
            if (UserInputInfo.GetLastInputTime() < _settings.IdleTimerLength)
            {
                Timer.Tick -= OnTick_Open;
                Timer.Tick += OnTick;

                _mainForm.Close();
            }
        }
示例#2
0
        private static void OnTick(object sender, EventArgs e)
        {
            if (UserInputInfo.GetLastInputTime() >= _settings.IdleTimerLength)
            {
                Timer.Tick -= OnTick;
                Timer.Tick += OnTick_Open;

                _mainForm = new MainForm(_settings.LogoffCountdownLength, _settings.DebugMode);
                _mainForm.Show();
            }
        }