private void SetColor(Color newColor, Manager manager) { try { manager.BlyncLight.StatusColor = newColor; DeviceCommunication.SendEvent(deviceClient, "Color=" + newColor.ToString()); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error: " + ex.Message); } }
private async void InitializeDevice() { try { var manager = new BlyncLight.Manager(); await manager.Init(); blyncManager = manager; deviceClient = DeviceCommunication.InitializeDeviceCommunication(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error: " + ex.Message); } }