protected internal void UpdateSlideAnimation(int animationStepNum, int numAnimationSteps)
{
// the percentage we need to adjust our height by
// double step = (1 / (double) numAnimationSteps) * animationStepNum;
// replacement by: Joel Holdsworth ([email protected])
// Paolo Messina ([email protected])
// 05/06/2004
// v1.1
double step = (1.0 - Math.Cos(Math.PI * (double) animationStepNum / (double) numAnimationSteps)) / 2.0;
// set the height of the group
this.Height = this.expandedHeight + (int) ((this.slideEndHeight - this.expandedHeight) * step);
if (this.TaskPane != null)
{
this.TaskPane.DoLayout();
}
else
{
// draw the next frame
this.Invalidate();
}
}