public OutlinerNote(OutlinerDocument document, OutlinerNoteCollection Subnotes) { this.__Document = document; this.__Parent = null; __IsDocumentRoot = true; this.__Subnotes = Subnotes; this.__Subnotes.Collection.CollectionChanged += new NotifyCollectionChangedEventHandler(Collection_CollectionChanged); Id = s_id; s_id += 1; CreateColumnData(); }
public OutlinerNote(OutlinerNote parent) { this.__Document = parent.Document; this.__Parent = parent; this.__Subnotes = new OutlinerNoteCollection(); this.__Subnotes.Collection.CollectionChanged += new NotifyCollectionChangedEventHandler(Collection_CollectionChanged); CreateColumnData(); Id = s_id; s_id += 1; }
public void Undo(OutlinerDocument document, TreeListView treeListView) { while (__UndoActions.Count > 0) { DocumentUndoAction action = __UndoActions.Pop(); action.Undo(document, treeListView); __RedoActions.Push(action); DoUndoCountChanged(); if (!action.UndoNext) { break; } } GC.Collect(); }
public OutlinerNote FindOutlinerNoteByDocument(Guid documentGuid) { OutlinerNote foundNote = null; OutlinerDocument.WalkRecursively(RootNode, delegate(OutlinerNote note, out bool shouldWalkSubItems, out bool shouldContinue) { shouldContinue = true; shouldWalkSubItems = true; if (note.OwnsDocument(documentGuid)) { foundNote = note; shouldContinue = false; } }); return(foundNote); }
internal OutlinerNote FindOutlinerNoteById(int noteId) { OutlinerNote foundNote = null; if (RootNode.Id == noteId) { return(RootNode); } OutlinerDocument.WalkRecursively(RootNode, delegate(OutlinerNote note, out bool shouldWalkSubItems, out bool shouldContinue) { shouldContinue = true; shouldWalkSubItems = true; if (note.Id == noteId) { foundNote = note; shouldContinue = false; } }); return(foundNote); }