Beispiel #1
0
 public Note(string name, string message, int index, NoteUI noteUI)
 {
     this.name    = name;
     this.message = message;
     this.index   = index;
     this.noteUI  = noteUI;
 }
Beispiel #2
0
        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();
        }