Beispiel #1
0
 public string GetMessageToDisplay()
 {
     if (GetCDIn() == false)
     {
         return("NO DISC");
     }
     else if (track < disc.GetNumTracks())
     {
         return($"{state.ToString().ToUpper()}... {disc}" +
                $" Track {track} - {disc[track]}");
     }
     else
     {
         return($"{state.ToString().ToUpper()}... {disc}" +
                $" Track {track} - {disc[track-1]}");
     }
 }
        private void MediaPlayerStop()
        {
            if (CurrentVideoItem == null)
            {
                return;
            }
            CurrentVideoItem.LastPlayedPoisition.ProgressLastSeen = (double)CurrentVideoItem.Progress;
            if (!CurrentVideoItem.HasLastSeen && CurrentVideoItem.Progress > 0)
            {
                LastSeenHelper.AddLastSeen(CurrentVideoItem.ParentDirectory, CurrentVideoItem.LastPlayedPoisition);
            }

            if (mediaState == MediaState.Stopped)
            {
                IVideoElement.MediaPlayer.Stop();
                PlayBackAction(MediaState.ToString());
            }
            CurrentVideoItem.IsActive = false;
            if (IsDirectoryChanged)
            {
                IsDirectoryChanged = false;
                ApplicationService.SaveLastSeenFile(CurrentVideoItem.ParentDirectory);
            }
        }
Beispiel #3
0
 public static string StringValue(this MediaState state) =>
 state.ToString("G").ToLowerInvariant();
Beispiel #4
0
 private async void OnMediaStateChanged(MediaState state)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => CurrentStatus.Text = state.ToString());
 }