Ejemplo n.º 1
0
        /// <summary>
        ///     This function controls the button events from UVC.
        ///     This code if not run in background process, will not be able to handle button pressed events when app is suspended.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void smtc_ButtonPressed(SystemMediaTransportControls sender,
                                        SystemMediaTransportControlsButtonPressedEventArgs args)
        {
            switch (args.Button)
            {
            case SystemMediaTransportControlsButton.Play:
                Debug.WriteLine("UVC play button pressed");
                PlayPressed?.Invoke(this, null);
                break;

            case SystemMediaTransportControlsButton.Pause:
                Debug.WriteLine("UVC pause button pressed");
                PausePressed?.Invoke(this, null);
                break;

            case SystemMediaTransportControlsButton.Next:
                Debug.WriteLine("UVC next button pressed");
                NextPressed?.Invoke(this, null);
                break;

            case SystemMediaTransportControlsButton.Previous:
                Debug.WriteLine("UVC previous button pressed");
                PrevPressed?.Invoke(this, null);
                break;
            }
        }
Ejemplo n.º 2
0
 public void NextClicked()
 {
     if (NextPressed != null)
     {
         NextPressed.Invoke(selectedValue);
     }
 }
Ejemplo n.º 3
0
        private void SystemMediaTransportControls_ButtonPressed(SystemMediaTransportControls sender, SystemMediaTransportControlsButtonPressedEventArgs args)
        {
            switch (args.Button)
            {
            case SystemMediaTransportControlsButton.Play:
                PlayPressed?.Invoke();
                break;

            case SystemMediaTransportControlsButton.Pause:
                PausePressed?.Invoke();
                break;

            case SystemMediaTransportControlsButton.Next:
                NextPressed?.Invoke();
                break;

            case SystemMediaTransportControlsButton.Previous:
                PreviousPressed?.Invoke();
                break;

            default:
                break;
            }
        }