Esempio n. 1
0
        protected override void OnStylusMove(RawStylusInput rawStylusInput)
        {
            base.OnStylusMove(rawStylusInput);
            //collect the stylus point
            StylusPointCollection tempStylusPoints = rawStylusInput.GetStylusPoints();

            //if there are no points in the collection
            if (tempStylusPoints.Count <= 0)
            {
                return;
            }
            ExpertStylusPoint = ReturnExpertStylusPoint(tempStylusPoints, ExpertStylusPoint, ExpertStroke);
            Debug.WriteLine("ExpertStylusPoint Index: " + ExpertStroke.StylusPoints.IndexOf(ExpertStylusPoint));
            rawStylusInput.NotifyWhenProcessed(tempStylusPoints);
        }
Esempio n. 2
0
        // Collect the points as the user draws the stroke.
        protected override void OnStylusUp(RawStylusInput rawStylusInput)
        {
            // Check whether the stylus that started the stroke is the same, and
            // that the element hasn't lost focus since the stroke began.
            if (points != null && currentStylus == rawStylusInput.StylusDeviceId)
            {
                points.Add(rawStylusInput.GetStylusPoints());

                // Subscribe to the OnStylusUpProcessed method.
                rawStylusInput.NotifyWhenProcessed(points);
            }

            points        = null;
            currentStylus = 0;
        }
Esempio n. 3
0
        protected override void OnStylusUp(RawStylusInput rawStylusInput)
        {
            // Run the base class before modifying the data
            base.OnStylusUp(rawStylusInput);

            if (currentStylus == rawStylusInput.StylusDeviceId)
            {
                StylusPointCollection pointsFromEvent = rawStylusInput.GetStylusPoints();

                // Restrict the stylus input and add the filtered
                // points to collectedPoints.
                StylusPointCollection points = FilterPackets(pointsFromEvent);
                rawStylusInput.SetStylusPoints(points);
                collectedPoints.Add(points);

                // Subscribe to the OnStylusUpProcessed method.
                rawStylusInput.NotifyWhenProcessed(collectedPoints);

                currentStylus = -1;
            }
        }
Esempio n. 4
0
        //</Snippet18>

        protected override void OnStylusUp(RawStylusInput rawStylusInput)
        {
            base.OnStylusUp(rawStylusInput);

            rawStylusInput.NotifyWhenProcessed(null);
        }
Esempio n. 5
0
 protected override void OnStylusDown(RawStylusInput rawStylusInput)
 {
     Down(rawStylusInput.StylusDeviceId, rawStylusInput.Timestamp, rawStylusInput.GetStylusPoints());
     rawStylusInput.NotifyWhenProcessed(rawStylusInput.StylusDeviceId);
     base.OnStylusDown(rawStylusInput);
 }