コード例 #1
0
        internal protected override bool Run()
        {
            float dx = destx - curx;
            float dy = desty - cury;

            dx = dx / 4;
            dy = dy / 4;

            curx += dx;
            cury += dy;

            panel.Move(widget, (int)curx, (int)cury);

            if (Math.Abs(dx) < 0.1 && Math.Abs(dy) < 0.1)
            {
                panel.Move(widget, (int)destx, (int)desty);
                return(false);
            }
            else
            {
                return(true);
            }
        }