Exemplo n.º 1
0
        private void PictureBox2_Click(object sender, EventArgs e)
        {
            FrmModoDisponivel telaDisponivel = new FrmModoDisponivel(txtLogin.Text);

            telaDisponivel.Show();
            this.Show();
            this.Hide();
        }
        private void Pcb2Dis_Click(object sender, EventArgs e)
        {
            FrmModoDisponivel tela = new FrmModoDisponivel(txtLogin.Text);

            tela.Show();

            Close();

            if (Application.OpenForms.OfType <FrmModoAusente>().Count() > 0)
            {
                Application.OpenForms["FrmModoAusente"].Close();
            }

            if (Application.OpenForms.OfType <FrmModoAusente2>().Count() > 0)
            {
                Application.OpenForms["FrmModoAusente2"].Close();
            }

            if (Application.OpenForms.OfType <FrmModoAutonomo>().Count() > 0)
            {
                Application.OpenForms["FrmModoAutonomo"].Close();
            }
        }