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


C# ModelDoc2.GetConfigurationCount方法代码示例

本文整理汇总了C#中ModelDoc2.GetConfigurationCount方法的典型用法代码示例。如果您正苦于以下问题:C# ModelDoc2.GetConfigurationCount方法的具体用法?C# ModelDoc2.GetConfigurationCount怎么用?C# ModelDoc2.GetConfigurationCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModelDoc2的用法示例。


在下文中一共展示了ModelDoc2.GetConfigurationCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReloadAllSetParameters


//.........这里部分代码省略.........
                                    var outComps = new LinkedList<Component2>();
                                    if (_mSwAddin.GetComponents(
                                        _swSelModel.IGetActiveConfiguration().IGetRootComponent2(),
                                        outComps, true, false))
                                    {
                                        _dimensionConfig = Decors.GetListComponentForDimension(_mSwAddin, rd,
                                                                                               outComps);
                                        _dimensionConfig.Sort((x, y) => x.Number.CompareTo(y.Number));
                                        rd.Close();
                                    }
                                }
                                #endregion

                                var thisDataSet = new DataSet();
                                var testAdapter = new OleDbDataAdapter("SELECT * FROM objects", oleDb);
                                testAdapter.Fill(thisDataSet, "objects");
                                testAdapter.Dispose();
                                bool captConfigBool = thisDataSet.Tables["objects"].Columns.Contains("captConf");
                                foreach (var v in thisDataSet.Tables["objects"].Columns)
                                {
                                    var vc = (DataColumn)v;
                                    if (vc.ColumnName == "number")
                                        isNumber = true;
                                    if (vc.ColumnName == "idslave")
                                    {
                                        if (vc.DataType.Name != "String")
                                            MessageBox.Show(
                                                @"Неверно указан тип данных в столбце 'ismaster'",
                                                _mSwAddin.MyTitle, MessageBoxButtons.OK,
                                                MessageBoxIcon.Information);
                                        isIdSlave = true;
                                    }
                                    if (vc.ColumnName == "mainasmconf" &&
                                        _swSelModel.GetConfigurationCount() > 1)
                                        isAsmConfig = true;
                                    if (vc.ColumnName == "fixedvalues")
                                        isFixedValues = true;
                                }
                                thisDataSet.Clear();

                                if (Properties.Settings.Default.CheckParamLimits &&
                                    oleSchem.Rows.Cast<DataRow>().Any(
                                        row => (string)row["TABLE_NAME"] == "dimlimits"))
                                {
                                    testAdapter = new OleDbDataAdapter("SELECT * FROM dimlimits", oleDb);
                                    testAdapter.Fill(thisDataSet, "dimlimits");
                                    testAdapter.Dispose();
                                    foreach (var v in thisDataSet.Tables["dimlimits"].Columns)
                                    {
                                        var vc = (DataColumn)v;
                                        _namesOfColumnNameFromDimLimits.Add(vc.ColumnName);
                                    }
                                    thisDataSet.Clear();
                                }

                                string currentConf = _swSelComp.ReferencedConfiguration;

                                cm = isNumber
                                         ? new OleDbCommand(
                                               "SELECT * FROM objects WHERE number>0 ORDER BY number",
                                               oleDb)
                                         : new OleDbCommand("SELECT * FROM objects ORDER BY id", oleDb);

                                rd = cm.ExecuteReader();

                                #region Размеры
开发者ID:digger1985,项目名称:MyCode,代码行数:67,代码来源:frmSetParameters.cs

示例2: CheckPropForArticul

 private bool CheckPropForArticul(ModelDoc2 model)
 {
     bool ret = false;
     var commonPropNames = (string[])model.GetCustomInfoNames();
     foreach (var commonPropName in commonPropNames)
     {
         if (commonPropName.ToLower() == "articul" && model.GetCustomInfoValue("", commonPropName) != "")
             ret = true;
     }
     if (model.GetConfigurationCount() >= 1)
     {
         string confName = model.IGetActiveConfiguration().Name;
         var confPropNames = (string[])model.GetCustomInfoNames2(confName);
         foreach (var confPropName in confPropNames)
         {
             if (confPropName.ToLower() == "articul" && model.GetCustomInfoValue(confName, confPropName) != "")
                 ret = true;
         }
     }
     return ret;
 }
开发者ID:digger1985,项目名称:MyCode,代码行数:21,代码来源:SwAddin.cs


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