コード例 #1
0
        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);
                });
            }
        }
コード例 #2
0
 internal void InvokeRemoteSystemRemoved(string remoteSystemId)
 {
     RemoteSystemRemoved?.Invoke(this, new RemoteSystemRemovedEventArgs(remoteSystemId));
 }
コード例 #3
0
 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);
 }