Beyond_Beyaan.BBStretchButton.MoveTo C# (CSharp) Метод

MoveTo() публичный Метод

public MoveTo ( int x, int y ) : void
x int
y int
Результат void
        public void MoveTo(int x, int y)
        {
            _xPos = x;
            _yPos = y;
            switch (_alignment)
            {
                case ButtonTextAlignment.LEFT:
                    _label.MoveTo(_xPos + 5, (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
                case ButtonTextAlignment.CENTER:
                    _label.MoveTo((int)((_width / 2.0f) - (_label.GetWidth() / 2) + _xPos), (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
                case ButtonTextAlignment.RIGHT:
                    _label.MoveTo((int)(_xPos + _width - 5 - _label.GetWidth()), (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
            }
            _backgroundImage.MoveTo(x, y);
            _foregroundImage.MoveTo(x, y);
        }