/// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            builder.AddCallback(typeof(SSWC.DataGrid), b =>
            {
                b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true));
                b.AddCustomAttributes("Columns",
                    new NewItemTypesAttribute(typeof(SSWC.DataGridCheckBoxColumn)));
                b.AddCustomAttributes("Columns",
                    new NewItemTypesAttribute(typeof(SSWC.DataGridTemplateColumn)));
                b.AddCustomAttributes("Columns",
                    new NewItemTypesAttribute(typeof(SSWC.DataGridTextColumn)));
            });
            
            builder.AddCallback(typeof(SSWC.DataGridCell), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWC.DataGridRow), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWC.DataGridRowGroupHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridCellsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridColumnHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridColumnHeadersPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridDetailsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridFrozenGrid), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridRowHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
            builder.AddCallback(typeof(SSWCP.DataGridRowsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));

            builder.AddCallback(typeof(SSWC.DataPager), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
        }
        private void AddMonthViewDesigners()
        {
            var builder = new AttributeTableBuilder();
            builder.AddCustomAttributes(typeof (FXMonthView), new FeatureAttribute(typeof (MonthViewDesignAdorner)));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     // Note: everything added here must be duplicated in VisualStudio.Design as well!
     builder.AddCallback(
         typeof(SSWCP.LinearClipper),
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            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)));

            builder.AddCallback(
                typeof(SSWCDC.DataPointSeriesDragDropTarget),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            builder.AddCallback(
                typeof(SSWC.ChildWindow),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            builder.AddCallback(
                typeof(SSWC.TreeViewItem),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            builder.AddCallback(
                typeof(SSWCP.CalendarButton),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCP.CalendarDayButton),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCP.CalendarItem),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCP.DatePickerTextBox),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWC.TabItem),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            // duplicated from Design
            builder.AddCallback(
                typeof(SSWCP.TabPanel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
示例#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)));*/
        }
 private static void AddBaseDefinitionAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(BaseDefinition),
                         b =>
                         {
                             // BaseDefinition properties
                             b.AddCustomAttributes("AllowDrop", new BrowsableAttribute(false));
                             b.AddCustomAttributes("BindingGroup", new BrowsableAttribute(false));
                             b.AddCustomAttributes("CommandBindings", new BrowsableAttribute(false));
                             b.AddCustomAttributes("ContextMenu", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Cursor", new BrowsableAttribute(false));
                             b.AddCustomAttributes("DataContext", new BrowsableAttribute(false));
                             b.AddCustomAttributes("FocusVisualStyle", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Focusable", new BrowsableAttribute(false));
                             b.AddCustomAttributes("ForceCursor", new BrowsableAttribute(false));
                             b.AddCustomAttributes("InputScope", new BrowsableAttribute(false));
                             b.AddCustomAttributes("IsEnabled", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Language", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Name", new BrowsableAttribute(false));
                             b.AddCustomAttributes("OverridesDefaultStyle", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Resources", new BrowsableAttribute(false));
                             b.AddCustomAttributes("Style", new BrowsableAttribute(false));
                             b.AddCustomAttributes("ToolTip", new BrowsableAttribute(false));
                         });
 }
示例#8
0
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     //// Note: duplicated here due to change in extensibility framework for Blend 3
     builder.AddCallback(typeof(AllergiesLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(ColumnManager), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(ConceptListBox), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(CuiToggleButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DataBoundCell), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DataBoundRowGrouping), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DataSelector), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DataSelectorItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DecoratorItemContainer), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DecoratorItemsControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(DecoratorItemsWrapPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(FilterControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(GraphBase), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(GraphPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(GroupingControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(Label), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(LookAheadView), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(LookBehindView), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(MainView), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(MatchingTermItemContainer), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(MatchingTermItemsControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(PanelWrapper), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(TermItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(LevelOfDetailTick), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(TimeGraphBase), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(TimeIBarGraph), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true))); // true required as inherits false from parent
     builder.AddCallback(typeof(TimeLineGraph), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true))); // true required as inherits false from parent
     builder.AddCallback(typeof(TimeActivityGraph), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true))); // true required as inherits false from parent
     builder.AddCallback(typeof(VisualFocusLine), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(WaitAnimation), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(MedicationLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
        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));
                    }
                }
            }
        }
