private void sairToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Alerta alerta = new Frm_Alerta("Tem certeza que deseja sair?", "questoes"); alerta.ShowDialog(); if (alerta.DialogResult == DialogResult.OK) { Close(); } }
private void desconectarToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Alerta alerta = new Frm_Alerta("Tem certeza que deseja sair?", "questoes"); alerta.ShowDialog(); if (alerta.DialogResult == DialogResult.OK) { novoToolStripMenuItem.Enabled = false; desconectarToolStripMenuItem.Enabled = false; exibirToolStripMenuItem.Enabled = false; conectarToolStripMenuItem.Enabled = true; } }