Exemple #1
0
 //Load Progran Function
 private void Main_Menu_Load(object sender, EventArgs e)
 {
     User.Text = "Current User: " + ATM.cur_name;
     //Starts Timer for Auto-Logout
     Screen_Timer.Interval = 45000;
     Screen_Timer.Start();
 }
Exemple #2
0
        //Timer Function
        private void Screen_Timer_Tick(object sender, EventArgs e)
        {
            //Timer Returns User to Login Screen if Certain Period of Inactivity
            Screen_Timer.Stop();
            MessageBox.Show("   You Have Been Logged Out.   ");
            System.Threading.Thread.Sleep(1000);
            ATM form1 = new ATM();

            form1.Show();
            this.Close();
        }
Exemple #3
0
 //inactivity Function - Restarts Timer if Mouse is Moved
 private void Mouse_Active(object sender, MouseEventArgs e)
 {
     Screen_Timer.Stop();
     Screen_Timer.Start();
 }
Exemple #4
0
 //inactivity Function - Restarts Timer if Mouse is Clicked
 private void UI_Click(object sender, EventArgs e)
 {
     Screen_Timer.Stop();
     Screen_Timer.Start();
 }