示例#10
0
		public void Register()
		{
			AttributeTableBuilder tableBuilder = new AttributeTableBuilder();

			tableBuilder.AddCustomAttributes(typeof(PieChart), new FeatureAttribute(typeof(PieChartDesignModeValueProvider)));

			MetadataStore.AddAttributeTable(tableBuilder.CreateTable());
		}
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // We need to provide empty string for Frame to appear under main "Controls" category:
            builder.AddCallback(typeof(SSWC.Frame), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("", true)));

            // Note: everything added here must be duplicated in VisualStudio.Design as well!
            builder.AddCallback(typeof(SSWC.Page), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
        /// <summary>
        /// Builds the design time attribute table.
        /// </summary>
        /// <returns>Custom attribute table.</returns>
        private static AttributeTable BuildAttributeTable()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            AddAttributes(builder);

            return builder.CreateTable();
        }
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            builder.AddCallback(typeof(SSWC.DataForm), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
            builder.AddCallback(typeof(SSWC.DataField), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));

            // Note: everything added here must be duplicated in VisualStudio.Design as well!
            builder.AddCallback(typeof(SSWC.DataForm), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DataForm>(x => x.ItemsSource))));
        }
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // duplicated from .Design

            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(SSWCD.Legend),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            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)));

            builder.AddCallback(
                typeof(SSWCDC.DataPointSeriesDragDropTarget),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
        /// <summary>
        /// Add design time attributes.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        private static void AddAttributes(AttributeTableBuilder builder)
        {
            builder.AddCustomAttributes(
                typeof(SignInButton),
                new Attribute[] {
                    new DefaultPropertyAttribute("ClientId"),
                    new DefaultEventAttribute("SessionChanged"),
                    new ToolboxBrowsableAttribute(true),
                    new ToolboxCategoryAttribute(LiveServicesCategory),
                    new ToolboxTabNameAttribute(LiveServicesCategory)});

            EditorBrowsableAttribute browsableAlways = new EditorBrowsableAttribute(EditorBrowsableState.Always);
            CategoryAttribute categoryLive = new CategoryAttribute(LiveServicesCategory);

            DescriptionAttribute description = new DescriptionAttribute(StringResources.DescriptionBrandingType);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "Branding",
                new Attribute[] { browsableAlways, categoryLive, description });

            description = new DescriptionAttribute(StringResources.DescriptionClientId);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "ClientId",
                new Attribute[] { browsableAlways, categoryLive, description });

            description = new DescriptionAttribute(StringResources.DescriptionRedirectUri);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "RedirectUri",
                new Attribute[] { browsableAlways, categoryLive, description });

            description = new DescriptionAttribute(StringResources.DescriptionScopes);
            DefaultValueAttribute defaultValue = new DefaultValueAttribute("wl.signin");
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "Scopes",
                new Attribute[] { browsableAlways, categoryLive, description, defaultValue });

            description = new DescriptionAttribute(StringResources.DescriptionTextType);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "TextType",
                new Attribute[] { browsableAlways, categoryLive, description });

            description = new DescriptionAttribute(StringResources.DescriptionSigninText);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "SignInText",
                new Attribute[] { browsableAlways, categoryLive, description });

            description = new DescriptionAttribute(StringResources.DescriptionSignoutText);
            builder.AddCustomAttributes(
                typeof(SignInButton),
                "SignOutText",
                new Attribute[] { browsableAlways, categoryLive, description });            
        }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(
         typeof(SSWC.AccordionItem), 
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(
       typeof(SSWC.TransitioningContentControl),
       b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     // Note: everything added here must be duplicated in VisualStudio.Design as well!
     builder.AddCallback(
         typeof(SSWC.Primitives.TabPanel),
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(
         typeof(SSWC.ChildWindow),
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
        /// <summary>
        /// Build design time metadata attribute table.
        /// </summary>
        /// <returns>Custom attribute table.</returns>
        protected virtual AttributeTable BuildAttributeTable()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            AddDescriptions(builder);
            AddAttributes(builder);
            AddTables(builder);

            return builder.CreateTable();
        }
示例#19
0
        /// <summary>
		/// Build design time metadata attribute table.
		/// </summary>
		/// <returns>Custom attribute table.</returns>
		protected virtual AttributeTable BuildAttributeTable()
		{
			AttributeTableBuilder builder = new AttributeTableBuilder();

            AddDescriptions(builder);
            AddAttributes(builder);
            AddTables(builder, this);
            masterMetadataTable = builder.CreateTable();
			return masterMetadataTable;
		}
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // duplicated from .Design

            string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName;

            builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Target")));
            builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DescriptionViewer>(x => x.Target))));
            builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.ValidationSummary>(x => x.Target))));
        }
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // Note: everything added here must be duplicated in VisualStudio.Design as well!

            builder.AddCallback(
                typeof(SSWCP.AccordionButton),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCP.ExpandableContentControl),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
示例#22
0
        public VectorMetadata()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof (Node),
                                        "Position",
                                        PropertyValueEditor.CreateEditorAttribute(typeof (VectorEditor)),
                                        new AlternateContentPropertyAttribute()
                                        );

            AttributeTable = builder.CreateTable();
        }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(
         typeof(SSWC.ButtonSpinner),
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(
         typeof(SSWC.RatingItem),
         b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(
       typeof(SSWC.TimePickerPopup),
       b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
示例#24
0
        private void AddToolboxBrowsableAttributes()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(FXMonthViewButton),            ToolboxBrowsableAttribute.No);
            builder.AddCustomAttributes(typeof(FXMonthViewContainer),         ToolboxBrowsableAttribute.No);
            builder.AddCustomAttributes(typeof(FXMonthViewHeader),            ToolboxBrowsableAttribute.No);
            builder.AddCustomAttributes(typeof(FXMonthViewItem),              ToolboxBrowsableAttribute.No);
            builder.AddCustomAttributes(typeof(FXMonthViewWeekDayHeaderCell), ToolboxBrowsableAttribute.No);
            builder.AddCustomAttributes(typeof(FXPopup),                      ToolboxBrowsableAttribute.No);

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(SilverlightTypes.DataGridCell, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridRow, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridCellsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridColumnHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridColumnHeadersPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridDetailsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridFrozenGrid, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridRowHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridRowsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(SilverlightTypes.DataGridRowGroupHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName;

            builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
            builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false)));
            builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false)));

            // Note: everything added here must be duplicated in VisualStudio.Design as well!

            builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Target")));
            builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DescriptionViewer>(x => x.Target))));
            builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.ValidationSummary>(x => x.Target))));
        }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(
     typeof(SSWC.AutoCompleteBox),
     b =>
     {
         b.AddCustomAttributes(new DefaultPropertyAttribute(
             Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.Text)));
         b.AddCustomAttributes(new DefaultEventAttribute("SelectionChanged"));
         b.AddCustomAttributes(new ComplexBindingPropertiesAttribute(
             Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.ItemsSource),
             Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.ValueMemberPath)));
     });
 }
 /// <summary>
 /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
 /// </summary>
 /// <param name="builder">The assembly attribute table builder.</param>
 protected override void AddAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(SSWC.DataPager), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Source")));
     builder.AddCallback(typeof(SSWC.DataGridCell), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWC.DataGridRow), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridCellsPresenter), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridColumnHeader), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridColumnHeadersPresenter), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridDetailsPresenter), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridFrozenGrid), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridRowHeader), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWCP.DataGridRowsPresenter), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
     builder.AddCallback(typeof(SSWC.DataGridRowGroupHeader), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
 }
 private static void AddColumnDefinitionAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(ColumnDefinition),
                         b =>
                         {
                             // ColumnDefinition properties
                             b.AddCustomAttributes("Height", new BrowsableAttribute(false));
                             b.AddCustomAttributes("MinWidth", new CategoryAttribute("Column"));
                             b.AddCustomAttributes("MinWidth", new DescriptionAttribute("Minimum width of the column"));
                             b.AddCustomAttributes("MaxWidth", new CategoryAttribute("Column"));
                             b.AddCustomAttributes("MaxWidth", new DescriptionAttribute("Maximum width of the column"));
                             b.AddCustomAttributes("Tag", new CategoryAttribute("Column"));
                             b.AddCustomAttributes("Width", new CategoryAttribute("Column"));
                         });
 }
