private void RemoveNote(ArchivedNoteViewModel archivedNoteVm)
 {
     shadowNotes.RemoveAll(x => x.Name == archivedNoteVm.Name);
     ArchivedNotes.Remove(archivedNoteVm);
     ArchivedNotesExist = shadowNotes.Any();
     SearchFieldEnabled = shadowNotes.Count > 1;
 }
        private void NoteDeleted(object sender, DeletedNoteEventArgs e)
        {
            ArchivedNoteViewModel deletedVm = ArchivedNotes.FirstOrDefault(x => x.Name == e.DeletedNote.Name);

            if (deletedVm != null)
            {
                RemoveNote(deletedVm);
            }
        }
        private void NoteArchived(object sender, ArchivedNoteEventArgs e)
        {
            var archivedNoteVm = new ArchivedNoteViewModel(e.ArchivedNote);

            shadowNotes.Add(archivedNoteVm);

            FilterNotes(SearchText.Trim().ToLowerInvariant());

            ArchivedNotesExist = true;
            SearchFieldEnabled = shadowNotes.Count > 1;
        }