src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/Sprocket/SprocketControl.cs
/// <summary>
/// Handles the Elapsed event of the renderTimer
/// </summary>
/// <param name="sender">Sender</param>
/// <param name="e">EventArgs</param>
Handles the Elapsed event of the renderTimer
Handles the Elapsed event of the renderTimer
void OnRenderTimerElapsed(object sender, ElapsedEventArgs e)
    {
      this.Dispatcher.BeginInvoke(new Action(() =>
      {
        if (Rotation == Direction.CLOCKWISE)
        {
          renderStartAngle += angleIncrement;
          if (renderStartAngle >= 360)
            renderStartAngle -= 360;
        }
        else if (Rotation == Direction.ANTICLOCKWISE)
        {
          renderStartAngle -= angleIncrement;
          if (renderStartAngle <= -360)
            renderStartAngle += 360;
        }
        InvalidateVisual();
      }));
    }
void OnRenderTimerElapsed ( object sender , ElapsedEventArgs e ) { this . Dispatcher . BeginInvoke ( new Action ( ( ) => { if ( Rotation == Direction . CLOCKWISE ) { renderStartAngle += angleIncrement ; if ( renderStartAngle >= 360 ) renderStartAngle -= 360 ; } else if ( Rotation == Direction . ANTICLOCKWISE ) { renderStartAngle -= angleIncrement ; if ( renderStartAngle <= - 360 ) renderStartAngle += 360 ; } InvalidateVisual ( ) ; } ) ) ; }
Handles the Elapsed event of the renderTimer
Handles the Elapsed event of the renderTimer
// Force re-rendering of control
sender
object
None
e
ElapsedEventArgs
None