예제 #1
0
        private void LogOut_btn_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Apakah Anda yakin ingin Log Out?",
                                                  "Exit Aplikasi", MessageBoxButtons.YesNo);

            if (dialog == DialogResult.Yes)
            {
                this.Close();
                FormLogin fLogin = new FormLogin();
                fLogin.Show();
            }
            else if (dialog == DialogResult.No)
            {
                CancelEventArgs batal = new CancelEventArgs();
                batal.Cancel = true;
            }
        }
예제 #2
0
 private void LogOut_btn_Click(object sender, EventArgs e)
 {
     DialogResult dialog = MessageBox.Show("Apakah Anda yakin ingin Log Out?",
     "Exit Aplikasi", MessageBoxButtons.YesNo);
     if (dialog == DialogResult.Yes)
     {
         this.Close();
         FormLogin fLogin = new FormLogin();
         fLogin.Show();
     }
     else if (dialog == DialogResult.No)
     {
         CancelEventArgs batal = new CancelEventArgs();
         batal.Cancel = true;
     }
 }