Beispiel #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 );
        }
Beispiel #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 );
 }
 private void MediaOnOnMediaLoaded( object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs )
 {
     this.TimeLabel_Total.Content = MediaLoadedEventArgs.MediaFile.Duration.ToString( TimeFormat );
 }
Beispiel #4
0
        private void OnOnMediaLoaded( object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs )
        {
            MediaControlsContainer.IsEnabled = true;

            Player.GetComponent<StateComponent>( ).Play( );
        }