private void button1_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show( "Вы точно хотите перейти?", "Сообщение", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); if (result == DialogResult.Yes) { this.Hide(); var form = new AddUser(); form.Closed += (s, args) => this.Close(); form.Show(); } }
private void addUser_btn_Click(object sender, RoutedEventArgs e) { AddUser adduser = new AddUser(); adduser.Show(); }