本文整理汇总了C#中BoxModuleI.GetPropertyLong方法的典型用法代码示例。如果您正苦于以下问题:C# BoxModuleI.GetPropertyLong方法的具体用法?C# BoxModuleI.GetPropertyLong怎么用?C# BoxModuleI.GetPropertyLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxModuleI
的用法示例。
在下文中一共展示了BoxModuleI.GetPropertyLong方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDefaultUserLabel
/// <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;
}
示例2: GetDefaultUserLabel
/// <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;
}