Beispiel #1
0
        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.");
            }
        }
Beispiel #2
0
 public void Removed(IRemoteSystemDescription description)
 {
     var ignored = DispatcherHelper.ExecuteOnUIThreadAsync(() => _viewModel.RemoteSystems.Remove(description));
 }
Beispiel #3
0
        public async Task <IRemoteConnection> CreateRemoteControl(IRemoteSystemDescription remoteSystem)
        {
            IRemoteConnection remoteControl = await remoteSystem.PlayTo();

            return(remoteControl);
        }