示例#1
0
        void RegisterCustomMetadata()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(Parallel), new DesignerAttribute(typeof(CustomParallelDesigner)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        static MessageBoxActivity()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(MessageBoxActivity), "Buttons", new EditorAttribute(typeof(ButtonsClickTypeEditor), typeof(PropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        static InvokeComMethodActivity()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(InvokeComMethodActivity), "Arguments", new EditorAttribute(typeof(DictionaryArgumentEditor), typeof(DialogPropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        /// <summary>
        /// IRegisterMetadata.Registerの、実装です
        /// </summary>
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            // TODO: クラス(Activity)を追加したら、ここから初期設定をさせます
            DataTable.CopyToClipboard.SetMetaData(ref builder);
            DataTable.JointTable.SetMetaData(ref builder);
            DataTable.ShiftRowsAndColumns.SetMetaData(ref builder);

            Excel.ReadRecommendSetting.SetMetaData(ref builder);
            Excel.GetActiveSheetName.SetMetaData(ref builder);

            File.WaitForFileGrowthCompleted.SetMetaData(ref builder);

            Convert.SecureString.ToString.SetMetaData(ref builder);
            Convert.SecureString.FromString.SetMetaData(ref builder);

            Convert.DataTable.FromDataRowArray.SetMetaData(ref builder);

            EnvInfo.GetChromeVersion.SetMetaData(ref builder);
            EnvInfo.GetEdgeVersion.SetMetaData(ref builder);
            EnvInfo.GetFirefoxVersion.SetMetaData(ref builder);
            EnvInfo.GetIEVersion.SetMetaData(ref builder);

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

            builder.ValidateTable();

            builder.AddCustomAttributes(typeof(IndicoScope), new DesignerAttribute(typeof(IndicoScopeDesigner)));
            builder.AddCustomAttributes(typeof(IndicoScope), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ListDatasets), new DesignerAttribute(typeof(ListDatasetsDesigner)));
            builder.AddCustomAttributes(typeof(ListDatasets), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(DocumentExtraction), new DesignerAttribute(typeof(DocumentExtractionDesigner)));
            builder.AddCustomAttributes(typeof(DocumentExtraction), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ListWorkflows), new DesignerAttribute(typeof(ListWorkflowsDesigner)));
            builder.AddCustomAttributes(typeof(ListWorkflows), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(WorkflowSubmission), new DesignerAttribute(typeof(WorkflowSubmissionDesigner)));
            builder.AddCustomAttributes(typeof(WorkflowSubmission), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(SubmissionResult), new DesignerAttribute(typeof(SubmissionResultDesigner)));
            builder.AddCustomAttributes(typeof(SubmissionResult), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ListSubmissions), new DesignerAttribute(typeof(ListSubmissionsDesigner)));
            builder.AddCustomAttributes(typeof(ListSubmissions), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(SubmitReview), new DesignerAttribute(typeof(SubmitReviewDesigner)));
            builder.AddCustomAttributes(typeof(SubmitReview), new HelpKeywordAttribute(""));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#6
0
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            // Designers
            builder.AddCustomAttributes(typeof(PythonScope), new DesignerAttribute(typeof(PythonScopeDesigner)));
            builder.AddCustomAttributes(typeof(LoadScript), new DesignerAttribute(typeof(LoadScriptDesigner)));
            builder.AddCustomAttributes(typeof(RunScript), new DesignerAttribute(typeof(RunScriptDesigner)));

            // Browsable false

            // DisplayNames

            //Categories
            CategoryAttribute pythonCategoryAttribute =
                new CategoryAttribute($"{Resources.CategoryAppInvoker}.{Resources.CategoryPython}");

            builder.AddCustomAttributes(typeof(PythonScope), pythonCategoryAttribute);
            builder.AddCustomAttributes(typeof(RunScript), pythonCategoryAttribute);
            builder.AddCustomAttributes(typeof(LoadScript), pythonCategoryAttribute);
            builder.AddCustomAttributes(typeof(InvokeMethod), pythonCategoryAttribute);
            builder.AddCustomAttributes(typeof(GetObject <>), pythonCategoryAttribute);

            // Generic TypeArgument
            Type attrType            = Type.GetType("System.Activities.Presentation.FeatureAttribute, System.Activities.Presentation");
            Type argType             = Type.GetType("System.Activities.Presentation.UpdatableGenericArgumentsFeature, System.Activities.Presentation");
            var  genericTypeArgument = Activator.CreateInstance(attrType, new object[] { argType }) as Attribute;

            builder.AddCustomAttributes(typeof(GetObject <>), genericTypeArgument);
            builder.AddCustomAttributes(typeof(GetObject <>), new DefaultTypeArgumentAttribute(typeof(object)));

            AddDisplayNameToActivities(builder, typeof(PythonScope).Assembly, nameof(Activity.DisplayName), new DisplayNameAttribute(Resources.DisplayName));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#7
0
            private void AddToolboxBrowsableAttributes()
            {
                var builder = new AttributeTableBuilder();

                builder.AddCustomAttributes(typeof(NumericUpDown), BrowsableAttribute.Yes);
                MetadataStore.AddAttributeTable(builder.CreateTable());
            }
示例#8
0
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.ValidateTable();

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


            builder.AddCustomAttributes(typeof(MLScope), categoryAttribute);
            builder.AddCustomAttributes(typeof(MLScope), new DesignerAttribute(typeof(MLScopeDesigner)));
            builder.AddCustomAttributes(typeof(MLScope), new HelpKeywordAttribute("https://go.uipath.com"));

            builder.AddCustomAttributes(typeof(LoadFromTextFile), categoryAttribute);
            builder.AddCustomAttributes(typeof(LoadFromTextFile), new DesignerAttribute(typeof(LoadFromTextFileDesigner)));
            builder.AddCustomAttributes(typeof(LoadFromTextFile), new HelpKeywordAttribute("https://go.uipath.com"));

            builder.AddCustomAttributes(typeof(SaveToTextFile), categoryAttribute);
            builder.AddCustomAttributes(typeof(SaveToTextFile), new DesignerAttribute(typeof(SaveToTextFileDesigner)));
            builder.AddCustomAttributes(typeof(SaveToTextFile), new HelpKeywordAttribute("https://go.uipath.com"));

            builder.AddCustomAttributes(typeof(SelectColumns), categoryAttribute);
            builder.AddCustomAttributes(typeof(SelectColumns), new DesignerAttribute(typeof(SelectColumnsDesigner)));
            builder.AddCustomAttributes(typeof(SelectColumns), new HelpKeywordAttribute("https://go.uipath.com"));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#9
0
        // <summary>
        // Initializes the metadata provided by this class.  Multiple class
        // are ignored.
        // </summary>
        public static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            // Introduce any Cider-specific customizations
            AttributeTableBuilder builder = new AttributeTableBuilder();

            // Make Name and FlowDirection properties browsable.  The reason why
            // these attributes are here instead of in the BaseOverridesAttributeTable
            // is because the BaseAttributeTable explicitly hides these properties
            // and adding conflicting attributes to the same table (via BaseOverridesAttributeTable
            // which derives from BaseAttributeTable) currently results in unspeciefied
            // behavior.  Hence we use this table to deal with these attributes.
            //
            MakeBasic(builder, typeof(FrameworkElement), FrameworkElement.FlowDirectionProperty);
            MakeBasic(builder, typeof(Control), Control.NameProperty);

            // Note: Add any new attributes here or into System.Activities.Presentation.Developer /
            // System.Activities.Presentation.Internal.Metadata.BaseOverridesAttributeTable

            MetadataStore.AddAttributeTable(builder.CreateTable());

            _initialized = true;
        }
示例#10
0
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(HashFile), new DesignerAttribute(typeof(HashFileActivityDesigner)));
            builder.AddCustomAttributes(typeof(HashText), new DesignerAttribute(typeof(HashTextActivityDesigner)));
            builder.AddCustomAttributes(typeof(KeyedHashFile), new DesignerAttribute(typeof(KeyedHashFileActivityDesigner)));
            builder.AddCustomAttributes(typeof(KeyedHashText), new DesignerAttribute(typeof(KeyedHashTextActivityDesigner)));
            builder.AddCustomAttributes(typeof(EncryptFile), new DesignerAttribute(typeof(EncryptFileActivityDesigner)));
            builder.AddCustomAttributes(typeof(EncryptText), new DesignerAttribute(typeof(EncryptTextActivityDesigner)));
            builder.AddCustomAttributes(typeof(DecryptFile), new DesignerAttribute(typeof(DecryptFileActivityDesigner)));
            builder.AddCustomAttributes(typeof(DecryptText), new DesignerAttribute(typeof(DecryptTextActivityDesigner)));

            // Categories
            CategoryAttribute cryptographyCategoryAttribute =
                new CategoryAttribute($"{Resources.CategorySystem}.{Resources.CategoryCryptography}");

            builder.AddCustomAttributes(typeof(HashFile), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(HashText), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(KeyedHashFile), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(KeyedHashText), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(EncryptFile), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(EncryptText), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(DecryptFile), cryptographyCategoryAttribute);
            builder.AddCustomAttributes(typeof(DecryptText), cryptographyCategoryAttribute);

            //DisplayName
            AddToAll(builder, typeof(HashFile).Assembly, nameof(Activity.DisplayName), new DisplayNameAttribute(Resources.DisplayName));

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

            var categoryAttribute = new CategoryAttribute("App Scripting");
            var autoHotKeyType    = typeof(RunAutoHotKeyScript);

            builder.AddCustomAttributes(autoHotKeyType, categoryAttribute);
            builder.AddCustomAttributes(autoHotKeyType, "Parameters", new EditorAttribute(typeof(CollectionArgumentEditor), typeof(DialogPropertyValueEditor)));
            builder.AddCustomAttributes(autoHotKeyType, "Result", new CategoryAttribute("Output"));
            builder.AddCustomAttributes(autoHotKeyType, new DesignerAttribute(typeof(ScriptActivityDesigner)));

            var psType = typeof(RunPowerShellScript <>);

            builder.AddCustomAttributes(psType, categoryAttribute);
            builder.AddCustomAttributes(psType, "Parameters", new EditorAttribute(typeof(DictionaryArgumentEditor), typeof(DialogPropertyValueEditor)));
            builder.AddCustomAttributes(psType, new DesignerAttribute(typeof(ScriptActivityDesigner)));
            builder.AddCustomAttributes(psType, new DefaultTypeArgumentAttribute(typeof(object)));

            Type attrType            = Type.GetType("System.Activities.Presentation.FeatureAttribute, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
            Type argType             = Type.GetType("System.Activities.Presentation.UpdatableGenericArgumentsFeature, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
            var  genericTypeArgument = Activator.CreateInstance(attrType, new object[] { argType }) as Attribute;

            builder.AddCustomAttributes(psType, genericTypeArgument);

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

            builder.ValidateTable();

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

            builder.AddCustomAttributes(typeof(SFTPScope), categoryAttribute);
            builder.AddCustomAttributes(typeof(SFTPScope), new DesignerAttribute(typeof(SFTPScopeDesigner)));
            builder.AddCustomAttributes(typeof(SFTPScope), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(Download), categoryAttribute);
            builder.AddCustomAttributes(typeof(Download), new DesignerAttribute(typeof(DownloadDesigner)));
            builder.AddCustomAttributes(typeof(Download), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(Upload), categoryAttribute);
            builder.AddCustomAttributes(typeof(Upload), new DesignerAttribute(typeof(UploadDesigner)));
            builder.AddCustomAttributes(typeof(Upload), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(Delete), categoryAttribute);
            builder.AddCustomAttributes(typeof(Delete), new DesignerAttribute(typeof(DeleteDesigner)));
            builder.AddCustomAttributes(typeof(Delete), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetFiles), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetFiles), new DesignerAttribute(typeof(GetFilesDesigner)));
            builder.AddCustomAttributes(typeof(GetFiles), new HelpKeywordAttribute(""));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#13
