public LeapHandler() { // Create a sample listener and controller _LeapListener = new LeapListener(); _Controller = new Controller(); // Have the sample listener receive events from the controller _Controller.AddListener(_LeapListener); }
/// <summary> /// Constructor for LeapInterface class /// </summary> public LeapInterface() { // Create a listener and controller this.listener = new LeapListener(); this.controller = new Controller(); // Have the sample listener receive events from the controller controller.AddListener(listener); controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES); // Register event handler listener.GestureMade += new EventHandler <GestureEvent>(ProcessGesture); }