本文整理汇总了C#中System.Drawing.Design.ToolboxItem.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# ToolboxItem.GetType方法的具体用法?C# ToolboxItem.GetType怎么用?C# ToolboxItem.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Design.ToolboxItem
的用法示例。
在下文中一共展示了ToolboxItem.GetType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateToolCore
protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
{
if (tool != null)
{
System.Type c = tool.GetType(this.designerHost);
if (!typeof(ToolStrip).IsAssignableFrom(c))
{
ToolStripContainer parent = this.panel.Parent as ToolStripContainer;
if (parent != null)
{
ToolStripContentPanel contentPanel = parent.ContentPanel;
if (contentPanel != null)
{
PanelDesigner toInvoke = this.designerHost.GetDesigner(contentPanel) as PanelDesigner;
if (toInvoke != null)
{
ParentControlDesigner.InvokeCreateTool(toInvoke, tool);
}
}
}
}
else
{
base.CreateToolCore(tool, x, y, width, height, hasLocation, hasSize);
}
}
return null;
}
示例2: ToolboxItemToolboxNode
public ToolboxItemToolboxNode (ToolboxItem item)
: base (item.TypeName, item.AssemblyName.FullName)
{
base.Name = item.DisplayName;
if (item.Bitmap != null)
base.Icon = ImageToPixbuf (item.Bitmap);
foreach (ToolboxItemFilterAttribute tbfa in item.Filter)
base.ItemFilters.Add (tbfa);
//we only need to serialise the ToolboxItem if it is non-standard, because we can reliably recreate the two built-in types
if (item.GetType () == typeof (ToolboxItem))
toolboxItemType = null; //no-op, but this has consequences
else if (item.GetType () == typeof (System.Web.UI.Design.WebControlToolboxItem))
toolboxItemType = new TypeReference (typeof (System.Web.UI.Design.WebControlToolboxItem));
else {
serializedToolboxItem = SerializeToolboxItem (item);
toolboxItemType = new TypeReference (item.GetType ());
}
}
示例3: GetType_Null
public void GetType_Null ()
{
ToolboxItem item = new ToolboxItem ();
Assert.IsNull (item.GetType (null), "GetType(null)");
}
示例4: CreateToolCore
protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
{
if (tool != null)
{
System.Type c = tool.GetType(this.designerHost);
if (typeof(StatusStrip).IsAssignableFrom(c))
{
ParentControlDesigner.InvokeCreateTool(this.GetDesigner(this.bottomToolStripPanel), tool);
}
else if (typeof(ToolStrip).IsAssignableFrom(c))
{
ParentControlDesigner.InvokeCreateTool(this.GetDesigner(this.topToolStripPanel), tool);
}
else
{
ParentControlDesigner.InvokeCreateTool(this.GetDesigner(this.contentToolStripPanel), tool);
}
}
return null;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:20,代码来源:ToolStripContainerDesigner.cs