Example #1
0
        private void OnVlcPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e)
        {
            var position    = vlcControl.GetCurrentMedia().Duration.Ticks *e.NewPosition;
            var currentTime = new TimeSpan((long)position);

            try
            {
                UpdateTime(currentTime);
                trackBar.Value = (int)currentTime.TotalMilliseconds;
                Taskbar.SetProgressValue(trackBar.Value, trackBar.Maximum);
            }
            catch (Exception ex)
            {
            }
        }