private void ResetTimer()
 {
     TextInactivityWarning.Text = "";
     TimerIdleWarning.Stop();
     TimerIdleWarning.Start();
     TimerIdleExit.Stop();
 }
        private void ReturnToLoginForm()
        {
            TimerIdleWarning.Stop();
            TimerIdleExit.Stop();

            FormClosed            -= AccountForm_FormClosed;
            MouseMove             -= new MouseEventHandler(AccountForm_MouseMove);
            TimerIdleWarning.Tick -= TimerIdleWarningDone;
            TimerIdleExit.Tick    -= TimerIdleExitDone;

            MessageBox.Show("Güvenlik nedeni ile oturumunuz kapatıdı.");
            LoginFormRef.Show();
            this.Hide();
        }
 // User Inactivity Timer end, handle shutdown form.
 private void TimerIdleExitDone(object sender, EventArgs e)
 {
     TimerIdleWarning.Stop();
     TimerIdleExit.Stop();
     ReturnToLoginForm();
 }