コード例 #1
0
        private bool IsShapePositionAndSizeValid(string shapeName, string paramOneName, string paramTwoName, string paramOneValue, string paramTwoValue)
        {
            if (!IsCanvasParamValid(shapeName, paramOneName, paramOneValue, out int paramOneParsedValue) ||
                !IsCanvasParamValid(shapeName, paramTwoName, paramTwoValue, out int paramTwoParsedValue))
            {
                return(false);
            }
            if (paramOneParsedValue + paramTwoParsedValue > settings.CanvasSize)
            {
                logger.LogShapeLocationError(paramOneName, paramTwoName, paramOneValue, paramTwoValue, shapeName);
                return(false);
            }

            return(true);
        }