Beispiel #1
0
        private void OnTimeChanged(object sender, AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEvent e)
        {
            try
            {
                if (labelPosition.InvokeRequired)
                {
                    labelPosition.Invoke(new UpdateTime(OnTimeChanged), new object[] { sender, e });
                }
                else
                {
                    labelPosition.Text = "Current position: " + e.time.ToString() + " ms - total length: " + axVLCPlugin21.input.Length.ToString("f0") + " ms - position: " + axVLCPlugin21.input.Position.ToString("f2");;

                    if (axVLCPlugin21.input.Length > 0)
                    {
                        trackBarPosition.Maximum = 100;
                        trackBarPosition.Value   = (int)(axVLCPlugin21.input.Position * 100.0);
                    }
                    update = true;
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #2
0
        private void AxVLCPlugin21_MediaPlayerTimeChanged(object sender, AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEvent e)
        {
            var time = new  TimeSpan(0, 0, 0, 0, e.time);

            this.Text = time.ToString(@"hh\:mm\:ss");
        }
Beispiel #3
0
 private void axVLCPlugin21_MediaPlayerTimeChanged(object sender, AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEvent e)
 {
     trackBar1.Value = e.time;
 }