示例#30
0
        public void Register()
        {
            CategoryAttribute myLocalCategoryAttribute =
                new CategoryAttribute($"{Strings.CategoryCustom}.{Strings.CategoryMy}");

            AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();

            // Register Designers, display name, category etc.
            //per activity design
            attributeTableBuilder.AddCustomAttributes(typeof(RequestHumanInput <>), new DesignerAttribute(typeof(RequestHumanInputDesigner)));
            attributeTableBuilder.AddCustomAttributes(typeof(RequestHumanInput <>), new DisplayNameAttribute(Strings.RequestHumanInputDisplayName));
            attributeTableBuilder.AddCustomAttributes(typeof(RequestHumanInput <>), myLocalCategoryAttribute);

            // Apply the metadata
            MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable());
        }
示例#31
0
        private void addCustomAttributes_StringUtils_categoriess(AttributeTableBuilder builder)
        {
            // 1.Activitiesペイン上のツリー構造を構築する。
            // ドットで階層を表現する
            {
                builder.AddCustomAttributes(typeof(Base64Encode), new CategoryAttribute(Resources.Category1_StringUtils));
                builder.AddCustomAttributes(typeof(Base64Decode), new CategoryAttribute(Resources.Category1_StringUtils));
                builder.AddCustomAttributes(typeof(Base64EncodeFromFile), new CategoryAttribute(Resources.Category1_StringUtils));
                builder.AddCustomAttributes(typeof(ConvertCRLF), new CategoryAttribute(Resources.Category1_StringUtils));
                builder.AddCustomAttributes(typeof(ToJSONString), new CategoryAttribute(Resources.Category1_StringUtils));
            }

            // 2.Activitiesペイン上のアクティビティ名
            {
                builder.AddCustomAttributes(typeof(Base64Encode), new DisplayNameAttribute(Resources.DisplayName2_Base64Encode));
                builder.AddCustomAttributes(typeof(Base64Decode), new DisplayNameAttribute(Resources.DisplayName2_Base64Decode));
                builder.AddCustomAttributes(typeof(Base64EncodeFromFile), new DisplayNameAttribute(Resources.DisplayName2_Base64EncodeFromFile));
                builder.AddCustomAttributes(typeof(ConvertCRLF), new DisplayNameAttribute(Resources.DisplayName2_ConvertCRLF));
                builder.AddCustomAttributes(typeof(ToJSONString), new DisplayNameAttribute(Resources.DisplayName2_ToJSONString));
            }

            // 3.Activitiesペイン上のアクティビティをポイントしたときに表示されるツールチップ文言
            {
                builder.AddCustomAttributes(typeof(Base64Encode), new DescriptionAttribute(Resources.Description3_Base64Encode));
                builder.AddCustomAttributes(typeof(Base64Decode), new DescriptionAttribute(Resources.Description3_Base64Decode));
                builder.AddCustomAttributes(typeof(Base64EncodeFromFile), new DescriptionAttribute(Resources.Description3_Base64EncodeFromFile));
                builder.AddCustomAttributes(typeof(ConvertCRLF), new DescriptionAttribute(Resources.Description3_ConvertCRLF));
                builder.AddCustomAttributes(typeof(ToJSONString), new DescriptionAttribute(Resources.Description3_ToJSONString));
            }

            // 4.プロパティペイン内のプロパティの説明文言
            {
                builder.AddCustomAttributes(typeof(Base64Encode), nameof(Base64Encode.Target), new DescriptionAttribute(Resources.Description4_Base64Encode_Target));
                builder.AddCustomAttributes(typeof(Base64Decode), nameof(Base64Decode.Target), new DescriptionAttribute(Resources.Description4_Base64Decode_Target));
                builder.AddCustomAttributes(typeof(Base64EncodeFromFile), nameof(Base64EncodeFromFile.Path), new DescriptionAttribute(Resources.Description4_Base64EncodeFromFile_Path));
                builder.AddCustomAttributes(typeof(ConvertCRLF), nameof(ConvertCRLF.Target), new DescriptionAttribute(Resources.Description4_ConvertCRLF_Target));
            }

            // 5.プロパティペインの、カテゴリ名
            {
                builder.AddCustomAttributes(typeof(ConvertCRLF), nameof(ConvertCRLF.CR), new CategoryAttribute(Resources.Category5_ConvertCRLF_CRLF));
                builder.AddCustomAttributes(typeof(ConvertCRLF), nameof(ConvertCRLF.LF), new CategoryAttribute(Resources.Category5_ConvertCRLF_CRLF));
            }

            // 6.プロパティペイン内のプロパティの変数名
            { }
        }
