Esempio n. 1
0
 private void ShowNewForm(object sender, EventArgs e)
 {
     // Create a new instance of the child form.
     Form childForm = new MainForm();
     // Make it a child of this MDI form before showing it.
     childForm.MdiParent = this;
     childForm.Text = "Window " + childFormNumber++;
     childForm.Show();
 }
Esempio n. 2
0
 private void SessionConnectMenuItem_Click(object sender, EventArgs e)
 {
     FormConnection formConnection = new FormConnection();
     //formConnection.MdiParent = this.ParentForm;
     if (formConnection.ShowDialog() == DialogResult.OK)
     {
         if (!string.IsNullOrEmpty(formConnection.textBoxOracleUserId.Text)
             && !string.IsNullOrEmpty(formConnection.textBoxOraclePassword.Text)
             && !string.IsNullOrEmpty(formConnection.TNSNamesComboBox.Text))
         {
             //DataGridViewRow dgvr = formConnection.dataGridViewConnection.CurrentRow;
             Config.SaveLastConnectionInfo(formConnection.textBoxOracleUserId.Text,
                                    formConnection.textBoxOraclePassword.Text,
                                    formConnection.TNSNamesComboBox.Text);
             MainForm mainForm = new MainForm();
             plugSender = mainForm.plugEvent;
             mainForm.MdiParent = ParentForm;
             mainForm.ParentForm = ParentForm;
             mainForm.Show();
             SendConnectionInfo(formConnection.textBoxOracleUserId.Text, formConnection.textBoxOraclePassword.Text, formConnection.TNSNamesComboBox.Text);
         }
     }
 }
Esempio n. 3
0
        private void treeViewOracleSchema_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F4)
            {
                DbObjectItem DbOI = (DbObjectItem) treeViewOracleSchema.SelectedNode.Tag;
                if (DbOI.Type.ToLower() == "referenced" || DbOI.Type.ToLower() == "fk" || (DbOI.Type.ToLower() == "field" && DbOI.Name.Contains(".")))
                {
                    DbOI.Type = "table";
                    int DotPos = DbOI.Name.IndexOf('.');
                    if (DotPos >= 0)
                        DbOI.Name = DbOI.Name.Substring(0, DotPos);
                }
                if (DbOI.Type.ToLower() == "table" || DbOI.Type.ToLower() == "view")
                {
                    MainForm TableForm = new MainForm();
                    TableForm.splitContainer1.Panel1Collapsed = true;
                    TableForm.connexion = this.connexion;
                    TableForm.ParentForm = this.ParentForm;

                    //TableForm.MdiParent = this.ParentForm.ParentForm;
                    TableForm.Show();
                    Utils.SendConnectionInfo(connexion, TableForm.plugEvent);
                    Utils.SendSelectedObject(DbOI, TableForm.plugEvent);
                    TableForm.Text = DbOI.Name + " " + TableForm.Text;
                }

            }
        }