public LeapInterface()
        {
            listener = new LeapListener();
            controller = new Controller();
            controller.SetPolicyFlags(Controller.PolicyFlag.POLICYBACKGROUNDFRAMES);

            Start();
        }
예제 #2
0
        public static void Main()
        {
            // Create a sample listener and controller
            var listener = new LeapListener();
            var controller = new Controller();

            // Have the sample listener receive events from the controller
            controller.AddListener(listener);

            // Keep this process running until Enter is pressed
            Console.WriteLine("Press Enter to quit...");
            Console.ReadLine();

            // Remove the sample listener when done
            controller.RemoveListener(listener);
            controller.Dispose();
        }