当前位置: 首页>>代码示例>>C#>>正文


C# BoxModuleI.GetPropertyString方法代码示例

本文整理汇总了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;
        }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:34,代码来源:LiteralSettingBoxInfo.cs

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:17,代码来源:AbstractAttributeBoxInfo.cs

示例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;
        }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:42,代码来源:AtomSettingBoxInfo.cs

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:26,代码来源:DatabaseBoxInfo.cs

示例5: GetDefaultUserLabel

 /// <summary>
 /// Gets default value for box module user label.
 /// </summary>
 public override string GetDefaultUserLabel(BoxModuleI boxModule)
 {
     return boxModule.GetPropertyString(DataMatrixNamePropertyName);
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:7,代码来源:DataMatrixBoxInfo.cs

示例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");
        }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:29,代码来源:DatabaseBoxInfo.cs

示例7: Validate

 public override void Validate(BoxModuleI boxModule)
 {
     Ferda.Modules.Helpers.Data.Database.TestConnectionString(
         boxModule.GetPropertyString(OdbcConnectionStringPropertyName),
         boxModule.StringIceIdentity);
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:6,代码来源:DatabaseBoxInfo.cs

示例8: GetDefaultUserLabel

 /// <summary>
 /// Gets default value for box module user label.
 /// </summary>
 public override string GetDefaultUserLabel(BoxModuleI boxModule)
 {
     return boxModule.GetPropertyString(ColumnSelectExpressionPropertyName);
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:7,代码来源:ColumnBoxInfo.cs


注:本文中的BoxModuleI.GetPropertyString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。