/// <summary>
        ///     Create an instance of LocatorManager with an optional specific store.
        ///     It manages the processors that are used to create and resolve locators.
        ///     If a store is passed in, its used to query for annotations.  Otherwise
        ///     the service is looked for and the service's store is used.
        /// </summary>
        /// <param name="store">optional, store to use for query of annotations</param>
        public LocatorManager(AnnotationStore store)
        {
            _locatorPartHandlers = new Hashtable();
            _subtreeProcessors = new Hashtable();
            _selectionProcessors = new Hashtable();

            RegisterSubTreeProcessor(new DataIdProcessor(this), DataIdProcessor.Id);
            RegisterSubTreeProcessor(new FixedPageProcessor(this), FixedPageProcessor.Id);
            TreeNodeSelectionProcessor nodeProcessor = new TreeNodeSelectionProcessor();
            RegisterSelectionProcessor(nodeProcessor, typeof(FrameworkElement));
            RegisterSelectionProcessor(nodeProcessor, typeof(FrameworkContentElement));
            TextSelectionProcessor textProcessor = new TextSelectionProcessor();
            RegisterSelectionProcessor(textProcessor, typeof(TextRange));
            RegisterSelectionProcessor(textProcessor, typeof(TextAnchor));

            _internalStore = store;
        }
예제 #2
0
        // Token: 0x06007BFD RID: 31741 RVA: 0x0022D8D4 File Offset: 0x0022BAD4
        public LocatorManager(AnnotationStore store)
        {
            this._locatorPartHandlers = new Hashtable();
            this._subtreeProcessors   = new Hashtable();
            this._selectionProcessors = new Hashtable();
            this.RegisterSubTreeProcessor(new DataIdProcessor(this), "Id");
            this.RegisterSubTreeProcessor(new FixedPageProcessor(this), FixedPageProcessor.Id);
            TreeNodeSelectionProcessor processor = new TreeNodeSelectionProcessor();

            this.RegisterSelectionProcessor(processor, typeof(FrameworkElement));
            this.RegisterSelectionProcessor(processor, typeof(FrameworkContentElement));
            TextSelectionProcessor processor2 = new TextSelectionProcessor();

            this.RegisterSelectionProcessor(processor2, typeof(TextRange));
            this.RegisterSelectionProcessor(processor2, typeof(TextAnchor));
            this._internalStore = store;
        }