//Кнопка повернутися private void button3_Click(object sender, EventArgs e) { DialogResult ChooseYesNo = MessageBox.Show("Впевнені що хочете повернутися в головне меню?", "MyBooks", MessageBoxButtons.YesNo); if (ChooseYesNo == DialogResult.Yes) { this.Hide(); StartMenuForm SwitchStartMenu = new StartMenuForm(); SwitchStartMenu.Show(); } }
//Кнопка ОК private void button1_Click(object sender, EventArgs e) { Autorization autorization = new Autorization(); if (!autorization.CheckAutorization()) { this.Hide(); StartMenuAfterAutorizationForm SwitchStartMenu = new StartMenuAfterAutorizationForm(); SwitchStartMenu.Show(); } else { this.Hide(); StartMenuForm SwitchStartMenu = new StartMenuForm(); SwitchStartMenu.Show(); } }