Esempio n. 1
0
 void AddText(Gesturizer g, double x, double y)
 {
     _text                  = new TextBox();
     _text.Text             = Prompt;
     _text.IsHitTestVisible = false;
     _text.BorderBrush      = Brushes.Transparent;
     _text.RenderTransform  = new TranslateTransform(x, y);
     g.Children.Add(_text);
 }
Esempio n. 2
0
        public Gesturizer.Result Process(Gesturizer g, Stroq s, bool onlyPartial, List <Stroq> prev)
        {
            if (onlyPartial)
            {
                return(Gesturizer.Result.Unrecognized);
            }
            if (Test(s))
            {
                return(Gesturizer.Result.Recognized);
            }

            return(Gesturizer.Result.Unrecognized);
        }
Esempio n. 3
0
        public Gesturizer.Result Process(Gesturizer g, Stroq s, bool onlyPartial, List <Stroq> prev)
        {
            if (OneStroke)
            {
                if (onlyPartial)
                {
                    return(Gesturizer.Result.Unrecognized);
                }
                if (Test1(s))
                {
                    return(Gesturizer.Result.Recognized);
                }

                return(Gesturizer.Result.Unrecognized);
            }
            else
            {
                if (_text != null)
                {
                    ClearText(g);
                }
                if (onlyPartial && prev.Count == 1 && Test1(prev[0]) && Test2(s, prev[0]))
                {
                    return(Gesturizer.Result.Recognized);
                }
                if (!onlyPartial && Test1(s))
                {
                    if (g.Canvas != null)
                    {
                        AddText(g, s.GetBounds().Left, s.GetBounds().Top);
                    }
                    return(Gesturizer.Result.Partial);
                }
            }

            return(Gesturizer.Result.Unrecognized);
        }
Esempio n. 4
0
 public void Reset(Gesturizer g)
 {
     ClearText(g);
 }
Esempio n. 5
0
 void ClearText(Gesturizer g)
 {
     g.Children.Remove(_text);
     _text = null;
 }
Esempio n. 6
0
 public void Reset(Gesturizer g)
 {
 }