예제 #1
0
        private void OnOnMediaLoaded(object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs)
        {
            string mediaName     = Path.GetFileNameWithoutExtension(MediaLoadedEventArgs.MediaFile.File.FullName);
            string subtitlesPath = Path.Combine(MediaLoadedEventArgs.MediaFile.File.DirectoryName, mediaName + ".srt");

            FileInfo subtitlesInfo = new FileInfo(subtitlesPath);

            if (subtitlesInfo.Exists)
            {
                this.LoadSubtitles(subtitlesInfo.FullName);
            }
        }
예제 #2
0
 /// <summary>
 /// Calls the <see cref="MediaLoaded"/> event.
 /// </summary>
 /// <param name="args">The event args.</param>
 protected virtual void OnMediaLoaded(OnMediaLoadedEventArgs args)
 {
     Media = args.MediaFile;
     MediaLoaded?.Invoke(this, args);
 }
예제 #3
0
        private void OnOnMediaLoaded(object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs)
        {
            MediaControlsContainer.IsEnabled = true;

            Player.GetComponent <StateComponent>( ).Play( );
        }
예제 #4
0
 private void MediaOnOnMediaLoaded(object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs)
 {
     this.TimeLabel_Total.Content = MediaLoadedEventArgs.MediaFile.Duration.ToString(TimeFormat);
 }