Example #1
0
        private void LoginUser(User user)
        {
            AccountManager.CurrentUser = user;
            Notepad notepad = new Notepad();

            notepad.Show();
            Hide();
        }
Example #2
0
        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();
        }
Example #3
0
 public AddNoteMessageBox(Notepad notepad)
 {
     InitializeComponent();
     this.notepad = notepad;
 }