本文整理汇总了C#中BoxModuleI.GetPropertyString方法的典型用法代码示例。如果您正苦于以下问题:C# BoxModuleI.GetPropertyString方法的具体用法?C# BoxModuleI.GetPropertyString怎么用?C# BoxModuleI.GetPropertyString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxModuleI
的用法示例。
在下文中一共展示了BoxModuleI.GetPropertyString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDefaultUserLabel
/// <summary>
/// Gets default value for box module user label.
/// </summary>
public override string GetDefaultUserLabel(BoxModuleI boxModule)
{
//get atom`s userLabel
string atomsUserLabel = "???";
BoxModulePrx atomBoxModulePrx;
if (Ferda.Modules.Boxes.SocketConnections.TryGetBoxModulePrx(boxModule, "AtomSetting", out atomBoxModulePrx))
{
string[] atomDefaultUserLabel = atomBoxModulePrx.getDefaultUserLabel();
if (atomDefaultUserLabel.Length > 0)
atomsUserLabel = atomDefaultUserLabel[0];
}
GaceTypeEnum gaceType = (GaceTypeEnum)Enum.Parse(typeof(GaceTypeEnum), boxModule.GetPropertyString("GaceType"));
string gaceTypeShort = "";
switch (gaceType)
{
case GaceTypeEnum.Positive:
break;
case GaceTypeEnum.Negative:
gaceTypeShort = Constants.Negation.ToString();
break;
case GaceTypeEnum.Both:
gaceTypeShort = Constants.LeftFunctionBracket + Constants.Negation.ToString() + Constants.RightFunctionBracket;
break;
default:
throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(gaceType);
}
LiteralTypeEnum literalType = (LiteralTypeEnum)Enum.Parse(typeof(LiteralTypeEnum), boxModule.GetPropertyString("LiteralType"));
string shortLiteralType = this.GetPropertyOptionShortLocalizedLabel("LiteralType", literalType.ToString(), boxModule.LocalePrefs);
return gaceTypeShort + atomsUserLabel + shortLiteralType;
}
示例2: GetDefaultUserLabel
/// <summary>
/// Gets default value for box module user label.
/// </summary>
public override string GetDefaultUserLabel(BoxModuleI boxModule)
{
string nameInLiterals = boxModule.GetPropertyString("NameInLiterals");
if (!String.IsNullOrEmpty(nameInLiterals))
return nameInLiterals;
Ice.ObjectPrx objectPrx;
if (Ferda.Modules.Boxes.SocketConnections.TryGetObjectPrx(boxModule, "ColumnOrDerivedColumn", out objectPrx))
{
ColumnFunctionsPrx columnFunctionsPrx =
ColumnFunctionsPrxHelper.checkedCast(objectPrx);
return columnFunctionsPrx.getColumnInfo().columnSelectExpression;
}
return null;
}
示例3: 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;
}
示例4: GetDefaultUserLabel
/// <summary>
/// Gets default value for box module user label.
/// </summary>
public override string GetDefaultUserLabel(BoxModuleI boxModule)
{
string odbcConnectionString = boxModule.GetPropertyString(OdbcConnectionStringPropertyName);
if (!String.IsNullOrEmpty(odbcConnectionString))
{
string[] itemsOfConnectionString = odbcConnectionString.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
if (itemsOfConnectionString != null)
foreach (string item in itemsOfConnectionString)
{
if (!String.IsNullOrEmpty(item))
{
item.Trim();
if (item.StartsWith("DSN=", StringComparison.OrdinalIgnoreCase))
return item.Substring(4);
}
}
if (odbcConnectionString.Length <= 20)
return odbcConnectionString;
else
return odbcConnectionString.Substring(0, 17) + "...";
}
return null;
}
示例5: GetDefaultUserLabel
/// <summary>
/// Gets default value for box module user label.
/// </summary>
public override string GetDefaultUserLabel(BoxModuleI boxModule)
{
return boxModule.GetPropertyString(DataMatrixNamePropertyName);
}
示例6: TestConnectionStringAction
private void TestConnectionStringAction(BoxModuleI boxModule)
{
bool isConnectionStringValid = false;
try
{
Ferda.Modules.Helpers.Data.Database.TestConnectionString(
boxModule.GetPropertyString(OdbcConnectionStringPropertyName),
boxModule.StringIceIdentity);
isConnectionStringValid = true;
}
catch (BadParamsError ex)
{
if (ex.restrictionType != restrictionTypeEnum.DbConnectionString)
throw ex;
}
if (isConnectionStringValid)
// test succeed
boxModule.OutputMessage(
Ferda.ModulesManager.MsgType.Info,
"ActionTestConnectionString",
"ActionTestConnectionStringSucceed");
else
// test failed
boxModule.OutputMessage(
Ferda.ModulesManager.MsgType.Warning,
"ActionTestConnectionString",
"ActionTestConnectionStringFailed");
}
示例7: Validate
public override void Validate(BoxModuleI boxModule)
{
Ferda.Modules.Helpers.Data.Database.TestConnectionString(
boxModule.GetPropertyString(OdbcConnectionStringPropertyName),
boxModule.StringIceIdentity);
}
示例8: GetDefaultUserLabel
/// <summary>
/// Gets default value for box module user label.
/// </summary>
public override string GetDefaultUserLabel(BoxModuleI boxModule)
{
return boxModule.GetPropertyString(ColumnSelectExpressionPropertyName);
}