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
0
        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));
                    }
                }
            }
        }
Пример #3
0
        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)));*/
        }
		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)
					{
					}
				}
			}
		}
        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)
                    {
                    }
                }
            }
        }
Пример #6
0
        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)));*/
        }