Beispiel #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Tag         = 1;
            tbTimeline.Maximum = (int)(MediaPlayer1.Duration_Time() / 1000);

            var positionMS = MediaPlayer1.Position_Get_Time();

            int value = (int)(positionMS / 1000);

            if ((value > 0) && (value < tbTimeline.Maximum))
            {
                tbTimeline.Value = value;
            }

            lbTime.Text = MediaPlayerCore.Helpful_SecondsToTimeFormatted(tbTimeline.Value) + "/" + MediaPlayerCore.Helpful_SecondsToTimeFormatted(tbTimeline.Maximum);

            if (cdg != null)
            {
                if (cdg.renderAtPosition(positionMS))
                {
                    imgScreen.Image = cdg.RGBImage();
                }
            }

            timer1.Tag = 0;
        }
Beispiel #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Tag         = 1;
            tbTimeline.Maximum = (int)MediaPlayer1.Duration_Time().TotalSeconds;

            if ((MediaPlayer1.Position_Get_Time().TotalSeconds > 0) && (MediaPlayer1.Position_Get_Time().TotalSeconds < tbTimeline.Maximum))
            {
                tbTimeline.Value = (int)MediaPlayer1.Position_Get_Time().TotalSeconds;
            }

            lbTime.Text = MediaPlayerCore.Helpful_SecondsToTimeFormatted(tbTimeline.Value) + "/" + MediaPlayerCore.Helpful_SecondsToTimeFormatted(tbTimeline.Maximum);

            if (cdg != null)
            {
                if (cdg.renderAtPosition((long)MediaPlayer1.Position_Get_Time().TotalMilliseconds))
                {
                    imgScreen.Image = cdg.RGBImage();
                }
            }

            timer1.Tag = 0;
        }