Пример #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     progressBar1.Value = progressBar1.Value + 1;
     if (progressBar1.Value >= 100)
     {
         myLogin lgn = new myLogin();
         this.Hide();
         lgn.Show();
         timer1.Enabled       = true;
         progressBar1.Visible = false;
         timer1.Enabled       = false;
     }
 }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            const string message = "Confirm Logout";
            const string caption = "User Log Out";
            var          result  = MessageBox.Show(message, caption,
                                                   MessageBoxButtons.YesNo,
                                                   MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                myLogin usrlgn = new myLogin();
                usrlgn.Show();
                this.Close();
            }
        }