public Note(string name, string message, int index, NoteUI noteUI) { this.name = name; this.message = message; this.index = index; this.noteUI = noteUI; }
private void SaveNoteButton_Click(object sender, EventArgs e) { string noteName = noteNameTextBox.Text; string noteText = noteMessageTextBox.Text; NoteUI noteUI = new NoteUI(); notepad.AddNoteToLayout(noteUI); Note note = new Note(noteName, noteText, Notepad.CurrentNoteIndex, noteUI); Notepad.CurrentNoteIndex++; noteUI.SetNote(note); note.Create(); note.Save(); Close(); }