protected GestureManager() { Action <bool> loadCompleted = result => { if (!result) { if (!LoadDefaults()) { _Gestures = new List <IGesture>(); } } if (OnLoadGesturesCompleted != null) { OnLoadGesturesCompleted(this, EventArgs.Empty); } FinishedLoading = true; }; LoadGestures().ContinueWith(antecendent => loadCompleted(antecendent.Result)); // Instantiate gesture analyzer using gestures loaded from file gestureAnalyzer = new PointPatternAnalyzer();//Gestures }
protected GestureManager() { if (!LoadGestures()) { _Gestures = new List <IGesture>(); } // Instantiate gesture analyzer using gestures loaded from file gestureAnalyzer = new PointPatternAnalyzer(Gestures); // Wireup event to mouse capture class to catch points captured Input.MouseCapture.Instance.BeforePointsCaptured += new PointsCapturedEventHandler(MouseCapture_BeforePointsCaptured); Input.MouseCapture.Instance.AfterPointsCaptured += new PointsCapturedEventHandler(MouseCapture_AfterPointsCaptured); // Reload gestures if options were saved HighSign.UI.FormManager.Instance.InstanceRequested += (o, e) => { if (e.Instance is HighSign.UI.Forms.Options) { (e.Instance as HighSign.UI.Forms.Options).OptionsSaved += (so, se) => { LoadGestures(); } } ; }; }
protected GestureManager() { LoadingTask = LoadGestures(); // Instantiate gesture analyzer using gestures loaded from file gestureAnalyzer = new PointPatternAnalyzer();//Gestures }