Пример #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                var dur = FFplay.ffplay_get_duration();


                var state = FFplay.ffplay_get_state();
                if (state == 1)
                {
                    buttonPause.Text = dfv.lang.dat.Pause;
                }
                else
                {
                    buttonPause.Text = dfv.lang.dat.Play;
                }

                var time = FFplay.ffplay_get_position();
                labelTime.Text = dfv.timeToStr2(time) + " / " + dfv.timeToStr2(dur);

                if (dur < 1 || isDragging || state == 0)
                {
                    return;
                }


                myProgressBar1.setValue((int)(time * 1000 / dur));
            }
            catch (Exception err)
            {
                timer1.Stop();
                dfv.msgERR(err.Message);
            }
        }
Пример #2
0
 private void panel1_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Delta > 0)
     {
         FFplay.ffplay_set_position(FFplay.ffplay_get_position() - jumpPos);
     }
     else
     {
         FFplay.ffplay_set_position(FFplay.ffplay_get_position() + jumpPos);
     }
 }
Пример #3
0
 private void FormPlayer_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Space)
     {
         FFplay.ffplay_toggle_pause();
         e.Handled = true;
     }
     else if (e.KeyCode == Keys.F)
     {
         FFplay.ffplay_step_to_next_frame();
         e.Handled = true;
     }
     else if (e.KeyCode == Keys.Left)
     {
         FFplay.ffplay_set_position(FFplay.ffplay_get_position() - jumpPos);
         e.Handled = true;
     }
     else if (e.KeyCode == Keys.Right)
     {
         FFplay.ffplay_set_position(FFplay.ffplay_get_position() + jumpPos);
         e.Handled = true;
     }
 }
Пример #4
0
 private void copytimestapToolStripMenuItem_Click(object sender, EventArgs e)
 {
     dfv.SetClipboard(dfv.timeToStr2(FFplay.ffplay_get_position(), false));
 }
Пример #5
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     selectedTime = dfv.timeToStr2(FFplay.ffplay_get_position(), false);
     this.Close();
 }