示例#1
0
        public void Apply(uiControl control)
        {
            switch (dir)
            {
            case cPosDir.ABOVE:
                control.moveAbove(target, offset);
                break;

            case cPosDir.BELOW:
                control.moveBelow(target, offset);
                break;

            case cPosDir.LEFT:
                control.moveLeftOf(target, offset);
                break;

            case cPosDir.RIGHT:
                control.moveRightOf(target, offset);
                break;

            case cPosDir.TOP_OF:
                control.alignTop(offset);
                break;

            case cPosDir.BOTTOM_OF:
                control.alignBottom(offset);
                break;

            case cPosDir.LEFT_SIDE_OF:
                control.alignLeftSide(offset);
                break;

            case cPosDir.RIGHT_SIDE_OF:
                control.alignRightSide(offset);
                break;

            case cPosDir.CENTER_X:
                control.CenterHorizontally();
                break;

            case cPosDir.CENTER_Y:
                control.CenterVertically();
                break;

            case cPosDir.SIT_ABOVE:
                control.sitAbove(target, offset);
                break;

            case cPosDir.SIT_BELOW:
                control.sitBelow(target, offset);
                break;

            case cPosDir.SIT_LEFT_OF:
                control.sitLeftOf(target, offset);
                break;

            case cPosDir.SIT_RIGHT_OF:
                control.sitRightOf(target, offset);
                break;
            }
        }