示例#32
0
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.ValidateTable();

            var categoryAttribute = new CategoryAttribute($"{Resources.Category}");

            builder.AddCustomAttributes(typeof(AudioVideoCombine), categoryAttribute);
            builder.AddCustomAttributes(typeof(AudioVideoCombine), new DesignerAttribute(typeof(AudioVideoCombineDesigner)));
            builder.AddCustomAttributes(typeof(AudioVideoCombine), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(MultimediaProcess), categoryAttribute);
            builder.AddCustomAttributes(typeof(MultimediaProcess), new DesignerAttribute(typeof(MultimediaProcessDesigner)));
            builder.AddCustomAttributes(typeof(MultimediaProcess), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoDeliveryCodec), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoDeliveryCodec), new DesignerAttribute(typeof(VideoDeliveryCodecDesigner)));
            builder.AddCustomAttributes(typeof(VideoDeliveryCodec), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoDenoise), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoDenoise), new DesignerAttribute(typeof(VideoDenoiseDesigner)));
            builder.AddCustomAttributes(typeof(VideoDenoise), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoFolderCombine), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoFolderCombine), new DesignerAttribute(typeof(VideoFolderCombineDesigner)));
            builder.AddCustomAttributes(typeof(VideoFolderCombine), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoIntermediateCodec), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoIntermediateCodec), new DesignerAttribute(typeof(VideoIntermediateCodecDesigner)));
            builder.AddCustomAttributes(typeof(VideoIntermediateCodec), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoLUT), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoLUT), new DesignerAttribute(typeof(VideoLUTDesigner)));
            builder.AddCustomAttributes(typeof(VideoLUT), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoStabilize), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoStabilize), new DesignerAttribute(typeof(VideoStabilizeDesigner)));
            builder.AddCustomAttributes(typeof(VideoStabilize), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(VideoText), categoryAttribute);
            builder.AddCustomAttributes(typeof(VideoText), new DesignerAttribute(typeof(VideoTextDesigner)));
            builder.AddCustomAttributes(typeof(VideoText), new HelpKeywordAttribute(""));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.ValidateTable();

            var categoryAttribute = new CategoryAttribute($"{Resources.Category}");

            builder.AddCustomAttributes(typeof(BuildFrameworkFolders), categoryAttribute);
            builder.AddCustomAttributes(typeof(BuildFrameworkFolders), new DesignerAttribute(typeof(BuildFrameworkFoldersDesigner)));
            builder.AddCustomAttributes(typeof(BuildFrameworkFolders), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(BuildSystemReserved), categoryAttribute);
            builder.AddCustomAttributes(typeof(BuildSystemReserved), new DesignerAttribute(typeof(BuildSystemReservedDesigner)));
            builder.AddCustomAttributes(typeof(BuildSystemReserved), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(IncrementTransactionNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(IncrementTransactionNumber), new DesignerAttribute(typeof(IncrementTransactionNumberDesigner)));
            builder.AddCustomAttributes(typeof(IncrementTransactionNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(IncrementRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(IncrementRetryNumber), new DesignerAttribute(typeof(IncrementRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(IncrementRetryNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(IncrementInitRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(IncrementInitRetryNumber), new DesignerAttribute(typeof(IncrementInitRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(IncrementInitRetryNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(IncrementContinuousRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(IncrementContinuousRetryNumber), new DesignerAttribute(typeof(IncrementContinuousRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(IncrementContinuousRetryNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ResetRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(ResetRetryNumber), new DesignerAttribute(typeof(ResetRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(ResetRetryNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ResetInitRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(ResetInitRetryNumber), new DesignerAttribute(typeof(ResetInitRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(ResetInitRetryNumber), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ResetContinuousRetryNumber), categoryAttribute);
            builder.AddCustomAttributes(typeof(ResetContinuousRetryNumber), new DesignerAttribute(typeof(ResetContinuousRetryNumberDesigner)));
            builder.AddCustomAttributes(typeof(ResetContinuousRetryNumber), new HelpKeywordAttribute(""));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#34
0
        public static void RegisterMetadata(AttributeTableBuilder builder)
        {
            Type stateMachineType = typeof(StateMachine);

            builder.AddCustomAttributes(stateMachineType, new DesignerAttribute(typeof(StateMachineDesigner)));
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.StatesPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.VariablesPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.InitialStatePropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.InitialStatePropertyName), new ShowPropertyInOutlineViewAttribute()
            {
                DuplicatedChildNodesVisible = true
            });
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.StatesPropertyName), new ShowPropertyInOutlineViewAttribute());


            builder.AddCustomAttributes(stateMachineType, new FeatureAttribute(typeof(StateMachineValidationErrorSourceLocatorFeature)));
        }
        /// <summary>
        /// Registers metadata for the StateMachine related designers.
        /// </summary>
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();


            builder.AddCustomAttributes(typeof(WizardContainer), new DesignerAttribute(typeof(WizardContainerDesigner)));



            builder.AddCustomAttributes(typeof(Wizard), new DesignerAttribute(typeof(WizardDesigner)));


            builder.AddCustomAttributes(typeof(Step), new DesignerAttribute(typeof(StepDesigner)));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public static void RegisterMetadata(AttributeTableBuilder builder)
        {
            Type stateType = typeof(State);

            builder.AddCustomAttributes(stateType, new DesignerAttribute(typeof(StateDesigner)));
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.EntryPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.ExitPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.TransitionsPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.IsFinalPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.VariablesPropertyName), BrowsableAttribute.No);

            builder.AddCustomAttributes(stateType, new ShowInOutlineViewAttribute());
            builder.AddCustomAttributes(stateType, new AllowBreakpointAttribute());
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.TransitionsPropertyName), new ShowPropertyInOutlineViewAttribute()
            {
                CurrentPropertyVisible = false
            });
            builder.AddCustomAttributes(stateType, new ActivityDesignerOptionsAttribute
            {
                OutlineViewIconProvider = (modelItem) =>
                {
                    ResourceDictionary icons = EditorResources.GetIcons();

                    if (modelItem != null)
                    {
                        object icon = null;

                        if (StateContainerEditor.IsFinalState(modelItem) && icons.Contains("FinalStateIcon"))
                        {
                            icon = icons["FinalStateIcon"];
                        }
                        else if (icons.Contains("StateIcon"))
                        {
                            icon = icons["StateIcon"];
                        }

                        if (icon != null && icon is DrawingBrush)
                        {
                            return((DrawingBrush)icon);
                        }
                    }

                    return(null);
                }
            });
        }
示例#37
0
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // Note: everything added here must be duplicated in VisualStudio.Design as well!

            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(SSWCDC.NumericAxisLabel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
示例#38
0
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            builder.AddCallback(typeof(Legend), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(LegendItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(Title), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            builder.AddCallback(typeof(BarDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(BubbleDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(ColumnDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(LineDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(PieDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(ScatterDataPoint), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            builder.AddCallback(typeof(AxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(DateTimeAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(typeof(NumericAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
示例#39
0
        void IRegisterMetadata.Register()
        {
            var builder = new AttributeTableBuilder();

            // Register metadata for PublishNotification activity

            /*
             * Type type = typeof(Messaging.PublishNotification);
             * builder.AddCustomAttributes(type, "Properties", new Attribute[] { BrowsableAttribute.Yes,
             *                  PropertyValueEditor.CreateEditorAttribute(typeof(ArgumentDictionaryPropertyEditor)) });
             * builder.AddCustomAttributes(type, "Content", new Attribute[] { BrowsableAttribute.Yes,
             *                  PropertyValueEditor.CreateEditorAttribute(typeof(ArgumentDictionaryPropertyEditor)) });
             * builder.AddCustomAttributes(type, "Metadata", new Attribute[] { BrowsableAttribute.Yes,
             *                  PropertyValueEditor.CreateEditorAttribute(typeof(ArgumentDictionaryPropertyEditor)) });
             */
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public GetBalanceFreeHierarchyList()
        {
            this.DisplayName = "Получить универсальные балансы";

            var type    = typeof(GetBalanceFreeHierarchyList);
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(type, "TimeZoneId", new EditorAttribute(typeof(TimeZoneIdPropEditor), typeof(TimeZoneIdPropEditor)));
            builder.AddCustomAttributes(type, "ObjectIds", new EditorAttribute(typeof(HierarchyObjectIdEditor), typeof(HierarchyObjectIdEditor)));

            //builder.AddCustomAttributes(type, "StartDateTime", new DesignerAttribute(type));
            //builder.AddCustomAttributes(typeof(GetBalanceFreeHierarchyList), "StartDateTime", new EditorAttribute(typeof(DialogSelectDateTime), typeof(DialogSelectDateTime)));

            MetadataStore.AddAttributeTable(builder.CreateTable());

            UnitDigit = EnumUnitDigit.Kilo;
        }
示例#41
0
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(ExecuteNonQuery), new DesignerAttribute(typeof(GenericDatabaseDesigner)));
            builder.AddCustomAttributes(typeof(ExecuteQuery), new DesignerAttribute(typeof(GenericDatabaseDesigner)));
            builder.AddCustomAttributes(typeof(InsertDataTable), new DesignerAttribute(typeof(InsertDataTableDesigner)));
            builder.AddCustomAttributes(typeof(DatabaseConnect), new DesignerAttribute(typeof(ConnectDatabaseDesigner)));
            builder.AddCustomAttributes(typeof(DatabaseTransaction), new DesignerAttribute(typeof(ConnectDatabaseDesigner)));
            builder.AddCustomAttributes(typeof(DatabaseDisconnect), new DesignerAttribute(typeof(DisconnectDesigner)));

            // Editors
            builder.AddCustomAttributes(typeof(ExecuteQuery), nameof(ExecuteQuery.Parameters), new EditorAttribute(typeof(ArgumentDictionaryEditor), typeof(DialogPropertyValueEditor)));
            builder.AddCustomAttributes(typeof(ExecuteNonQuery), nameof(ExecuteQuery.Parameters), new EditorAttribute(typeof(ArgumentDictionaryEditor), typeof(DialogPropertyValueEditor)));

            //Content attribute
            var contentAttr = new ContentPropertyAttribute(nameof(ExecuteNonQuery.ExistingDbConnection));

            builder.AddCustomAttributes(typeof(ExecuteNonQuery), contentAttr);
            builder.AddCustomAttributes(typeof(ExecuteQuery), contentAttr);
            builder.AddCustomAttributes(typeof(InsertDataTable), contentAttr);

            // DisplayName attribute
            builder.AddCustomAttributes(typeof(DatabaseConnect), new DisplayNameAttribute(Resources.Connect));
            builder.AddCustomAttributes(typeof(InsertDataTable), new DisplayNameAttribute(Resources.Insert));
            builder.AddCustomAttributes(typeof(DatabaseDisconnect), new DisplayNameAttribute(Resources.Disconnect));
            builder.AddCustomAttributes(typeof(DatabaseTransaction), new DisplayNameAttribute(Resources.StartTransaction));
            builder.AddCustomAttributes(typeof(ExecuteNonQuery), new DisplayNameAttribute(Resources.ExecuteNonQuery));
            builder.AddCustomAttributes(typeof(ExecuteQuery), new DisplayNameAttribute(Resources.ExecuteQuery));


            //Categories
            CategoryAttribute appIntegrationDatabaseCategoryAttribute =
                new CategoryAttribute($"{Resources.CategoryAppIntegration}.{Resources.CategoryDatabase}");

            builder.AddCustomAttributes(typeof(DatabaseConnect), appIntegrationDatabaseCategoryAttribute);
            builder.AddCustomAttributes(typeof(DatabaseDisconnect), appIntegrationDatabaseCategoryAttribute);
            builder.AddCustomAttributes(typeof(DatabaseTransaction), appIntegrationDatabaseCategoryAttribute);
            builder.AddCustomAttributes(typeof(InsertDataTable), appIntegrationDatabaseCategoryAttribute);
            builder.AddCustomAttributes(typeof(ExecuteNonQuery), appIntegrationDatabaseCategoryAttribute);
            builder.AddCustomAttributes(typeof(ExecuteQuery), appIntegrationDatabaseCategoryAttribute);

            AddDescription(builder);

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#42
0
        private static void CreateToolboxBitmapAttributeForActivity(AttributeTableBuilder builder, System.Resources.ResourceReader resourceReader, Type builtInActivityType)
        {
            try
            {
                System.Drawing.Bitmap bitmap = ExtractBitmapResource(resourceReader, builtInActivityType.IsGenericType ? builtInActivityType.Name.Split('`')[0] : builtInActivityType.Name);

                if (bitmap != null)
                {
                    Type            tbaType     = typeof(System.Drawing.ToolboxBitmapAttribute);
                    Type            imageType   = typeof(System.Drawing.Image);
                    ConstructorInfo constructor = tbaType.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[] { imageType, imageType }, null);
                    System.Drawing.ToolboxBitmapAttribute tba = constructor.Invoke(new object[] { bitmap, bitmap }) as System.Drawing.ToolboxBitmapAttribute;
                    builder.AddCustomAttributes(builtInActivityType, tba);
                }
            }
            catch { }
        }
示例#43
0
        public static void RegisterTimeUpDownAttributeTable(ITypeResolver typeResolver)
        {
            AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();
            Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.TimeUpDown).RuntimeType;

            if (runtimeType != (Type)null)
            {
                attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder =>
                {
                    builder.AddCustomAttributes("Culture", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("Format", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("TimeGlobalizationInfo", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("TimeParsers", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                }));
            }
            MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable());
        }
示例#44
0
        public static void RegisterValidationSummaryAttributeTable(ITypeResolver typeResolver)
        {
            AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();
            Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.ValidationSummary).RuntimeType;

            if (runtimeType != (Type)null)
            {
                attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder =>
                {
                    builder.AddCustomAttributes("Errors", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("Filter", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("Target", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                    builder.AddCustomAttributes("ErrorStyle", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties));
                }));
            }
            MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable());
        }
示例#45
0
 public static void AddToolboxIcon(Type activityType, System.Drawing.Bitmap bitmap)
 {
     try
     {
         AttributeTableBuilder builder = new AttributeTableBuilder();
         if (bitmap != null)
         {
             Type            tbaType     = typeof(System.Drawing.ToolboxBitmapAttribute);
             Type            imageType   = typeof(System.Drawing.Image);
             ConstructorInfo constructor = tbaType.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[] { imageType, imageType }, null);
             System.Drawing.ToolboxBitmapAttribute tba = constructor.Invoke(new object[] { bitmap, bitmap }) as System.Drawing.ToolboxBitmapAttribute;
             builder.AddCustomAttributes(activityType, tba);
         }
         MetadataStore.AddAttributeTable(builder.CreateTable());
     }
     catch { }
 }
示例#46
0
        private static void CreateDummyWorkflowDesignerForCaching()
        {
            var workflowDesigner = new WorkflowDesigner
            {
                PropertyInspectorFontAndColorData = XamlServices.Save(ActivityDesignerHelper.GetDesignerHashTable())
            };
            var designerConfigService = workflowDesigner.Context.Services.GetService <DesignerConfigurationService>();

            if (designerConfigService != null)
            {
                // set the runtime Framework version to 4.5 as new features are in .NET 4.5 and do not exist in .NET 4
                designerConfigService.TargetFrameworkName         = new FrameworkName(".NETFramework", new Version(4, 5));
                designerConfigService.AutoConnectEnabled          = true;
                designerConfigService.AutoSplitEnabled            = true;
                designerConfigService.PanModeEnabled              = true;
                designerConfigService.RubberBandSelectionEnabled  = true;
                designerConfigService.BackgroundValidationEnabled = true;

                // prevent design-time background validation from blocking UI thread
                // Disabled for now
                designerConfigService.AnnotationEnabled = false;
                designerConfigService.AutoSurroundWithSequenceEnabled = false;
            }
            var meta = new DesignerMetadata();

            meta.Register();

            var builder = new AttributeTableBuilder();

            foreach (var designerAttribute in ActivityDesignerHelper.DesignerAttributes)
            {
                builder.AddCustomAttributes(designerAttribute.Key, new DesignerAttribute(designerAttribute.Value));
            }

            MetadataStore.AddAttributeTable(builder.CreateTable());
            workflowDesigner.Context.Services.Subscribe <DesignerView>(instance =>
            {
                instance.WorkflowShellHeaderItemsVisibility = ShellHeaderItemsVisibility.All;
                instance.WorkflowShellBarItemVisibility     = ShellBarItemVisibility.None;
                instance.WorkflowShellBarItemVisibility     = ShellBarItemVisibility.Zoom | ShellBarItemVisibility.PanMode | ShellBarItemVisibility.MiniMap;
            });
            var activityBuilder = new WorkflowHelper().CreateWorkflow("DummyWF");

            workflowDesigner.Load(activityBuilder);
        }
示例#47
0
        public AdoDotNetConnectionProperties(string providerName)
        {
            Debug.Assert(providerName != null);
            _providerName = providerName;
            var     builder = new AttributeTableBuilder();
            DataRow dr      = null;

#if NETFRAMEWORK
            var dataSet = ConfigurationManager.GetSection("system.data") as System.Data.DataSet;
            dr    = dataSet.Tables[0].NewRow();
            dr[0] = "ODP.NET, Managed Driver";
            dr[1] = ".Net Framework Data Provider for Oracle";
            dr[2] = "Oracle.ManagedDataAccess.Client";
            dr[3] = "Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342";
#endif

#if NETCOREAPP
            DbProviderFactories.RegisterFactory("System.Data.SqlClient", System.Data.SqlClient.SqlClientFactory.Instance);
            DbProviderFactories.RegisterFactory("System.Data.OleDb", System.Data.OleDb.OleDbFactory.Instance);
            DbProviderFactories.RegisterFactory("System.Data.Odbc", System.Data.Odbc.OdbcFactory.Instance);
            DbProviderFactories.RegisterFactory("Oracle.ManagedDataAccess.Client", Oracle.ManagedDataAccess.Client.OracleClientFactory.Instance);
#endif
            //SqlConnectionStringBuilder
            // Create an underlying connection string builder object
            DbProviderFactory factory = null;
            try
            {
                factory = DbProviderFactories.GetFactory(providerName);
            }
            catch (Exception ex)
            {
                if (dr != null && (string)dr[2] == providerName)
                {
                    factory = DbProviderFactories.GetFactory(dr);
                }
                else
                {
                    throw ex;
                }
            }
            Debug.Assert(factory != null);
            _connectionStringBuilder = factory.CreateConnectionStringBuilder();
            Debug.Assert(_connectionStringBuilder != null);
            _connectionStringBuilder.BrowsableConnectionString = false;
        }
示例#48
0
        public static void RegisterVisualTransitionAttributeTable(ITypeResolver typeResolver)
        {
            Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.VisualTransition).RuntimeType;

            if (runtimeType == (Type)null)
            {
                return;
            }
            AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();

            attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder =>
            {
                builder.AddCustomAttributes("From", (Attribute) new DefaultValueAttribute((string)null));
                builder.AddCustomAttributes("To", (Attribute) new DefaultValueAttribute((string)null));
                builder.AddCustomAttributes("Storyboard", (Attribute) new DefaultValueAttribute((string)null));
            }));
            MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable());
        }
示例#49
0
        public void Register()
        {
            AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();

            attributeTableBuilder.AddCustomAttributes(typeof(ConvertXLSToXLSX),
                                                      new DesignerAttribute(typeof(ConvertFileDesigner)));
            attributeTableBuilder.AddCustomAttributes(typeof(ConvertDOCToDOCX),
                                                      new DesignerAttribute(typeof(ConvertFileDesigner)));
            attributeTableBuilder.AddCustomAttributes(typeof(ConvertDOCXToDOC),
                                                      new DesignerAttribute(typeof(ConvertFileDesigner)));

            attributeTableBuilder.AddCustomAttributes(typeof(ConvertToPDF),
                                                      new DesignerAttribute(typeof(ConvertFileDesigner)));
            attributeTableBuilder.AddCustomAttributes(typeof(ConvertXLSXToXLS),
                                                      new DesignerAttribute(typeof(ConvertFileDesigner)));

            MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable());
        }
示例#50
0
        public static void loadSystemIcon()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            string   str            = System.Environment.CurrentDirectory + @"\Microsoft.VisualStudio.Activities.dll";
            Assembly sourceAssembly = Assembly.LoadFile(str);


            System.Resources.ResourceReader resourceReader = new System.Resources.ResourceReader(sourceAssembly.GetManifestResourceStream("Microsoft.VisualStudio.Activities.Resources.resources"));
            foreach (Type type in typeof(System.Activities.Activity).Assembly.GetTypes())
            {
                if (type.Namespace == "System.Activities.Statements")
                {
                    createImageToActivity(builder, resourceReader, type);
                }
            }
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#51
0
        /// <summary>
        /// プロパティの設定
        /// </summary>
        /// <param name="builder"></param>
        public static void SetMetaData(ref AttributeTableBuilder builder)
        {
            Type t = typeof(GetFirefoxVersion);

            DesignerMetadata.RegisterHelper(ref builder, t, Properties.Resources.ActivityName_Env_FirefoxVer
                                            , Properties.Resources.ActivityTree_Env_FirefoxVer
                                            , Properties.Resources.ActivityDesc_Env_FirefoxVer);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(GetFirefoxVersion.Result)
                                            , Properties.Resources.Environment_Env_GetBrowserVersion_OutArgName1
                                            , Properties.Resources.Environment_Env_GetBrowserVersion_OutArgCategory1
                                            , Properties.Resources.Environment_Env_GetBrowserVersion_OutArgDesc1);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(GetFirefoxVersion.FireFoxPath)
                                            , Properties.Resources.Environment_Env_GetFirefoxVersion_InArgName1
                                            , Properties.Resources.Environment_Env_GetFirefoxVersion_InArgCategory1
                                            , Properties.Resources.Environment_Env_GetFirefoxVersion_InArgDesc1);
        }
示例#52
0
 private static void AddWrapLayoutAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(WrapLayout),
                         b =>
     {
         // WrapLayout properties
         b.AddCustomAttributes("ItemWidth", new CategoryAttribute("Wrap"));
         b.AddCustomAttributes("ItemWidth", new DescriptionAttribute("Width of all child elements"));
         b.AddCustomAttributes("ItemHeight", new CategoryAttribute("Wrap"));
         b.AddCustomAttributes("ItemHeight", new DescriptionAttribute("Height of all child elements"));
         b.AddCustomAttributes("Orientation", new CategoryAttribute("Wrap"));
         b.AddCustomAttributes("Orientation", new DescriptionAttribute("Direction in which child elements are arranged"));
         b.AddCustomAttributes("Id", new CategoryAttribute("Wrap"));
         b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
         b.AddCustomAttributes("Tag", new CategoryAttribute("Wrap"));
         b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
     });
 }
示例#53
0
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.ValidateTable();

            var categoryAttribute = new CategoryAttribute($"{Resources.Category}");

            builder.AddCustomAttributes(typeof(SendTemplatedSMTPMail), categoryAttribute);
            builder.AddCustomAttributes(typeof(SendTemplatedSMTPMail), new DesignerAttribute(typeof(SendMailDesigner)));
            builder.AddCustomAttributes(typeof(SendTemplatedSMTPMail), nameof(SendTemplatedSMTPMail.Attachments), new EditorAttribute(typeof(ArgumentCollectionEditor), typeof(DialogPropertyValueEditor)));
            builder.AddCustomAttributes(typeof(SendTemplatedOutlookMail), nameof(SendTemplatedOutlookMail.Attachments), new EditorAttribute(typeof(ArgumentCollectionEditor), typeof(DialogPropertyValueEditor)));
            builder.AddCustomAttributes(typeof(SendTemplatedOutlookMail), categoryAttribute);
            builder.AddCustomAttributes(typeof(SendTemplatedOutlookMail), new DesignerAttribute(typeof(SendMailDesigner)));
            builder.AddCustomAttributes(typeof(SendTemplatedOutlookMail), new HelpKeywordAttribute("https://go.uipath.com"));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#54
0
        public static void RegisterAll()
        {
            var builder = new AttributeTableBuilder();

            // Register each type
            CreateSequenceDesigner.RegisterMetadata(builder);
            LoadSequencesFromFileDesigner.RegisterMetadata(builder);
            DnaTranscriptionDesigner.RegisterMetadata(builder);
            RnaReverseTranscribeDesigner.RegisterMetadata(builder);
            SaveSequencesToFileDesigner.RegisterMetadata(builder);
            ProteinTranslateDesigner.RegisterMetadata(builder);
            NCBIBlastDesigner.RegisterMetadata(builder);
            AlignSequencePairDesigner.RegisterMetadata(builder);
            IterativeAssemblerDesigner.RegisterMetadata(builder);
            TransformSequenceDesigner.RegisterMetadata(builder);

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#55
0
        public static void SetMetaData(ref AttributeTableBuilder builder)
        {
            var t = typeof(FromDataRowArray);

            DesignerMetadata.RegisterHelper(ref builder, t, Properties.Resources.ActivityName_Convert_DataTable_FromDataRowArray
                                            , Properties.Resources.ActivityTree_Convert_DataTable_FromDataRowArray
                                            , Properties.Resources.ActivityTree_Convert_DataTable_FromDataRowArray);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(DataRowArray)
                                            , Properties.Resources.Convert_DataTable_FDArr_InArgName1
                                            , Properties.Resources.Convert_DataTable_FDArr_InArgCategory1
                                            , Properties.Resources.Convert_DataTable_FDArr_InArgDesc1);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(Result)
                                            , Properties.Resources.Convert_DataTable_FDArr_OutArgName1
                                            , Properties.Resources.Convert_DataTable_FDArr_OutArgCategory1
                                            , Properties.Resources.Convert_DataTable_FDArr_OutArgDesc1);
        }
示例#56
0
 private static void AddGridLayoutAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(GridLayout),
                         b =>
     {
         // GridLayout properties
         b.AddCustomAttributes("ColumnDefinitions", new CategoryAttribute("Grid"));
         b.AddCustomAttributes("ColumnDefinitions", new DescriptionAttribute("Collection of grid columns"));
         b.AddCustomAttributes("ColumnDefinitions", new AlternateContentPropertyAttribute());
         b.AddCustomAttributes("RowDefinitions", new CategoryAttribute("Grid"));
         b.AddCustomAttributes("RowDefinitions", new DescriptionAttribute("Collection of grid rows"));
         b.AddCustomAttributes("RowDefinitions", new AlternateContentPropertyAttribute());
         b.AddCustomAttributes("Id", new CategoryAttribute("Grid"));
         b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
         b.AddCustomAttributes("Tag", new CategoryAttribute("Grid"));
         b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
     });
 }
示例#57
0
 private static void AddRadialLayoutAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(RadialLayout),
                         b =>
     {
         // RadialLayout properties
         b.AddCustomAttributes("StartAngle", new CategoryAttribute("Radial"));
         b.AddCustomAttributes("StartAngle", new DescriptionAttribute("Start positioning child elements at this angle"));
         b.AddCustomAttributes("EndAngle", new CategoryAttribute("Radial"));
         b.AddCustomAttributes("EndAngle", new DescriptionAttribute("End positioning child elements at this angle"));
         b.AddCustomAttributes("Circle", new CategoryAttribute("Radial"));
         b.AddCustomAttributes("Circle", new DescriptionAttribute("Should last child element fill all remaining space"));
         b.AddCustomAttributes("Id", new CategoryAttribute("Radial"));
         b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
         b.AddCustomAttributes("Tag", new CategoryAttribute("Radial"));
         b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
     });
 }
示例#58
0
 private static void AddUniformGridLayoutAttributes(AttributeTableBuilder builder)
 {
     builder.AddCallback(typeof(UniformGridLayout),
                         b =>
     {
         // UniformGridLayout properties
         b.AddCustomAttributes("Rows", new CategoryAttribute("UniformGrid"));
         b.AddCustomAttributes("Rows", new DescriptionAttribute("Number of rows in grid"));
         b.AddCustomAttributes("Columns", new CategoryAttribute("UniformGrid"));
         b.AddCustomAttributes("Columns", new DescriptionAttribute("Number of columns in grid"));
         b.AddCustomAttributes("FirstColumn", new CategoryAttribute("UniformGrid"));
         b.AddCustomAttributes("FirstColumn", new DescriptionAttribute("Number of leading blank cells in first row of grid"));
         b.AddCustomAttributes("Id", new CategoryAttribute("UniformGrid"));
         b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
         b.AddCustomAttributes("Tag", new CategoryAttribute("UniformGrid"));
         b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
     });
 }
        /// <summary>
        /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
        /// </summary>
        /// <param name="builder">The assembly attribute table builder.</param>
        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // duplicated from .Design
            builder.AddCallback(
                typeof(SSWCP.LinearClipper),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            // .VisualStudio.Design's own stuff
            builder.AddCallback(
                typeof(SSWC.ButtonSpinner),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWC.RatingItem),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWC.TimePickerPopup),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
        }
示例#60
0
        public static void SetMetaData(ref AttributeTableBuilder builder)
        {
            var t = typeof(ToString);

            DesignerMetadata.RegisterHelper(ref builder, t, Properties.Resources.ActivityName_Convert_SecureString_ToString
                                            , Properties.Resources.ActivityTree_Convert_SecureString_ToString
                                            , Properties.Resources.ActivityTree_Convert_SecureString_ToString);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(InputValue)
                                            , Properties.Resources.Convert_SecureString_TS_InArgName1
                                            , Properties.Resources.Convert_SecureString_TS_InArgCategory1
                                            , Properties.Resources.Convert_SecureString_TS_InArgDesc1);

            DesignerMetadata.RegisterHelper(ref builder, t, nameof(Result)
                                            , Properties.Resources.Convert_SecureString_TS_OutArgName1
                                            , Properties.Resources.Convert_SecureString_TS_OutArgCategory1
                                            , Properties.Resources.Convert_SecureString_TS_OutArgDesc1);
        }