public static bool TestConnection(VssConnectionSettings connectionSettings, out Exception ex) { if (connectionSettings == null) { throw new ArgumentNullException("connectionSettings"); } return(VssUtilities.TestConnection(connectionSettings.Database, connectionSettings.UserName, connectionSettings.Password, out ex)); }
private void testButton_Click(object sender, EventArgs e) { Exception ex; if (VssUtilities.TestConnection(databaseNameTextBox.Text, userNameTextBox.Text, passwordTextBox.Text, out ex)) { MessageBox.Show("Connection succeeded.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(string.Format("Connection failed. {0}", ex.Message), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void vssProjectsBrowseButton_Click(object sender, EventArgs e) { if (VssUtilities.TestConnection(_migration.VssConnectionSettings)) { using (SelectVssProjectsDialog dialog = new SelectVssProjectsDialog(_migration)) { if (dialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { this.RefreshMigrationSettings(); } } } else { MessageBox.Show("No connection to Visual SourceSafe available.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public static bool TestConnection(VssConnectionSettings connectionSettings) { Exception ex; return(VssUtilities.TestConnection(connectionSettings, out ex)); }
public static bool TestConnection(string database, string username, string password) { Exception ex; return(VssUtilities.TestConnection(database, username, password, out ex)); }