public bool IsConfigured() { if (!String.IsNullOrEmpty(ConfigInstance.Current.ClickFinderConnectionString) && !String.IsNullOrEmpty(ConfigInstance.Current.TvUptodatePath)) { if (DbReader.SafeIsValidConnectionString(ConfigInstance.Current.ClickFinderConnectionString)) { if (File.Exists(ConfigInstance.Current.TvUptodatePath)) { return(true); } } } return(false); }
private bool DoValidation() { // Path to TvUpToDate.exe if (_tvUpToDatePathTextBox.Text.Length == 0) { _errorProvider.SetError(_tvUpToDatePathTextBox, "Please enter the full path to clickFinders tvUptodate.exe"); return(false); } if (!File.Exists(_tvUpToDatePathTextBox.Text)) { _errorProvider.SetError(_tvUpToDatePathTextBox, "Invalid path to clickFinders tvUptodate.exe, file cannot be found"); return(false); } _errorProvider.SetError(_tvUpToDatePathTextBox, null); if (!DbReader.SafeIsValidConnectionString(_connectionStringTextBox.Text)) { _errorProvider.SetError(_connectionStringTextBox, "Invalid connectionstring."); return(false); } return(true); }