예제 #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();
             }
         }
     }
 }
예제 #2
0
 private void NextFrame(object sender, RoutedEventArgs e)
 {
     VideoDisplay.NextFrame();
     currentFrame++;
     DialValue.Text = currentFrame.ToString();
 }