Exemple #1
0
        private void FormPlayer_Load(object sender, EventArgs e)
        {
            imageCroppingBox1._Image = pictureBox1;
            imageCroppingBox1.onMove = me =>
            {
                showCropInfo();
            };

            labelTime.Text = "";
            this.myProgressBar1.addControlMove(labelTime);
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseWheel);

            myProgressBar1.onMove = () =>
            {
                isDragging = true;

                FFplay.ffplay_set_position(FFplay.ffplay_get_duration() * myProgressBar1.Value / myProgressBar1.Maximum);
            };

            myProgressBar1.onUp = () =>
            {
                isDragging = false;
            };

            if (onLoad != null)
            {
                this.BeginInvoke(onLoad);
            }
        }
Exemple #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);
     }
 }
Exemple #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;
     }
 }