0
        public MainWindow()
        {
            InitializeComponent();
            new BluEnergyXDesignerStart().ShowDialog();

            errorService = new ValidationErrorService(this.messageListBox);

            originalTitle = this.Title;
            //register designers for the standard activities
            DesignerMetadata dm = new DesignerMetadata();

            dm.Register();
            //toolbox
            toolboxControl    = CreateToolbox();
            toolboxArea.Child = toolboxControl;
            CreateContextMenu();

            InitializeDesigner();
            StartNewWorkflow();

            //override designer for the standard While activity
            AttributeTableBuilder atb = new AttributeTableBuilder();

            atb.AddCustomAttributes(typeof(While), new DesignerAttribute(typeof(ActivityLibrary.Design.MyWhileDesigner)));
            MetadataStore.AddAttributeTable(atb.CreateTable());
        }
        public static void RegisterAll()
        {
            var builder = new AttributeTableBuilder();

            ImageDetectorActivityDesign.RegisterMetadata(builder);
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#15
0
        public void Register()
        {
            #region Setup

            var builder = new AttributeTableBuilder();
            builder.ValidateTable();

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

            #endregion Setup


            builder.AddCustomAttributes(typeof(BitbucketAPIScope), categoryAttribute);
            builder.AddCustomAttributes(typeof(BitbucketAPIScope), new DesignerAttribute(typeof(BitbucketAPIScopeDesigner)));
            builder.AddCustomAttributes(typeof(BitbucketAPIScope), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetRepositories), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetRepositories), new DesignerAttribute(typeof(GetRepositoriesDesigner)));
            builder.AddCustomAttributes(typeof(GetRepositories), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(ManageRepository), categoryAttribute);
            builder.AddCustomAttributes(typeof(ManageRepository), new DesignerAttribute(typeof(ManageRepositoryDesigner)));
            builder.AddCustomAttributes(typeof(ManageRepository), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(CommitFile), categoryAttribute);
            builder.AddCustomAttributes(typeof(CommitFile), new DesignerAttribute(typeof(CommitFileDesigner)));
            builder.AddCustomAttributes(typeof(CommitFile), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetWorkspaces), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetWorkspaces), new DesignerAttribute(typeof(GetWorkspacesDesigner)));
            builder.AddCustomAttributes(typeof(GetWorkspaces), new HelpKeywordAttribute(""));


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

            builder.ValidateTable();

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

            builder.AddCustomAttributes(typeof(ZendeskScope), categoryAttribute);
            builder.AddCustomAttributes(typeof(ZendeskScope), new DesignerAttribute(typeof(ZendeskScopeDesigner)));
            builder.AddCustomAttributes(typeof(ZendeskScope), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetTicket), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetTicket), new DesignerAttribute(typeof(GetTicketDesigner)));
            builder.AddCustomAttributes(typeof(GetTicket), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(UpdateTicket), categoryAttribute);
            builder.AddCustomAttributes(typeof(UpdateTicket), new DesignerAttribute(typeof(UpdateTicketDesigner)));
            builder.AddCustomAttributes(typeof(UpdateTicket), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetUser), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetUser), new DesignerAttribute(typeof(GetUserDesigner)));
            builder.AddCustomAttributes(typeof(GetUser), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetUserFields), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetUserFields), new DesignerAttribute(typeof(GetUserFieldsDesigner)));
            builder.AddCustomAttributes(typeof(GetUserFields), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetTicketFieldOption), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetTicketFieldOption), new DesignerAttribute(typeof(GetTicketFieldOptionDesigner)));
            builder.AddCustomAttributes(typeof(GetTicketFieldOption), new HelpKeywordAttribute(""));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#17
