/// <summary> /// Test Connection /// </summary> private void TestConnection() { if (MySqlConfiguration.TestConnection(usernameTextBox.Text, passwordTextBox.Text)) { MessageBox.Show("Connection Successfull"); } else { MessageBox.Show("Invalid credentials"); } }
private void OnDoneButtonClick(object sender, EventArgs e) { if (MySqlConfiguration.TestConnection(usernameTextBox.Text, passwordTextBox.Text)) { MySqlConfiguration.DeployScript(usernameTextBox.Text, passwordTextBox.Text); string filePath = Path.GetFullPath(@"~\..\..\TradeSharp User Interface\SpringConfig\SpringDao.xml"); MySqlConfiguration.ChangeSpringConfigFile(usernameTextBox.Text, passwordTextBox.Text, filePath); //Display message to user about success. MessageBox.Show("Application has been configured, now you can start the application"); //Close the application this.Close(); } else { MessageBox.Show("Please verify connection first"); } }