Beispiel #1
0
        private void treeView1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (treeView1.SelectedNode.Index == 0) //Cadastro
            {
                if (treeView1.SelectedNode.Text.Equals("Abrir serviço"))
                {
                    Cursor.Current = Cursors.WaitCursor;
                    Application.DoEvents();
                    ProgramacaoIP p = new ProgramacaoIP();
                    p.ShowDialog();
                    //Croqui croqui = new Croqui();
                    //croqui.ShowDialog();
                }
            }
            if (treeView1.SelectedNode.Index == 2) //CIP
            {
                Inicio inicio = new Inicio();
                inicio.ShowDialog();
            }

            if (treeView1.SelectedNode.Index == 3) //Cadastro de cliente
            {
                Cursor.Current = Cursors.WaitCursor;
                Application.DoEvents();
                GeoRedeProject inicio = new GeoRedeProject();
                inicio.ShowDialog();
            }
            if (treeView1.SelectedNode.Index == 4) //Sair
            {
                if (MessageBox.Show("Confirma o encerramento do Aplicativo?", "",
                                    MessageBoxButtons.OKCancel, MessageBoxIcon.Question,
                                    MessageBoxDefaultButton.Button2) == DialogResult.OK)
                {
                    Application.Exit();
                }
            }
        }
Beispiel #2
0
 private void cipButton_Click(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     Application.DoEvents();
     Inicio inicio = new Inicio();
     inicio.ShowDialog();
 }