private void RemoteSystemWatcher_RemoteSystemUpdated(RemoteSystemWatcher sender, RemoteSystemUpdatedEventArgs args) { var system = systemList.FirstOrDefault(x => x.Id == args.RemoteSystem.Id); if (system != null) { systemList[systemList.IndexOf(system)] = args.RemoteSystem; App.Dispatcher.RunWhenIdleAsync(() => { RemoteSystemsListUpdated?.Invoke(this, EventArgs.Empty); }); } }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { systemList.Add(args.RemoteSystem); RemoteSystemsListUpdated?.Invoke(this, EventArgs.Empty); }
private void RemoteSystemWatcher_RemoteSystemRemoved(RemoteSystemWatcher sender, RemoteSystemRemovedEventArgs args) { systemList.Remove(systemList.First(x => x.Id == args.RemoteSystemId)); RemoteSystemsListUpdated?.Invoke(this, EventArgs.Empty); }