Esempio n. 1
0
 private void ChangeDialPosition(object sender, MouseEventArgs e)
 {
     if (dialWasClicked)
     {
         if (e.LeftButton == MouseButtonState.Pressed)
         {
             this.Angle          = Dial.GetAngle(e.GetPosition(DialElement), DialElement.RenderSize);
             RotateElement.Angle = this.Angle;
             if (RotateDialForward() || DialOnZeroFwd())
             {
                 DialValue.Text = (++currentFrame).ToString();
                 previousAngle  = (int)(Angle / 360 * 10) % 10;
                 VideoDisplay.NextFrame();
             }
             else if ((RotateDialBackwards() || DialOnZeroBack()) && (currentFrame - 1) >= 0)
             {
                 DialValue.Text = (--currentFrame).ToString();
                 previousAngle  = (int)(Angle / 360 * 10) % 10;
                 VideoDisplay.PrevFrame();
             }
         }
     }
 }
Esempio n. 2
0
 private void PrevFrame(object sender, RoutedEventArgs e)
 {
     VideoDisplay.PrevFrame();
     currentFrame--;
     DialValue.Text = currentFrame.ToString();
 }