本文整理汇总了C#中AttributeTableBuilder.AddTable方法的典型用法代码示例。如果您正苦于以下问题:C# AttributeTableBuilder.AddTable方法的具体用法?C# AttributeTableBuilder.AddTable怎么用?C# AttributeTableBuilder.AddTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeTableBuilder
的用法示例。
在下文中一共展示了AttributeTableBuilder.AddTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTables
private static void AddTables(AttributeTableBuilder builder)
{
Debug.Assert(builder != null, "AddTables is called with null parameter!");
Assembly asm = Assembly.GetExecutingAssembly();
foreach (Type t in asm.GetTypes())
{
if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
{
try
{
AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
builder.AddTable(atb.CreateTable());
}
catch (Exception e)
{
if (e.IsFatal())
{
throw;
}
Debug.Assert(false, string.Format(CultureInfo.InvariantCulture, "Exception in AddTables method: {0}", e));
}
}
}
}
示例2: AddAttributes
protected override void AddAttributes(AttributeTableBuilder builder)
{
// duplicated from .Design
//MessageBox.Show("MetadataRegistration AddAttributes");
/*builder.AddCallback(
typeof(SSWCD.Interpolator),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.AxisLabel),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.DateTimeAxisLabel),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDCP.EdgePanel),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));*/
//builder.AddCallback(
// typeof(CustomControl1),
// b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
//builder.AddCustomAttributes(typeof(CustomControl1), new FeatureAttribute(typeof(OpacitySliderAdornerProvider)));
builder.AddTable(new CustomControl1Metadata().CreateTable());
/*builder.AddCallback(
typeof(SSWCDC.NumericAxisLabel),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCD.Title),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
// VisualStudio.Design's own stuff
builder.AddCallback(
typeof(SSWCDC.AreaDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.BarDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.BubbleDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.ColumnDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.LineDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.PieDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.ScatterDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.LegendItem),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));*/
}
示例3: AddTables
private void AddTables(AttributeTableBuilder builder, object parent)
{
Debug.Assert(builder != null, "AddTables is called with null parameter!");
Assembly asm = parent.GetType().Assembly;
foreach (Type t in asm.GetTypes())
{
if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
{
try
{
AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
builder.AddTable(atb.CreateTable());
}
catch (Exception ex)
{
}
}
}
}