private async void LoadDatabaseOwners() { DbInterpreter dbInterpreter = this.GetDbInterpreter(); List <string> items = new List <string>(); string defaultItem = null; List <DatabaseOwner> owners = await dbInterpreter.GetDatabaseOwnersAsync(); items.AddRange(owners.Select(item => item.Name)); if (this.displayInfo.DatabaseType == DatabaseType.SqlServer) { defaultItem = "dbo"; } else if (this.displayInfo.DatabaseType == DatabaseType.Oracle) { this.cboOwner.Enabled = false; defaultItem = (this.GetDbInterpreter() as OracleInterpreter).GetDbOwner(); } else if (this.displayInfo.DatabaseType == DatabaseType.MySql) { this.cboOwner.Enabled = false; defaultItem = dbInterpreter.ConnectionInfo.Database; } cboOwner.Items.AddRange(items.ToArray()); if (cboOwner.Items.Count == 1) { cboOwner.SelectedIndex = 0; } else { if (defaultItem != null) { cboOwner.Text = defaultItem; } } }