public uint Initialize() { PhilipsHueController.Prompt += PhilipsHueController_Prompt; PhilipsHueController.CompletedInit += PhilipsHueController_CompletedInit; bool ret = PhilipsHueController.Init(); return(ERROR_SUCCESS); }
private bool PhilipsHueController_Prompt() { var dispatcher = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher; bool ret = false; dispatcher.RunAsync(CoreDispatcherPriority.High, async() => { var messageDialog = new MessageDialog(PRESS_BUTTON_MESSAGE); await messageDialog.ShowAsync(); PhilipsHueController.Init(); }); return(true); }