private void BtnFindDatabases_Click(object sender, EventArgs e) { if (!ValidateControls()) { return; } btnFindDatabases.Enabled = false; var dataSource = rdoNetwork.Checked ? cmbNetworkServers.Text : cmbLocaleServers.Text; cmbDatabases.DataSource = chkUseSqlAuthentication.Checked ? DbHelpers.GetAllDataBases(dataSource, txtUserId.Text, txtPassword.Text) : DbHelpers.GetAllDataBases(dataSource); btnFindDatabases.Enabled = true; }