Exemplo n.º 1
0
        private void PictureBox1_Click(object sender, EventArgs e)
        {
            FrmModoAusente telaAusente = new FrmModoAusente(txtLogin.Text);

            telaAusente.Show();
            this.Show();
            this.Hide();
        }
        private void Pcb2Aus_Click(object sender, EventArgs e)
        {
            FrmModoAusente tela = new FrmModoAusente(txtLogin.Text);

            tela.Show();

            Close();

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

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