0
        static PathExistsActivity()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(PathExistsActivity), "PathType", new EditorAttribute(typeof(PathTypeEditor), typeof(PathTypeEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#18
0
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            Type stateMachineType = typeof(StateMachine);

            builder.AddCustomAttributes(stateMachineType, new DesignerAttribute(typeof(StateMachineDesigner)));
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateContainerEditor.ChildStatesPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.VariablesPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateMachineType, stateMachineType.GetProperty(StateMachineDesigner.InitialStatePropertyName), BrowsableAttribute.No);

            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(StateContainerEditor.ChildStatesPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.TransitionsPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(stateType, stateType.GetProperty(StateDesigner.IsFinalPropertyName), BrowsableAttribute.No);

            Type transitionType = typeof(Transition);

            builder.AddCustomAttributes(transitionType, new DesignerAttribute(typeof(TransitionDesigner)));
            builder.AddCustomAttributes(transitionType, transitionType.GetProperty(TransitionDesigner.TriggerPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(transitionType, transitionType.GetProperty(TransitionDesigner.ActionPropertyName), BrowsableAttribute.No);
            builder.AddCustomAttributes(transitionType, transitionType.GetProperty(TransitionDesigner.ToPropertyName), BrowsableAttribute.No);

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#19
0
        static DoubleClickActivity()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(DoubleClickActivity), "KeyModifiers", new EditorAttribute(typeof(KeyModifiersEditor), typeof(PropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public void Register()
        {
            CategoryAttribute category = new CategoryAttribute(Resources.DropboxActivitiesCategory);

            AttributeTableBuilder builder = new AttributeTableBuilder();
            ShowPropertyInOutlineViewAttribute hideFromOutlineAttribute = new ShowPropertyInOutlineViewAttribute()
            {
                CurrentPropertyVisible = false, DuplicatedChildNodesVisible = false
            };

            builder.AddCustomAttributes(typeof(WithDropboxSession), nameof(WithDropboxSession.Body), hideFromOutlineAttribute);

            builder.AddCustomAttributes(typeof(Copy), category);
            builder.AddCustomAttributes(typeof(CreateFile), category);
            builder.AddCustomAttributes(typeof(CreateFolder), category);
            builder.AddCustomAttributes(typeof(Delete), category);
            builder.AddCustomAttributes(typeof(DownloadFile), category);
            builder.AddCustomAttributes(typeof(DownloadFolderAsZip), category);
            builder.AddCustomAttributes(typeof(GetFolderContent), category);
            builder.AddCustomAttributes(typeof(Move), category);
            builder.AddCustomAttributes(typeof(UploadFile), category);
            builder.AddCustomAttributes(typeof(WithDropboxSession), category);

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#21
0
        public RunVBA()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(RunVBA), nameof(RunVBA.Parameters), new EditorAttribute(typeof(DictionaryArgumentEditor), typeof(DialogPropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        /// <summary>
        /// Return the attribute table that is applied to design time.
        /// </summary>
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            LayoutMetadata.AddAttributes(builder);
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public static void RegisterAll()
        {
            var builder = new AttributeTableBuilder();

            RazorMailSenderDesinger.RegisterMetadata(builder);
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#24
0
        //这个方法是为了加载左边控件库的图标
        private static void LoadToolboxIconsForBuiltInActivities()
        {
            try
            {
                var sourceAssembly = Assembly.LoadFrom(@"Lib\Microsoft.VisualStudio.Activities.dll");

                var builder = new AttributeTableBuilder();

                if (sourceAssembly != null)
                {
                    var stream =
                        sourceAssembly.GetManifestResourceStream(
                            "Microsoft.VisualStudio.Activities.Resources.resources");
                    if (stream != null)
                    {
                        var resourceReader = new ResourceReader(stream);

                        foreach (var type in
                                 typeof(System.Activities.Activity).Assembly.GetTypes().Where(
                                     t => t.Namespace == "System.Activities.Statements"))
                        {
                            CreateToolboxBitmapAttributeForActivity(builder, resourceReader, type);
                        }
                    }
                }

                MetadataStore.AddAttributeTable(builder.CreateTable());
            }
            catch (FileNotFoundException)
            {
                // Ignore - will use default icons
            }
        }
示例#25
0
        private void LoadDesigner()
        {
            Designer = new WorkflowDesigner();

            var tbx = GetToolboxControl();

            grid_designsurface.Children.Add(tbx);
            grid_designsurface.Children.Add(Designer.View);
            grid_designsurface.Children.Add(Designer.PropertyInspectorView);

            Grid.SetColumn(tbx, 0);
            Grid.SetColumn(Designer.View, 1);
            Grid.SetColumn(Designer.PropertyInspectorView, 2);


            /**
             * Load activity designers
             *
             **/
            (new DesignerMetadata()).Register();
            AttributeTableBuilder builder = new AttributeTableBuilder();

            //Register Custom Designers.
            builder.AddCustomAttributes(typeof(CADesigner), new DesignerAttribute(typeof(CADesigner)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#26
0
        public SendMail()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(SendMail), "Files", new EditorAttribute(typeof(ArgumentCollectionEditor), typeof(DialogPropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public void Register()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(SetConfigurationActivity), new DesignerAttribute(typeof(SetConfigurationActivityDesigner)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
示例#28
0
        //构造函数自定义属性框
        public InsertJS()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(InsertJS), nameof(InsertJS.Parameters), new EditorAttribute(typeof(ArgumentCollectionEditor), typeof(DialogPropertyValueEditor)));
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        public void Register()
        {
            AttributeTableBuilder atb = new AttributeTableBuilder();

            atb.AddCustomAttributes(typeof(CalcShipping), new DesignerAttribute(typeof(CalcShippingDesigner)));
            MetadataStore.AddAttributeTable(atb.CreateTable());
        }
示例#30
0
        /// <summary>
        ///
        /// </summary>
        public void Register()
        {
            #region Setup

            var builder = new AttributeTableBuilder();
            builder.ValidateTable();

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

            #endregion Setup


            builder.AddCustomAttributes(typeof(GetProcessFromMainWindow), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetProcessFromMainWindow), new DesignerAttribute(typeof(GetProcessFromMainWindowDesigner)));
            builder.AddCustomAttributes(typeof(GetProcessFromMainWindow), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetCurrentProcess), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetCurrentProcess), new DesignerAttribute(typeof(GetCurrentProcessDesigner)));
            builder.AddCustomAttributes(typeof(GetCurrentProcess), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(SetMonitorProcess), categoryAttribute);
            builder.AddCustomAttributes(typeof(SetMonitorProcess), new DesignerAttribute(typeof(SetMonitorProcessDesigner)));
            builder.AddCustomAttributes(typeof(SetMonitorProcess), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(GetMonitoredValue), categoryAttribute);
            builder.AddCustomAttributes(typeof(GetMonitoredValue), new DesignerAttribute(typeof(GetProcessInfoDesigner)));
            builder.AddCustomAttributes(typeof(GetMonitoredValue), new HelpKeywordAttribute(""));

            builder.AddCustomAttributes(typeof(MonitorProcessInfoScope), categoryAttribute);
            builder.AddCustomAttributes(typeof(MonitorProcessInfoScope), new DesignerAttribute(typeof(MonitorProcessInfoScopeDesigner)));
            builder.AddCustomAttributes(typeof(MonitorProcessInfoScope), new HelpKeywordAttribute(""));


            MetadataStore.AddAttributeTable(builder.CreateTable());
        }