Exemple #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     panel1.Width += 3;
     if (panel1.Width >= 850)
     {
         timer1.Stop();
         EmployeeLoginForm login = new EmployeeLoginForm();
         this.Hide();
         login.Show();
     }
 }
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //message box asks user if they are sure they want to logout
            DialogResult dialogResult = MessageBox.Show("Are you sure you want to logout? If you click OK you will be logged out.", "Logout", MessageBoxButtons.OKCancel);

            if (dialogResult == DialogResult.OK)
            {
                this.Hide();

                System.Media.SoundPlayer player = new System.Media.SoundPlayer();
                player.SoundLocation = @"\\Mac\Home\Desktop\GUI Rubberducks\bye.wav";
                player.Load();
                player.Play();

                EmployeeLoginForm login = new EmployeeLoginForm();
                login.Show();
            }
            if (dialogResult == DialogResult.Cancel)
            {
                //nothing -- user doesn't logout
            }
        }
        private void AdminInterface_FormClosed(object sender, FormClosedEventArgs e)
        {
            EmployeeLoginForm login = new EmployeeLoginForm();

            login.Show();
        }