本文整理汇总了C#中System.ComponentModel.Container.Add方法的典型用法代码示例。如果您正苦于以下问题:C# System.ComponentModel.Container.Add方法的具体用法?C# System.ComponentModel.Container.Add怎么用?C# System.ComponentModel.Container.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ComponentModel.Container
的用法示例。
在下文中一共展示了System.ComponentModel.Container.Add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _Add_System_ComponentModel_Container_System_ComponentModel_IComponent_System_String
public static bool _Add_System_ComponentModel_Container_System_ComponentModel_IComponent_System_String( )
{
//class object
System.ComponentModel.Container _System_ComponentModel_Container = new System.ComponentModel.Container();
//Parameters
System.ComponentModel.IComponent component = null;
System.String name = null;
//Exception
System.Exception exception_Real = null;
System.Exception exception_Intercepted = null;
InterceptionMaintenance.disableInterception( );
try
{
_System_ComponentModel_Container.Add(component,name);
}
catch( System.Exception e )
{
exception_Real = e;
}
InterceptionMaintenance.enableInterception( );
try
{
_System_ComponentModel_Container.Add(component,name);
}
catch( System.Exception e )
{
exception_Intercepted = e;
}
return( ( exception_Real.Message == exception_Intercepted.Message ));
}
示例2: CCSListView
public CCSListView()
{
// this.ColumnReordered;
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint , true);
this.SetStyle(ControlStyles.EnableNotifyMessage , true);
ColumnFormatList = new List<ColumnFormat>();
sortedId = 0;
dir = direction.ASCENDING;
this.SmallImageList = new ImageList();
// this.SmallImageList.Images.Add("ASCENDING", AppStatus.Properties.Resources.sortAscending);
//this.SmallImageList.Images.Add("DESCENDING", AppStatus.Properties.Resources.sortDescending);
listBox1 = new ListBox();
listBox1.Anchor = AnchorStyles.Bottom;
listBox1.ResumeLayout(false);
// this.Controls.Add(listBox1);
System.ComponentModel.IContainer components;
components = new System.ComponentModel.Container();
components.Add(listBox1);
}