Exemple #1
0
        public StrokeInkAnalyzer(SurfaceInkCanvas inkHost, IShapeHost host)
        {
            this.drawingHost    = host;
            this.theInkAnalyzer = new System.Windows.Ink.InkAnalyzer();
            this.inkCanvas      = inkHost;

            this.inkCanvas.StrokeCollected        += inkHost_StrokeCollected;
            this.inkCanvas.Strokes.StrokesChanged += Strokes_StrokesChanged;
            theInkAnalyzer.ResultsUpdated         += theInkAnalyzer_ResultsUpdated;

            IsWork = false;
        }
        public MainWindow()
        {
            // Autogenerated UI Initialization code which instantiates and
            // builds the UI.
            InitializeComponent();

            // Create a new InkAnalyzer.
            this.analyzer = new InkAnalyzer(this.Dispatcher);

            // Initialize programatically generated UI Elements (hint
            // rectangles and text boxes).
            this.Loaded += new RoutedEventHandler(MainWindowLoaded);
        }