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); } }
/// <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 OnOnMediaLoaded(object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs) { MediaControlsContainer.IsEnabled = true; Player.GetComponent <StateComponent>( ).Play( ); }
private void MediaOnOnMediaLoaded(object Sender, OnMediaLoadedEventArgs MediaLoadedEventArgs) { this.TimeLabel_Total.Content = MediaLoadedEventArgs.MediaFile.Duration.ToString(TimeFormat); }