protected void GestureManager_GestureRecognized(object sender, RecognitionEventArgs e) { // Exit if we're teaching if (Properties.Settings.Default.Teaching) return; // Get action to be executed IAction executableAction = Applications.ApplicationManager.Instance.GetAnyDefinedAction(e.GestureName); // Exit if there is no action configured if (executableAction == null) return; // Locate the plugin associated with this action IPluginInfo pluginInfo = FindPluginByClassAndFilename(executableAction.PluginClass, executableAction.PluginFilename); // Exit if there is no plugin available for action if (pluginInfo == null) return; // Load action settings into plugin pluginInfo.Plugin.Deserialize(executableAction.ActionSettings); // Execute plugin process pluginInfo.Plugin.Gestured(new PointInfo(e.CapturePoint)); }
// Define protected method to notifiy subscribers of events protected virtual void OnGestureRecognized(RecognitionEventArgs e) { if (GestureRecognized != null) GestureRecognized(this, e); }