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); }
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); }
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); }
public void Reset(Gesturizer g) { ClearText(g); }
void ClearText(Gesturizer g) { g.Children.Remove(_text); _text = null; }
public void Reset(Gesturizer g) { }