private void RemoteSystemWatcher_RemoteSystemRemoved(RemoteSystemWatcher sender, RemoteSystemRemovedEventArgs args) { var remoteSystem = _remoteSystems.Where(s => s.Id == args.RemoteSystemId).FirstOrDefault(); if (remoteSystem != null) { _remoteSystems.Remove(remoteSystem); } var system = _availableRemoteSystems.Where(s => s.RemoteSystem.Id == args.RemoteSystemId).FirstOrDefault(); if (system != null) { var t = Helpers.RunOnCoreDispatcherIfPossible(() => { _availableRemoteSystems.Remove(system); RemoteSystemRemoved?.Invoke(this, system); }); } }
internal void InvokeRemoteSystemRemoved(string remoteSystemId) { RemoteSystemRemoved?.Invoke(this, new RemoteSystemRemovedEventArgs(remoteSystemId)); }
private void RemoteSystemWatcher_RemoteSystemRemoved(RemoteSystemWatcher watcher, RemoteSystemRemovedEventArgs args) { System.Diagnostics.Debug.WriteLine("KNOWZY: RemoteSystemRemoved " + args.P0); remoteSystems.RemoveAll(system => system.Id == args.P0); RemoteSystemRemoved?.Invoke(this, args); }