示例#1
0
 private void Connect()
 {
     // TODO: colour and prescript
     connDetails = new ConnectionDetails(txtName.Text, txtHost.Text, int.Parse(txtPort.Text), txtSid.Text, txtUser.Text, txtPassword.Text, null, Color.Transparent);
     Settings.Default.Connections.Remove(connDetails.Name);
     Settings.Default.Connections.Add(connDetails.Name, connDetails);
     Settings.Default.Save();
     Close();
 }
示例#2
0
 /// <summary>
 /// Connects to the database.
 /// </summary>
 /// <param name="connDetails"></param>
 public SqlRunner(ConnectionDetails connDetails)
 {
     this.connDetails = connDetails;
     string connStr = GetConnectionString();
     log.Info("connecting to [" + connDetails.Name + "] with connection string " + connStr);
     conn = new OracleConnection(connStr);
     conn.Open();
     currentTransaction = conn.BeginTransaction();
 }
示例#3
0
 private void SetConnectionDetailsFromSelectedItem()
 {
     if (lstConnections.SelectedItems.Count == 1)
     {
         ConnectionDetails = (ConnectionDetails)Settings.Default.Connections[lstConnections.SelectedItems[0].Tag];
     }
 }
示例#4
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     connDetails = null;
     Close();
 }