예제 #1
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote rootNote = null;

            for (int i = 0; i < __SavedCheckboxes.Count; i++)
            {
                OutlinerNote note = document.FindOutlinerNoteById(__SavedCheckboxes[i].NodeId);
                note.SetCheckedForCurrentNote(__SavedCheckboxes[i].IsChecked);

                if (rootNote == null)
                {
                    rootNote = note;
                }
            }

            for (int i = 0; i < __SavedCheckboxes.Count; i++)
            {
                OutlinerNote note = document.FindOutlinerNoteById(__SavedCheckboxes[i].NodeId);
                note.UpdateParentCheckboxes();
            }

            if (__SelectNote && rootNote != null)
            {
                treeListView.MakeActive(rootNote, -1, false);
            }

            rootNote.UpdateParentCheckboxes();
            rootNote.OnPropertyChanged("IsChecked");
            rootNote.OnPropertyChanged("IsCheckedDirect");
        }
예제 #2
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NodeId);

            note.IsChecked = __WasChecked;

            if (__SelectNote)
            {
                treeListView.MakeActive(note, -1, false);
            }

            note.UpdateParentCheckboxes();
            note.OnPropertyChanged("IsChecked");
            note.OnPropertyChanged("IsCheckedDirect");
        }