本文整理汇总了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 Размеры
示例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;
}