private void Main_Load(object sender, EventArgs e) { WindowState = FormWindowState.Maximized; FillBackgroundColor(false); VersaoToolStripStatus.Text = gtiProperty.Version; LockForm(true); Forms.Login login = new Forms.Login(); login.ShowDialog(); }
private void SairButton_Click(object sender, EventArgs e) { if (MessageBox.Show("Deseja fechar todas as janelas e retornar a tela de login?", "Confirmação", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Form[] charr = this.MdiChildren; foreach (Form chform in charr) { chform.Close(); } LockForm(true); Forms.Login login = new Forms.Login(); login.ShowDialog(); } }