Step() 공개 정적인 메소드

public static Step ( float from_value, float to_value, float speed ) : float
from_value float
to_value float
speed float
리턴 float
예제 #1
0
        private void ApplicationOnUpdateEvent()
        {
            if (updatePos == false && Style != ProgressBarStyle.Marquee)
            {
                return;
            }

            if (Style == ProgressBarStyle.Marquee)
            {
                barWidth = marqueeWidth;
                if (barX < Width)
                {
                    barX = MathHelper.Step(barX, Width, marqueeSpeed / 2f);
                }
                else
                {
                    barX = -marqueeWidth;
                }
                return;
            }

            barX      = 0;
            barWidth  = (value / (float)maximum) * Width;
            updatePos = false;
        }
예제 #2
0
            protected override void OnPaint(PaintEventArgs e)
            {
                base.OnPaint(e);

                if (currentY < 0)
                {
                    currentY         = MathHelper.Step(currentY, 0, 240);
                    listBox.Location = new Point(0, (int)currentY);
                }
            }