Ejemplo n.º 1
0
        private void InkWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //Initialize analyzer and pipeline
            inkAnalyzer = new InkAnalyzer(this.Dispatcher);
            pipeline = new PipelineAnalyzer(inkAnalyzer);

            //Initialize headings
            headings = new Headings();
            headings.sidebar = SideInkCanvas;
            headings.scrollViewerContainer = MainScrollView;

            MainInkCanvas.Strokes.StrokesChanged += Strokes_StrokesChanged;
            inkAnalyzer.ContextNodeCreated += InkAnalyzer_ContextNodeCreated;
            pipeline.PipelineComplete += pipeline_PipelineComplete;

            //DisableDictionary();

            insertionBox = new InsertionBox(inserter);
            insertionBox.TheInsertButton.Click += InsertButton_Click;
            insertionBox.TheCancelButton.Click += CancelButton_Click;
            insertReflow = new ReflowProcessor(insertionBox.InkCanvas, false);
            OverlayCanvas.Children.Add(insertionBox);
            insertionBox.Visibility = Visibility.Collapsed;

            inserter = new InsertionProcessor(MainInkCanvas, insertionBox);
            pipeline.AddProcessor(inserter);
            pipeline.AddProcessor(new StrikethroughProcessor(MainInkCanvas));
            pipeline.AddProcessor(new ReflowProcessor(MainInkCanvas, true));
            pipeline.AddProcessor(new NavigationProcessor(headings));
            pipeline.AddProcessor(new AutocorrectProcessor(this));
        }
Ejemplo n.º 2
0
 public PipelineAnalyzer(InkAnalyzer inkAnalyzer)
 {
     analyzer                    = this;
     this.inkAnalyzer            = inkAnalyzer;
     inkAnalyzer.ResultsUpdated += InkAnalyzer_ResultsUpdated;
 }
Ejemplo n.º 3
0
 public PipelineAnalyzer(InkAnalyzer inkAnalyzer)
 {
     analyzer = this;
     this.inkAnalyzer = inkAnalyzer;
     inkAnalyzer.ResultsUpdated += InkAnalyzer_ResultsUpdated;
 }