public WorkflowViewModel(ScopeViewModel currentScope, WorkflowDescription description, ServiceContext context)
            : base(currentScope)
        {
            this.description = description;
            this.context     = context;
            this.ShowExternalVariablesCommand = new SimpleActionCommand(this.OnShowExternalVariables);
            this.ShowInstancesCommand         = new SimpleActionCommand(this.OnShowInstances);
            this.ShowMetadataCommand          = new SimpleActionCommand(this.OnShowMetadata);
            this.ShowConfigurationCommand     = new SimpleActionCommand(this.OnShowConfiguration);
            this.ShowRootActivityCommand      = new SimpleActionCommand(this.OnShowRootActivityXaml);

            if (this.description.Configuration != null)
            {
                this.configurationViewModel   = new WorkflowConfigurationViewModel(this.description.Configuration);
                this.ShowConfigurationCommand = new SimpleActionCommand(this.OnShowConfiguration);
            }
        }
Esempio n. 2
0
        public ScopeViewModel(ScopeDescription scope, ScopeViewModel parentScope, ServiceContext context)
            : base(parentScope)
        {
            this.scope       = scope;
            this.parentScope = parentScope;
            this.context     = context;

            this.title = this.scope.Name();
            this.ShowActivitiesCommand       = new SimpleActionCommand(this.OnShowActivities);
            this.ShowWorkflowsCommand        = new SimpleActionCommand(this.OnShowWorkflows);
            this.ShowSecuritySettingsCommand = new SimpleActionCommand(this.OnShowSecuritySettings);

            if (this.scope.DefaultWorkflowConfiguration != null)
            {
                this.configurationViewModel   = new WorkflowConfigurationViewModel(this.scope.DefaultWorkflowConfiguration);
                this.ShowConfigurationCommand = new SimpleActionCommand(this.OnShowConfiguration);
            }
        }