private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            string nome  = dataGridView1[0, dataGridView1.CurrentCellAddress.Y].Value.ToString();
            string login = dataGridView1[1, dataGridView1.CurrentCellAddress.Y].Value.ToString();
            string aux   = "ok";
            var    form  = new frmCadUsuario(nome, login, aux);

            form.Show();
        }
示例#2
0
        private void cadastrarUsuáriosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new frmCadUsuario("", "", "");

            if (Application.OpenForms.OfType <frmCadUsuario>().Count() > 0)
            {
                Application.OpenForms[form.Name].Focus();
            }
            else
            {
                form.Show();
            }
        }