private void OnTransportStateChanged(IConnectionObject obj) { this.StateChanged?.Invoke(this); if (State >= ConnectionState.Closing) { this.SessionEnded?.Invoke(this); } }
private void Button_Click(object sender, RoutedEventArgs e) { DBList.Items.Clear(); bool msTrusted = (bool)MSDB.IsChecked && (bool)TrustedCheckBox.IsChecked; dbConn = ConnFactory.createConnection((bool)OracleDB.IsChecked ? "Oracle" : "MSSQL", ServerText.Text, (bool)OracleDB.IsChecked ? null : InitialDBText.Text, msTrusted, !msTrusted ? UsernameText.Text : null, !msTrusted ? PasswordText.Password : null, PortText.Text, SIDText.Text); //dbConn = OracleConn.GetInstance(ServerText.Text, PortText.Text, SIDText.Text, UsernameText.Text, PasswordText.Text); //DBList.Items.Add(ServerText.Text); //dbConn = DBConn.GetInstance(ServerText.Text, InitDbText.Text, (bool)TrustedCheckBox.IsChecked, !(bool)TrustedCheckBox.IsChecked ? UsernameText.Text : null, !(bool)TrustedCheckBox.IsChecked ? PasswordText.Text : null); IList <string> Tables = dbConn.GetMetaDatabases(); foreach (string db in Tables) { DBList.Items.Add(db); } }