Ejemplo n.º 1
0
        public void Pair(ControlData data)
        {
            this.data = data;

            Console.WriteLine("Starting..");

            deviceProvider = DeviceProviderRegistry.CreateSupportedDeviceProvider();
            Console.WriteLine("Found provider: " + deviceProvider.ToString());

            deviceProvider.DeviceFound += DeviceFound;
            deviceProvider.DeviceLost  += DeviceLost;

            Console.WriteLine("Discovering device...");

            deviceProvider.StartDiscovering();
        }
Ejemplo n.º 2
0
        public Gui()
        {
            data = new ControlData();
            //controller (data);

            input            = new BoardInput();
            input.connected += (sender, e) => {
                UpdateStatus("Connected");
            };

            input.disconnected += (sender, e) => {
                UpdateStatus("Disconnected");
            };

            Application.Init();

            SetupUI();

            Application.Run();
        }