private async void Mtc_RemoteSystemSelected(object sender, IRemoteSystemDescription eventArgs) { RemoteControl remote = new RemoteControl(); IRemoteConnection remoteConnection = await ViewModel.CreateRemoteControl(eventArgs); if (remoteConnection != null) { remote.RemoteConnection = remoteConnection; RemoteControlPopup.Content = remote; remote.CloseClicked += (s, ev) => RemoteControlPopup.Hide(); var result = await RemoteControlPopup.ShowAsync(); } else { await UIHelpers.ShowContentAsync("Connection failed."); } }
public void Removed(IRemoteSystemDescription description) { var ignored = DispatcherHelper.ExecuteOnUIThreadAsync(() => _viewModel.RemoteSystems.Remove(description)); }
public async Task <IRemoteConnection> CreateRemoteControl(IRemoteSystemDescription remoteSystem) { IRemoteConnection remoteControl = await remoteSystem.PlayTo(); return(remoteControl); }