// Opens note private void listViewNotes_MouseDoubleClick(object sender, MouseEventArgs e) { if (listViewNotes.SelectedItems.Count > 0) { NoteCheck(); NoteShow newForm = new NoteShow(notes.Find(n => n.Name == listViewNotes.SelectedItems[0].Text)); newForm.Name = listViewNotes.SelectedItems[0].Text; if (!noteForms.Exists(f => f.Name == newForm.Name)) { noteForms.Add(newForm); newForm.Show(); } else { noteForms.Find((f => f.Name == newForm.Name)).BringToFront(); } } }
// Shows stored notes public void ShowNotify() { timerNoteNotify.Stop(); for (int i = 0; i < storedNotes.Count; i++) { NoteCheck(); NoteShow newForm = new NoteShow(storedNotes[i]); newForm.Name = storedNotes[i].Name; if (File.Exists(storedNotes[i].Music)) { notifySound.open(storedNotes[i].Music); notifySound.play(); } storedNotes[i].IsRelevant = false; AttentionForm check = new AttentionForm(); check.ShowDialog(); notifySound.stop(); if (!noteForms.Exists(f => f.Name == newForm.Name)) { noteForms.Add(newForm); newForm.Show(); } else { noteForms.Find((f => f.Name == newForm.Name)).BringToFront(); } } RelevantCheck(); timerNoteNotify.Start(); storedNotes.Clear(); }