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(); }
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(); }