コード例 #1
0
ファイル: OutlinerNote.cs プロジェクト: viegasfh/UV-Outliner
 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();
 }
コード例 #2
0
ファイル: OutlinerNote.cs プロジェクト: viegasfh/UV-Outliner
        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;
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }