private void DevicesWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { var updateTask = this.dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { devicesList.Add(args.RemoteSystem); }); }
private void OnWatcherRemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { DispatcherHelper.UIDispatcher.RunIdleAsync(_ => { RemoteSystems.Add(args.RemoteSystem); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { if (!deviceMap.ContainsKey(args.RemoteSystem.Id)) { await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Devices.Add(args.RemoteSystem)); deviceMap[args.RemoteSystem.Id] = args.RemoteSystem; } }
private void RemoteSystemAdded(RemoteSystemWatcher watcher, RemoteSystemAddedEventArgs args) { MainActivity.RunOnUiThread(delegate { RemoteSystems.Add(new RemoteSystemInfo { DisplayName = args.P0.DisplayName, Id = args.P0.Id, Kind = args.P0.Kind.ToString() }); }); }
private static void _watcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { var remoteSystem = args.RemoteSystem; Events.TrackEvent(Events.RemoteSystemAdded); RemoteSystemList.Add(remoteSystem); DebugWrite( $"RemoteSystemAdded: {remoteSystem.DisplayName} {remoteSystem.Id} {remoteSystem.IsAvailableByProximity} {remoteSystem.Kind} {remoteSystem.Status}"); OnRemoteDeviceAdded?.Invoke(null, remoteSystem); }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { CompanionDevice d = new CompanionDevice(args.RemoteSystem.Id, true, args.RemoteSystem.DisplayName, string.Empty, args.RemoteSystem.Kind); if ((d != null) && (listCompanionDevices != null) && (listRemoteSystems != null)) { d.IsAvailableByProximity = args.RemoteSystem.IsAvailableByProximity; // Anniversary issue // d.IsAvailableBySpatialProximity = args.RemoteSystem.IsAvailableBySpatialProximity; d.Status = CompanionDeviceStatus.Available; if (listCompanionDevices.ContainsKey(args.RemoteSystem.Id)) { listCompanionDevices.Remove(args.RemoteSystem.Id); } listCompanionDevices.Add(args.RemoteSystem.Id, d); OnDeviceAdded(this, d); if (listRemoteSystems.ContainsKey(args.RemoteSystem.Id)) { listRemoteSystems.Remove(args.RemoteSystem.Id); } listRemoteSystems.Add(args.RemoteSystem.Id, args.RemoteSystem); } }
private void RemoteSystemWatcherOnRemoteSystemAdded(RemoteSystemWatcher watcher, RemoteSystemAddedEventArgs args) { _remoteSystems.Add(args.P0); RunOnUiThread(() => _adapter.Add(args.P0.DisplayName)); }
private async void Watcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => Devices.Add(args.RemoteSystem)); }
private static void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { remoteSystems.Add(args.RemoteSystem); updateSystems(); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { _progressRing.IsActive = true; RemoteSystems.Add(args.RemoteSystem); DeviceMap.Add(args.RemoteSystem.Id, args.RemoteSystem); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await DispatcherQueue.EnqueueAsync(() => { RemoteSystems.Add(args.RemoteSystem); }); }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { waitHandle.Set(); m_deviceList.Add(args.RemoteSystem); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { DeviceList.Add(args.RemoteSystem); DeviceMap.Add(args.RemoteSystem.Id, args.RemoteSystem); //UpdateStatus(string.Format("Found {0} devices.", deviceList.Count), NotifyType.StatusMessage); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { dataList.Add(args.RemoteSystem); SystemList.ItemsSource = dataList; }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { var remoteSystem = args.RemoteSystem; await DispatcherEx.RunOnCoreDispatcherIfPossible(() => { var existingRs = _remoteSystems.FirstOrDefault(x => x.Id == remoteSystem.Id); if (existingRs != null) { _remoteSystems.Remove(existingRs); } AddToRemoteSystemsList(args.RemoteSystem); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { RemoteSystems.Add(args.RemoteSystem); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { _remoteSystems.Add(args.RemoteSystem); var system = await AdventureRemoteSystem.CreateAdventureRemoteSystem(args.RemoteSystem).ConfigureAwait(false); if (system != null) { var t = Helpers.RunOnCoreDispatcherIfPossible(() => { if (_availableRemoteSystems.Where(s => s.RemoteSystem.Id == system.RemoteSystem.Id).Count() == 0) { _availableRemoteSystems.Add(system); RemoteSystemAdded?.Invoke(this, system); } }); } }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher watcher, RemoteSystemAddedEventArgs args) { var remoteSystem = args.P0; var existingRs = RemoteSystems.FirstOrDefault(x => x.Id == remoteSystem.Id); if (existingRs != null) { RemoteSystems.Remove(existingRs); } AddToRemoteSystemsList(remoteSystem); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { m_rootPage.deviceList.Add(args.RemoteSystem); m_rootPage.deviceMap.Add(args.RemoteSystem.Id, args.RemoteSystem); UpdateStatus(string.Format("Found {0} devices.", m_rootPage.deviceList.Count), NotifyType.StatusMessage); }); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await DispatcherHelper.ExecuteOnUIThreadAsync(() => { RemoteSystems.Add(args.RemoteSystem); }); }
private void RemoteSystemWatcherOnRemoteSystemAdded(RemoteSystemWatcher watcher, RemoteSystemAddedEventArgs args) { RunOnUiThread(() => _adapter.Add(args.P0)); }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { systemList.Add(args.RemoteSystem); RemoteSystemsListUpdated?.Invoke(this, EventArgs.Empty); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { if (DeviceList != null) { await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { DeviceList.Add(new DeviceDetails() { DeviceName = args.RemoteSystem.DisplayName, UniqueId = args.RemoteSystem.Id, Type = RemoteSystemHelper.ConvertToDeviceType(args.RemoteSystem.Kind), StatusMessage = RemoteSystemHelper.GetStatusMessage(args.RemoteSystem.Status, args.RemoteSystem.Id), Credential = DatabaseHelper.GetKey(args.RemoteSystem.Id), RemoteSys = args.RemoteSystem }); RaisePropertyChanged("ShowEmptyErrorMessage"); }); } else { await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { DeviceList = new ObservableCollection <DeviceDetails>(); DeviceList.Add(new DeviceDetails() { DeviceName = args.RemoteSystem.DisplayName, UniqueId = args.RemoteSystem.Id, Type = RemoteSystemHelper.ConvertToDeviceType(args.RemoteSystem.Kind), StatusMessage = RemoteSystemHelper.GetStatusMessage(args.RemoteSystem.Status, args.RemoteSystem.Id), Credential = DatabaseHelper.GetKey(args.RemoteSystem.Id), RemoteSys = args.RemoteSystem }); RaisePropertyChanged("ShowEmptyErrorMessage"); }); } }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { m_rootPage.systemList.Add(args.RemoteSystem); m_rootPage.systemMap.Add(args.RemoteSystem.Id, args.RemoteSystem); UpdateStatus(string.Format("Found {0} systems.", m_rootPage.systemList.Count), NotifyType.StatusMessage); }); }
private async void M_remoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { RemoteSystems.Add(args.RemoteSystem); }); }
private void RemoteSystemWatcher_RemoteSystemAdded( RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { m_deviceList.Add(args.RemoteSystem); m_deviceMap.Add(args.RemoteSystem.Id, args.RemoteSystem); }
private async void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args) { if (!deviceMap.ContainsKey(args.RemoteSystem.Id)) { await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Devices.Add(args.RemoteSystem)); deviceMap[args.RemoteSystem.Id] = args.RemoteSystem; } }
private void RemoteSystemWatcher_RemoteSystemAdded(RemoteSystemWatcher watcher, RemoteSystemAddedEventArgs args) { System.Diagnostics.Debug.WriteLine($"KNOWZY: RemoteSystemAdded: {args.P0.DisplayName} + ({args.P0.Id})"); remoteSystems.Add(args.P0); RemoteSystemAdded?.Invoke(this, args); }