Example #1
0
 private async void PingPong_OnRemoteDeviceUpdated(object sender, RemoteSystem e)
 {
     await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
     {
         var remoteSystemInfo = RemoteSystemInfoCollection.FirstOrDefault(d => d.Id == e.Id);
         if (remoteSystemInfo != null)
         {
             int index = RemoteSystemInfoCollection.IndexOf(remoteSystemInfo);
             RemoteSystemInfoCollection.RemoveAt(index);
             remoteSystemInfo.RemoteSystem = e;
             RemoteSystemInfoCollection.Insert(index, remoteSystemInfo);
         }
     });
 }