Esempio n. 1
0
        /// <summary>
        /// get diff caused by placement according to coordinate
        /// </summary>
        /// <param name="coord"></param>
        /// <returns></returns>
        private int PlacementDif(COORDINATE coord)
        {
            int placementDiff = 0;
            int dx;

            switch (coord)
            {
            case COORDINATE.LEFT:
                placementDiff = coordinator.getPlacementDif(PlacementDim.PLACE_X);
                if (containerRightToLeft)
                {
                    dx             = coordinator.getPlacementDif(PlacementDim.PLACE_DX);
                    placementDiff -= dx;
                }
                break;

            case COORDINATE.RIGHT:
                placementDiff = coordinator.getPlacementDif(PlacementDim.PLACE_X);
                if (!containerRightToLeft)
                {
                    dx             = coordinator.getPlacementDif(PlacementDim.PLACE_DX);
                    placementDiff += dx;
                }
                break;

            case COORDINATE.TOP:
                placementDiff = coordinator.getPlacementDif(PlacementDim.PLACE_Y);
                break;

            case COORDINATE.BOTTOM:
                placementDiff  = coordinator.getPlacementDif(PlacementDim.PLACE_Y);
                placementDiff += coordinator.getPlacementDif(PlacementDim.PLACE_DY);
                break;

            default:
                break;
            }

            return(placementDiff);
        }
 public int getPlacementDif(PlacementDim placementDim)
 {
     return(_coordinator.getPlacementDif(placementDim));
 }