예제 #1
0
파일: Logout.cs 프로젝트: SieBrum/Barroc-IT
        private void btn_Yes_Click(object sender, EventArgs e)
        {
            form.Close();
            Frm_Login login = new Frm_Login();

            login.Show();
            this.Close();
        }
예제 #2
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);

            if (e.CloseReason == CloseReason.WindowsShutDown)
            {
                return;
            }

            switch (MessageBox.Show(this, "Are you sure you want to exit? Any unsaved changes will be lost.", "Closing", MessageBoxButtons.YesNo))
            {
            case DialogResult.No:
                e.Cancel = true;
                break;

            default:
                Frm_Login frmlogin = new Frm_Login();
                frmlogin.Show();
                break;
            }
        }