void LocalButton_click(object sender, EventArgs e) { if (validUser()) { Globals.author = usernameTxt.Text; fileBrowser FB = new fileBrowser(); FB.Show(); this.Hide(); } else { MessageBox.Show("Invalid Username"); } }
void ServerButton_click(object sender, EventArgs e) { if (validUser()) { Globals.author = usernameTxt.Text; Globals.dataType = Globals.DataType.Server; //ping database to test connection ServerCommands.closeDB(ServerCommands.connectDB()); MessageBox.Show("Connection Successful"); fileBrowser FB = new fileBrowser(); FB.Show(); this.Hide(); } else { MessageBox.Show("Invalid Username"); } }