本文整理汇总了C#中SortableBindingList.Contains方法的典型用法代码示例。如果您正苦于以下问题:C# SortableBindingList.Contains方法的具体用法?C# SortableBindingList.Contains怎么用?C# SortableBindingList.Contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SortableBindingList
的用法示例。
在下文中一共展示了SortableBindingList.Contains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
//.........这里部分代码省略.........
*/
/*
* Edited by Chekalin Victor 13.12.2012
*/
var bipNames =
Enum.GetNames( typeof( BuiltInParameter ) );
Parameter p;
/*
* Edited by Chekalin Victor 13.12.2012
*/
//foreach( BuiltInParameter a in bips )
foreach( var bipName in bipNames )
{
BuiltInParameter a;
if( !Enum.TryParse( bipName, out a ) )
continue;
try
{
p = e.get_Parameter( a );
#region Check for external definition
#if CHECK_FOR_EXTERNAL_DEFINITION
Definition d = p.Definition;
ExternalDefinition e = d as ExternalDefinition; // this is never possible
string guid = ( null == e ) ? null : e.GUID.ToString();
#endif // CHECK_FOR_EXTERNAL_DEFINITION
#endregion // Check for external definition
if( null != p )
{
string valueString =
( StorageType.ElementId == p.StorageType )
? Util.GetParameterValue2( p, doc )
: p.AsValueString();
//containedInCollection = set.Contains( p ); // this does not work
containedInCollection = ContainedInCollection( p, set );
data.Add( new ParameterData( a, p,
valueString,
containedInCollection,
bipName ) );
}
}
catch( Exception ex )
{
Debug.Print(
"Exception retrieving built-in parameter {0}: {1}",
a, ex );
}
}
}
// Retrieve parameters from Element.Parameters collection
foreach( Parameter p in e.Parameters )
{
string valueString =
( StorageType.ElementId == p.StorageType )
? Util.GetParameterValue2( p, doc )
: p.AsValueString();
ParameterData parameterData = new ParameterData(
( p.Definition as InternalDefinition ).BuiltInParameter,
p,
valueString,
true,
null );
if( !data.Contains( parameterData ) )
data.Add( parameterData );
}
// Display form
string description
= Util.ElementDescription( e, true )
+ ( isSymbol
? " Type"
: " Instance" );
#if USE_LIST_VIEW
using( BuiltInParamsCheckerFormListView form
= new BuiltInParamsCheckerFormListView( e,
description, data ) )
#else
using (BuiltInParamsCheckerForm form
= new BuiltInParamsCheckerForm(
description, data))
#endif // USE_LIST_VIEW
{
form.ShowDialog();
}
return Result.Succeeded;
}