private async void SetStateFromServerResponse(LightServerResponse response)
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
         () =>
         {
             RelayDevices.Single(i => i.Type == response.Type).IsOn = response.StateTo == ELightState.TurnOn;
         }
     );
 }
Ejemplo n.º 2
0
 private async Task InformAboutChangedState(LightServerResponse response)
 {
     try
     {
         if (HubConnection.State == ConnectionState.Connected)
         {
             await HubProxy.Invoke(EHubMethod.LightInformAboutChangedState.GetServerName(), response);
         }
     }
     catch (Exception ex)
     {
         //TODO            
     }
 }
Ejemplo n.º 3
0
 private void ShowLightInformationReceivedFromServer(LightServerResponse response)
 {
     Messenger.Default.Send(new NotificationMessage<LightServerResponse>(response, string.Empty));
 }