private void LoginUser(User user) { AccountManager.CurrentUser = user; Notepad notepad = new Notepad(); notepad.Show(); Hide(); }
private void SignUpButton_Click(object sender, EventArgs e) { string enteredUsername = usernameTextBox.Text; string enteredPassword = passwordTextBox.Text; FileStream fileStream = File.Open(path, FileMode.Append); using (StreamWriter streamWriter = new StreamWriter(fileStream)) { streamWriter.WriteLine($"{enteredUsername} {enteredPassword}"); } fileStream.Close(); AccountManager.CurrentUser = new User(enteredUsername, enteredPassword); Notepad notepad = new Notepad(); notepad.Show(); Close(); }
public AddNoteMessageBox(Notepad notepad) { InitializeComponent(); this.notepad = notepad; }