/// <summary>
 /// Gets default value for box module user label.
 /// </summary>
 public override string GetDefaultUserLabel(BoxModuleI boxModule)
 {
     string boxLabel = boxModule.BoxInfo.GetLabel(boxModule.LocalePrefs);
     return boxLabel
         + Constants.LeftEnum
         + boxModule.GetPropertyLong("MinLen").ToString()
         + Constants.RangeSeparator
         + boxModule.GetPropertyLong("MaxLen").ToString()
         + Constants.RightEnum;
 }
        /// <summary>
        /// Gets default value for box module user label.
        /// </summary>
        public override string GetDefaultUserLabel(BoxModuleI boxModule)
        {
            CoefficientTypeEnum coefficientType = (CoefficientTypeEnum)Enum.Parse(typeof(CoefficientTypeEnum), boxModule.GetPropertyString("CoefficientType"));
            string shortCoefficientType = this.GetPropertyOptionShortLocalizedLabel("CoefficientType", coefficientType.ToString(), boxModule.LocalePrefs);

            //get attribute`s userLabel
            string attributesUserLabel = "???";
            BoxModulePrx attributeBoxModulePrx;
            if (Ferda.Modules.Boxes.SocketConnections.TryGetBoxModulePrx(boxModule, "Attribute", out attributeBoxModulePrx))
            {
                string[] attributeDefaultUserLabel = attributeBoxModulePrx.getDefaultUserLabel();
                if (attributeDefaultUserLabel.Length > 0)
                    attributesUserLabel = attributeDefaultUserLabel[0];
            }

            string result;
            switch (coefficientType)
            {
                case CoefficientTypeEnum.OneParticularCategory:
                    result = (attributesUserLabel != "???") ? attributesUserLabel : shortCoefficientType;
                    result += Constants.LeftFunctionBracket
                        + boxModule.GetPropertyString("Category")
                        + Constants.RightFunctionBracket;
                    break;
                default:
                    result =
                        attributesUserLabel
                        + Constants.LeftFunctionBracket
                        + shortCoefficientType
                        + Constants.LeftEnum
                        + boxModule.GetPropertyLong("MinLen").ToString()
                        + Constants.RangeSeparator
                        + boxModule.GetPropertyLong("MaxLen").ToString()
                        + Constants.RightEnum
                        + Constants.RightFunctionBracket;
                    break;
            }
            return result;
        }