private void btnCancel_Click(object sender, EventArgs e) { this.Close(); messageboard_form newForm = new messageboard_form(); newForm.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { userName = txtUsername.Text; if (txtUsername.Text == "" || txtPassword.Text == "" || txtUsername.Text != txtPassword.Text) { MessageBox.Show("Username/Password Incorrect"); } else { this.Hide(); messageboard_form newForm = new messageboard_form(); newForm.Show(); } }
private void buttonConfirmPost_Click(object sender, EventArgs e) { String fileName = CreateFileName() + ".txt"; using (StreamWriter writeFile = new StreamWriter(fileLocation + fileName, true)) { writeFile.WriteLine("Posted By: " + postedBy); writeFile.WriteLine("Date:" + messageDate + Environment.NewLine); writeFile.WriteLine("Title: " + messageTitle + Environment.NewLine); writeFile.WriteLine("Detail:" + Environment.NewLine + messageDetail); } this.Close(); messageboard_form newForm = new messageboard_form(); newForm.Show(); }