private void DeleteNote(StickyNoteForm sender) { noteList.Remove(sender.note); stickyNoteFormList.Remove(sender); NoteList_Save(); noteListForm.RefreshNotes(); }
private void ShowNote(Note note) { foreach (StickyNoteForm stickyNoteForm in stickyNoteFormList) { if (stickyNoteForm.note == note) { stickyNoteForm.Visible = true; note.IsStickyNote = true; return; } } StickyNoteForm newStickyNoteForm = new StickyNoteForm(note); stickyNoteFormList.Add(newStickyNoteForm); newStickyNoteForm.sendAddNoteEvent += AddStickyNote; newStickyNoteForm.FormClosed += StickyNoteClosed; newStickyNoteForm.showMainForm += showMainForm; newStickyNoteForm.Show(this); }