コード例 #1
0
        private void RestoreNote(Guid noteId)
        {
            NoteViewModel viewModel = RecycledNotes.Find(item => noteId == item.Id);

            if (viewModel != null)
            {
                Modified = true;
                viewModel.InRecyclingBin = false;
                RecycledNotes.Remove(viewModel);
            }
            OnPropertyChanged("Notes");
        }
コード例 #2
0
        private void RestoreNote(object value)
        {
            Guid          noteId    = (value is Guid) ? (Guid)value : new Guid(value.ToString());
            NoteViewModel viewModel = RecycledNotes.Find(item => noteId == item.Id);

            if (viewModel != null)
            {
                Modified = true;
                viewModel.InRecyclingBin = false;
                RecycledNotes.Remove(viewModel);
            }
            OnPropertyChanged("Notes");
        }