void LoadCircleGestureDetector() { Stream recordStream = File.Open(circleKBPath, FileMode.OpenOrCreate); circleGestureRecognizer = new TemplatedGestureDetector("Circle", recordStream); circleGestureRecognizer.TraceTo(gesturesCanvas, Colors.Red); circleGestureRecognizer.OnGestureDetected += OnGestureDetected; templates.ItemsSource = circleGestureRecognizer.LearningMachine.Paths; }
//new gesture Step7: create new method of Load Gesture Detector void LoadPigtailGestureDetector() { Stream recordStream = File.Open(pigtailKBPath, FileMode.OpenOrCreate); pigtailGestureRecognizer = new TemplatedGestureDetector("Pigtail", recordStream); pigtailGestureRecognizer.TraceTo(gesturesCanvas, Colors.Pink); pigtailGestureRecognizer.OnGestureDetected += OnGestureDetected; //templates.ItemsSource = pigtailGestureRecognizer.LearningMachine.Paths; }
void LoadStarGestureDetector() { Stream recordStream = File.Open(starKBPath, FileMode.OpenOrCreate); starGestureRecognizer = new TemplatedGestureDetector("Star", recordStream); starGestureRecognizer.TraceTo(gesturesCanvas, Colors.Blue); starGestureRecognizer.OnGestureDetected += OnGestureDetected; //templates.ItemsSource = starGestureRecognizer.LearningMachine.Paths; }
void LoadCheckGestureDetector() { Stream recordStream = File.Open(checkKBPath, FileMode.OpenOrCreate); checkGestureRecognizer = new TemplatedGestureDetector("Check", recordStream); checkGestureRecognizer.TraceTo(gesturesCanvas, Colors.Green); checkGestureRecognizer.OnGestureDetected += OnGestureDetected; //templates.ItemsSource = checkGestureRecognizer.LearningMachine.Paths; }