void AddConnectionClick(object sender, EventArgs e) { InputBox dlg; if (SelG >= 0) { ConnectionInfo NewCI = new ConnectionInfo(); SQLConnectForm ConnectUI = new SQLConnectForm(); if(ConnectUI.ShowDialog() == DialogResult.OK) { dlg = new InputBox(true, "New connection", "Name for the new connection"); dlg.SetInput(ConnectUI.SelectedDB); if (dlg.ShowDialog() != DialogResult.OK) return; else NewCI.Name = dlg.Input; NewCI.ConnectionString = ConnectUI.ConnectionString; CGs[SelG].Connections.Add(NewCI); LoadInfo(CGs[SelG]); } } else { MessageBox.Show("Select the connection group to whuch the new connection will be added", "Add connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
/// <summary> /// Basic Constructor, initializes this node to start at the root of the first drive found on the disk. ONLY USE THIS FOR ROOT NODES /// </summary> public ConxNode(ConxGroupNode Dad, ConnectionInfo Conx) { parent = Dad; szDisplayName = Conx.Name; ThisConx = Conx; }