示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AddDelayForm"/> class.
        /// </summary>
        public AddDelayForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);
                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, true);
                this.timeoutDuration = this.controller.AddTextBox(ActivitySettings.AddDelayTimeoutDuration, ActivitySettings.AddDelayTimeoutDurationHelpText, true, true);
                this.timeoutDuration.TextBoxControl.Width = 300;
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RequestApprovalForm"/> class.
        /// </summary>
        public RequestApprovalForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, true);

                this.approvers = this.controller.AddTextBox(ActivitySettings.RequestApprovalApprovers, ActivitySettings.RequestApprovalApproversHelpText, true, true);
                this.approvers.TextBoxControl.Width = 300;

                this.threshold = this.controller.AddTextBox(ActivitySettings.RequestApprovalThreshold, ActivitySettings.RequestApprovalThresholdHelpText, true, true);
                this.threshold.TextBoxControl.Width = 300;

                this.duration = this.controller.AddTextBox(ActivitySettings.RequestApprovalDuration, ActivitySettings.RequestApprovalDurationHelpText, true, true);
                this.duration.TextBoxControl.Width = 300;

                this.escalation = this.controller.AddTextBox(ActivitySettings.RequestApprovalEscalation, ActivitySettings.RequestApprovalEscalationHelpText, false, true);
                this.escalation.TextBoxControl.Width = 300;

                this.approvalEmailTemplate = this.controller.AddTextBox(ActivitySettings.RequestApprovalEmailTemplate, ActivitySettings.RequestApprovalEmailTemplateHelpText, true, true);
                this.approvalEmailTemplate.TextBoxControl.Width = 300;

                this.approvalEscalationEmailTemplate = this.controller.AddTextBox(ActivitySettings.RequestApprovalEscalationEmailTemplate, ActivitySettings.RequestApprovalEscalationEmailTemplateHelpText, false, true);
                this.approvalEscalationEmailTemplate.TextBoxControl.Width = 300;

                this.approvalCompleteEmailTemplate = this.controller.AddTextBox(ActivitySettings.RequestApprovalCompleteEmailTemplate, ActivitySettings.RequestApprovalCompleteEmailTemplateHelpText, true, true);
                this.approvalCompleteEmailTemplate.TextBoxControl.Width = 300;

                this.approvalDeniedEmailTemplate = this.controller.AddTextBox(ActivitySettings.RequestApprovalDeniedEmailTemplate, ActivitySettings.RequestApprovalDeniedEmailTemplateHelpText, true, true);
                this.approvalDeniedEmailTemplate.TextBoxControl.Width = 300;

                this.approvalTimeoutEmailTemplate = this.controller.AddTextBox(ActivitySettings.RequestApprovalTimeoutEmailTemplate, ActivitySettings.RequestApprovalTimeoutEmailTemplateHelpText, true, true);
                this.approvalTimeoutEmailTemplate.TextBoxControl.Width = 300;

                // Populates default values for various fields
                this.threshold.Value = "1";
                this.duration.Value = "7";
                this.approvalEmailTemplate.Value = "/EmailTemplate[DisplayName='Default pending approval email template']";
                this.approvalCompleteEmailTemplate.Value = "/EmailTemplate[DisplayName='Default completed approval email template']";
                this.approvalDeniedEmailTemplate.Value = "/EmailTemplate[DisplayName='Default rejected request email template']";
                this.approvalTimeoutEmailTemplate.Value = "/EmailTemplate[DisplayName='Default timed out request email template']";
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Adds the display name textbox.
        /// </summary>
        /// <param name="id">The activity control identifier.</param>
        /// <param name="displayName">The display name of the control.</param>
        /// <param name="description">The description of the control.</param>
        /// <param name="required">if set to true, the control is required. Otherwise not required.</param>
        /// <param name="visible">if set to true, the control is visible. Otherwise not visible.</param>
        /// <returns>The <see cref="ActivityTextBox"/> object.</returns>
        private ActivityTextBox AddDisplayNameTextBox(string id, string displayName, string description, bool required, bool visible)
        {
            // A single activity display name text box can be added to the form: throw an exception if a second is added
            // A display name text box is created as a standard activity text box
            if (this.activityDisplayName != null)
            {
                throw Logger.Instance.ReportError(new WorkflowActivityLibraryException(ActivitySettings.ActivityDisplayNameControlValidationError));
            }

            ActivityTextBox control = new ActivityTextBox(id, displayName, description, required, visible);
            this.activityDisplayName = control;
            this.AddActivityControl(control);
            return control;
        }
 /// <summary>
 /// Adds the textbox.
 /// </summary>
 /// <param name="id">The activity control identifier.</param>
 /// <param name="displayName">The display name of the control.</param>
 /// <param name="description">The description of the control.</param>
 /// <param name="required">if set to true, the control is required. Otherwise not required.</param>
 /// <param name="visible">if set to true, the control is visible. Otherwise not visible.</param>
 /// <returns>The <see cref="ActivityTextBox"/> object.</returns>
 private ActivityTextBox AddTextBox(string id, string displayName, string description, bool required, bool visible)
 {
     ActivityTextBox control = new ActivityTextBox(id, displayName, description, required, visible);
     this.AddActivityControl(control);
     return control;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DeleteResourcesForm"/> class.
        /// </summary>
        public DeleteResourcesForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);
                this.targetType = this.controller.AddDropDownList(ActivitySettings.TargetForDeletion, ActivitySettings.TargetForDeletionHelpText);

                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);
                this.iteration = this.controller.AddTextBox(ActivitySettings.Iteration, ActivitySettings.IterationHelpText, false, false);
                this.iteration.TextBoxControl.AutoPostBack = true;

                this.actorType = this.controller.AddDropDownList(ActivitySettings.RequestActor, false, false);
                this.actorType.AddListItem(ActivitySettings.ServiceAccount, ActorType.Service.ToString());
                this.actorType.AddListItem(ActivitySettings.Requestor, ActorType.Requestor.ToString());
                this.actorType.AddListItem(ActivitySettings.ResolveFromExpression, ActorType.Resolve.ToString());
                this.actorType.AddListItem(ActivitySettings.SearchByAccountName, ActorType.Account.ToString());
                this.actorType.DropDownListControl.SelectedIndexChanged += this.ActorType_SelectedIndexChanged;
                this.actorType.DropDownListControl.AutoPostBack = true;

                this.actorString = this.controller.AddTextBox(ActivitySettings.ActorString, false, false);
                this.applyAuthorizationPolicy = this.controller.AddCheckBox(ActivitySettings.ApplyAuthorizationPolicy, ActivitySettings.ApplyAuthorizationPolicyHelpText, false, false);
                this.applyAuthorizationPolicy.CheckBoxControl.AutoPostBack = true;

                this.targetExpression = this.controller.AddTextBox(ActivitySettings.TargetExpression, false, false);
                this.targetExpression.TextBoxControl.Width = 300;

                // Add list items to the target type drop down list and set an event handler
                this.targetType.AddListItem(ActivitySettings.UseWorkflowTarget, DeleteResourcesTargetType.WorkflowTarget.ToString());
                this.targetType.AddListItem(ActivitySettings.ResolveTargets, DeleteResourcesTargetType.ResolveTarget.ToString());
                this.targetType.AddListItem(ActivitySettings.SearchForTargets, DeleteResourcesTargetType.SearchForTarget.ToString());
                this.targetType.DropDownListControl.SelectedIndexChanged += this.TargetType_SelectedIndexChanged;
                this.targetType.DropDownListControl.AutoPostBack = true;
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
示例#6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RunPowerShellScriptForm"/> class.
        /// </summary>
        public RunPowerShellScriptForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);

                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);

                this.powerShellUser = this.controller.AddTextBox(ActivitySettings.PowerShellUser, ActivitySettings.PowerShellUserHelpText, false, false);
                this.powerShellUserPassword = this.controller.AddTextBox(ActivitySettings.PowerShellUserPassword, ActivitySettings.PowerShellUserPasswordHelpText, false, false);

                this.impersonatePowerShellUser = this.controller.AddCheckBox(ActivitySettings.ImpersonatePowerShellUser, ActivitySettings.ImpersonatePowerShellUserHelpText, false, false);
                this.impersonatePowerShellUser.CheckBoxControl.CheckedChanged += this.ImpersonatePowerShellUser_CheckedChanged;
                this.impersonatePowerShellUser.CheckBoxControl.AutoPostBack = true;

                this.loadUserProfile = this.controller.AddCheckBox(ActivitySettings.LoadUserProfile, ActivitySettings.LoadUserProfileHelpText, false, false);
                this.impersonationLogOnType = this.controller.AddDropDownList(ActivitySettings.ImpersonationLogOnType, ActivitySettings.ImpersonationLogonTypeHelpText, false, false);

                this.scriptLocation = this.controller.AddDropDownList(ActivitySettings.PowerShellScriptLocation, ActivitySettings.PowerShellScriptLocationHelpText);
                this.script = this.controller.AddTextBox(ActivitySettings.PowerShellScript, ActivitySettings.PowerShellScriptHelpText, true);
                this.failOnMissing = this.controller.AddCheckBox(ActivitySettings.FailOnMissingScript, ActivitySettings.FailOnMissingScriptHelpText, false, false);
                this.inputType = this.controller.AddDropDownList(ActivitySettings.PowerShellScriptInputType, ActivitySettings.PowerShellScriptInputTypeHelpText);

                // Create a new instance of the definitions controller to capture parameters
                // The visibility of the parameters control will be based on the input type selection
                this.parameters = new DefinitionsController("Parameters", 150, 430, 0)
                {
                    DisplayName = ActivitySettings.NamedParameters,
                    Description = ActivitySettings.NamedParametersHelpText,
                    LeftHeader = ActivitySettings.NamedParametersLeftHeader,
                    RightHeader = ActivitySettings.NamedParametersRightHeader
                };
                this.parameters.HeaderRow.Visible = false;
                this.parameters.TableRow.Visible = false;
                this.controller.ActivityControlTable.Rows.Add(this.parameters.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.parameters.TableRow);

                // Create a new instance of the definitions controller to capture arguments
                // The visibility of the arguments control will be based on the input type selection
                this.arguments = new DefinitionsController("Arguments", 500, 0, 0)
                {
                    DisplayName = ActivitySettings.ScriptArguments,
                    Description = ActivitySettings.ScriptArgumentsHelpText,
                    LeftHeader = ActivitySettings.ScriptArgumentsLeftHeader
                };
                this.arguments.HeaderRow.Visible = false;
                this.arguments.TableRow.Visible = false;
                this.controller.ActivityControlTable.Rows.Add(this.arguments.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.arguments.TableRow);

                // Now that input controls have been added, add controls for return type
                // The return value lookup control will only be presented when explicit return is selected
                this.returnType = this.controller.AddDropDownList(ActivitySettings.ScriptReturnType, ActivitySettings.ScriptReturnTypeHelpText);
                this.returnValueLookup = this.controller.AddTextBox(ActivitySettings.ScriptReturnValueLookup, ActivitySettings.ScriptReturnValueLookupHelpText, false, false);

                // Configure controls
                this.script.TextBoxControl.TextMode = TextBoxMode.MultiLine;
                this.script.TextBoxControl.Wrap = false;
                this.script.TextBoxControl.Width = 300;
                this.script.TextBoxControl.Rows = 10;

                this.failOnMissing.Value = true;

                this.scriptLocation.AddListItem(ActivitySettings.ScriptLocationWorkflowDefinition, PowerShellScriptLocation.WorkflowDefinition.ToString());
                this.scriptLocation.AddListItem(ActivitySettings.ScriptLocationDisk, PowerShellScriptLocation.Disk.ToString());
                this.scriptLocation.AddListItem(ActivitySettings.ScriptLocationResolveLookup, PowerShellScriptLocation.Resource.ToString());
                this.scriptLocation.DropDownListControl.SelectedIndexChanged += this.ScriptLocation_SelectedIndexChanged;
                this.scriptLocation.DropDownListControl.AutoPostBack = true;

                this.inputType.AddListItem(ActivitySettings.PowerShellInputTypeNone, PowerShellInputType.None.ToString());
                this.inputType.AddListItem(ActivitySettings.PowerShellInputTypeNamedParameters, PowerShellInputType.Parameters.ToString());
                this.inputType.AddListItem(ActivitySettings.PowerShellInputTypeArguments, PowerShellInputType.Arguments.ToString());
                this.inputType.DropDownListControl.SelectedIndexChanged += this.InputType_SelectedIndexChanged;
                this.inputType.DropDownListControl.AutoPostBack = true;

                this.returnType.AddListItem(ActivitySettings.PowerShellReturnTypeNone, PowerShellReturnType.None.ToString());
                this.returnType.AddListItem(ActivitySettings.PowerShellReturnTypeSingleValue, PowerShellReturnType.Explicit.ToString());
                this.returnType.AddListItem(ActivitySettings.PowerShellReturnTypeTable, PowerShellReturnType.Table.ToString());
                this.returnType.DropDownListControl.SelectedIndexChanged += this.ReturnType_SelectedIndexChanged;
                this.returnType.DropDownListControl.AutoPostBack = true;

                this.impersonationLogOnType.AddListItem(ActivitySettings.ImpersonationLogOnTypeLogOnBatch, LogOnType.LogOnBatch.ToString());
                this.impersonationLogOnType.AddListItem(ActivitySettings.ImpersonationLogOnTypeLogOnNetwork, LogOnType.LogOnNetwork.ToString());
                this.impersonationLogOnType.AddListItem(ActivitySettings.ImpersonationLogOnTypeLogOnService, LogOnType.LogOnService.ToString());
                this.impersonationLogOnType.AddListItem(ActivitySettings.ImpersonationLogOnTypeLogOnNetworkClearText, LogOnType.LogOnNetworkClearText.ToString());
                this.impersonationLogOnType.AddListItem(ActivitySettings.ImpersonationLogOnTypeLogOnInteractive, LogOnType.LogOnInteractive.ToString());
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GenerateUniqueValueForm"/> class.
        /// </summary>
        public GenerateUniqueValueForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);
                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, true);
                this.publicationTarget = this.controller.AddTextBox(ActivitySettings.TargetForGeneratedValue, ActivitySettings.TargetForGeneratedValueHelpText, true);
                this.conflictFilter = this.controller.AddTextBox(ActivitySettings.ConflictFilter, ActivitySettings.ConflictFilterHelpText, true);
                this.queryLdap = this.controller.AddCheckBox(ActivitySettings.QueryLdapForConflicts, ActivitySettings.QueryLdapForConflictsHelpText);

                // Create a new instance of the definitions controller to capture ldap query definitions
                // The visibility of the queries control will be governed by the Query LDAP checkbox
                this.ldapQueries = new DefinitionsController("LDAPQueries", 250, 330, 0)
                {
                    DisplayName = ActivitySettings.LdapQueries,
                    Description = ActivitySettings.LdapQueriesHelpText,
                    LeftHeader = ActivitySettings.LdapQueriesLeftHeader,
                    RightHeader = ActivitySettings.LdapQueriesRightHeader
                };
                this.ldapQueries.HeaderRow.Visible = false;
                this.ldapQueries.TableRow.Visible = false;
                this.controller.ActivityControlTable.Rows.Add(this.ldapQueries.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.ldapQueries.TableRow);
                this.uniquenessSeed = this.controller.AddTextBoxNumeric(ActivitySettings.UniquenessKeySeed, ActivitySettings.UniquenessKeySeedHelpText, true);
                this.uniquenessSeed.DisplayZeroValue = true;

                // Create a new definitions controller to allow for the specification
                // of value expressions
                this.valueExpressions = new DefinitionsController("ValueExpressions", 500, 0, 0)
                {
                    DisplayName = ActivitySettings.ValueExpressions,
                    Description = ActivitySettings.ValueExpressionsHelpText,
                    LeftHeader = ActivitySettings.ValueExpressionsLeftHeader
                };
                this.controller.ActivityControlTable.Rows.Add(this.valueExpressions.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.valueExpressions.TableRow);

                this.queryLdap.CheckBoxControl.CheckedChanged += this.QueryLdap_CheckedChanged;
                this.queryLdap.CheckBoxControl.AutoPostBack = true;
                this.conflictFilter.TextBoxControl.Width = 300;
                this.uniquenessSeed.Value = 2;
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateResourcesForm"/> class.
        /// </summary>
        public UpdateResourcesForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);

                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.queryResources = this.controller.AddCheckBox(ActivitySettings.QueryResources, ActivitySettings.QueryResourcesHelpText, false, false);
                this.queryResources.CheckBoxControl.CheckedChanged += this.QueryResources_CheckedChanged;
                this.queryResources.CheckBoxControl.AutoPostBack = true;

                // Create a new instance of the definitions controller to capture query definitions
                // The visibility of the queries control will be governed by the Query Resources checkbox
                this.queries = new DefinitionsController("Queries", 150, 430, 0)
                {
                    DisplayName = ActivitySettings.Queries,
                    Description = ActivitySettings.QueriesHelpText,
                    LeftHeader = ActivitySettings.QueriesLeftHeader,
                    RightHeader = ActivitySettings.QueriesRightHeader
                };
                this.queries.HeaderRow.Visible = false;
                this.queries.TableRow.Visible = false;
                this.controller.ActivityControlTable.Rows.Add(this.queries.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.queries.TableRow);

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);
                this.iteration = this.controller.AddTextBox(ActivitySettings.Iteration, ActivitySettings.IterationHelpText, false, false);

                this.actorType = this.controller.AddDropDownList(ActivitySettings.RequestActor, false, false);
                this.actorType.AddListItem(ActivitySettings.ServiceAccount, ActorType.Service.ToString());
                this.actorType.AddListItem(ActivitySettings.Requestor, ActorType.Requestor.ToString());
                this.actorType.AddListItem(ActivitySettings.ResolveFromExpression, ActorType.Resolve.ToString());
                this.actorType.AddListItem(ActivitySettings.SearchByAccountName, ActorType.Account.ToString());
                this.actorType.DropDownListControl.SelectedIndexChanged += this.ActorType_SelectedIndexChanged;
                this.actorType.DropDownListControl.AutoPostBack = true;

                this.actorString = this.controller.AddTextBox(ActivitySettings.ActorString, false, false);
                this.applyAuthorizationPolicy = this.controller.AddCheckBox(ActivitySettings.ApplyAuthorizationPolicy, ActivitySettings.ApplyAuthorizationPolicyHelpText, false, false);
                this.resolveDynamicGrammar = this.controller.AddCheckBox(ActivitySettings.ResolveDynamicGrammar, ActivitySettings.ResolveDynamicGrammarHelpText, false, false);

                // Create a new definitions controller to capture update definitions
                this.updates = new DefinitionsController("Updates", 330, 250, 70)
                {
                    DisplayName = ActivitySettings.Updates,
                    Description = ActivitySettings.UpdatesHelpText,
                    LeftHeader = ActivitySettings.UpdatesLeftHeader,
                    RightHeader = ActivitySettings.UpdatesRightHeader,
                    CheckHeader = ActivitySettings.UpdatesCheckHeader
                };
                this.controller.ActivityControlTable.Rows.Add(this.updates.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.updates.TableRow);
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateResourceForm"/> class.
        /// </summary>
        public CreateResourceForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);
                this.resourceType = this.controller.AddTextBox(ActivitySettings.ResourceType, ActivitySettings.ResourceTypeHelpText, true);

                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.queryResources = this.controller.AddCheckBox(ActivitySettings.QueryResources, ActivitySettings.QueryResourcesHelpText, false, false);
                this.queryResources.CheckBoxControl.CheckedChanged += this.QueryResources_CheckedChanged;
                this.queryResources.CheckBoxControl.AutoPostBack = true;

                // Create a new instance of the definitions controller to capture query definitions
                // The visibility of the queries control will be governed by the Query Resources checkbox
                this.queries = new DefinitionsController("Queries", 150, 430, 0)
                {
                    DisplayName = ActivitySettings.Queries,
                    Description = ActivitySettings.QueriesHelpText,
                    LeftHeader = ActivitySettings.QueriesLeftHeader,
                    RightHeader = ActivitySettings.QueriesRightHeader
                };
                this.queries.HeaderRow.Visible = false;
                this.queries.TableRow.Visible = false;
                this.controller.ActivityControlTable.Rows.Add(this.queries.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.queries.TableRow);

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);
                this.iteration = this.controller.AddTextBox(ActivitySettings.Iteration, ActivitySettings.IterationHelpText, false, false);
                this.iteration.TextBoxControl.TextChanged += this.Iteration_TextChanged;
                this.iteration.TextBoxControl.AutoPostBack = true;

                this.actorType = this.controller.AddDropDownList(ActivitySettings.RequestActor, false, false);
                this.actorType.AddListItem(ActivitySettings.ServiceAccount, ActorType.Service.ToString());
                this.actorType.AddListItem(ActivitySettings.Requestor, ActorType.Requestor.ToString());
                this.actorType.AddListItem(ActivitySettings.ResolveFromExpression, ActorType.Resolve.ToString());
                this.actorType.AddListItem(ActivitySettings.SearchByAccountName, ActorType.Account.ToString());
                this.actorType.DropDownListControl.SelectedIndexChanged += this.ActorType_SelectedIndexChanged;
                this.actorType.DropDownListControl.AutoPostBack = true;

                this.actorString = this.controller.AddTextBox(ActivitySettings.ActorString, false, false);
                this.applyAuthorizationPolicy = this.controller.AddCheckBox(ActivitySettings.ApplyAuthorizationPolicy, ActivitySettings.ApplyAuthorizationPolicyHelpText, false, false);
                this.applyAuthorizationPolicy.CheckBoxControl.CheckedChanged += this.ApplyAuthorizationPolicy_CheckedChanged;
                this.applyAuthorizationPolicy.CheckBoxControl.AutoPostBack = true;

                // Add additional controls
                // The visibility of conflict controls will be governed by the Check for Conflict checkbox
                this.createdResourceIdTarget = this.controller.AddTextBox(ActivitySettings.TargetForCreatedResourceID, ActivitySettings.TargetForCreatedResourceIDHelpText, false, false);
                this.checkForConflict = this.controller.AddCheckBox(ActivitySettings.CheckForConflict, ActivitySettings.CheckForConflictHelpText, false, false);
                this.checkForConflict.CheckBoxControl.CheckedChanged += this.CheckForConflict_CheckedChanged;
                this.checkForConflict.CheckBoxControl.AutoPostBack = true;

                this.conflictFilter = this.controller.AddTextBox(ActivitySettings.ConflictingResourceSearchFilter, ActivitySettings.ConflictingResourceSearchFilterHelpText, false, false);
                this.conflictFilter.TextBoxControl.Width = 300;

                this.conflictingResourceIdTarget = this.controller.AddTextBox(ActivitySettings.TargetForConflictingResourceID, ActivitySettings.TargetForConflictingResourceIDHelpText, false, false);
                this.failOnConflict = this.controller.AddCheckBox(ActivitySettings.FailOnConflict, ActivitySettings.FailOnConflictHelpText, false, false);

                // Create a new instance of hte definitions controller to capture attribute definitions
                this.attributes = new DefinitionsController("Attributes", 380, 200, 0)
                {
                    DisplayName = ActivitySettings.AttributesPopulation,
                    Description = ActivitySettings.AttributesPopulationHelpText,
                    LeftHeader = ActivitySettings.AttributesPopulationLeftHeader,
                    RightHeader = ActivitySettings.AttributesPopulationRightHeader
                };
                this.controller.ActivityControlTable.Rows.Add(this.attributes.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.attributes.TableRow);
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
示例#10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VerifyRequestForm"/> class.
        /// </summary>
        public VerifyRequestForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);
                
                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);
                this.checkForConflict = this.controller.AddCheckBox(ActivitySettings.VerifyResourceUniqueness, ActivitySettings.VerifyResourceUniquenessHelpText);
                this.conflictFilter = this.controller.AddTextBox(ActivitySettings.ConflictingResourceSearchFilter, ActivitySettings.ConflictingResourceSearchFilterHelpText2, false, false);
                this.conflictDenialMessage = this.controller.AddTextBox(ActivitySettings.ConflictDenialMessage, ActivitySettings.ConflictDenialMessageHelpText, false, false);
                this.checkForRequestConflict = this.controller.AddCheckBox(ActivitySettings.VerifyRequestUniqueness, ActivitySettings.VerifyRequestUniquenessHelpText);
                this.requestConflictAdvancedFilter = this.controller.AddTextBox(ActivitySettings.AdvancedRequestSearchFilter, ActivitySettings.AdvancedRequestSearchFilterHelpText, false, false);
                this.requestConflictMatchCondition = this.controller.AddTextBox(ActivitySettings.RequestConflictMatchCondition, ActivitySettings.RequestConflictMatchConditionHelpText, false, false);
                this.requestConflictDenialMessage = this.controller.AddTextBox(ActivitySettings.RequestConflictDenialMessage, ActivitySettings.RequestConflictDenialMessageHelpText, false, false);

                // Create a new definitions controller to allow for the specification
                // of attribute update definitions
                this.conditions = new DefinitionsController("Conditions", 250, 350, 0)
                {
                    DisplayName = ActivitySettings.RequiredRequestConditions,
                    Description = ActivitySettings.RequiredRequestConditionsHelpText,
                    LeftHeader = ActivitySettings.RequiredRequestConditionsLeftHeader,
                    RightHeader = ActivitySettings.RequiredRequestConditionsRightHeader
                };
                this.controller.ActivityControlTable.Rows.Add(this.conditions.HeaderRow);
                this.controller.ActivityControlTable.Rows.Add(this.conditions.TableRow);

                // Modify the width of some of the controls
                this.conflictFilter.TextBoxControl.Width = 300;
                this.conflictDenialMessage.TextBoxControl.Width = 300;
                this.requestConflictAdvancedFilter.TextBoxControl.Width = 300;
                this.requestConflictMatchCondition.TextBoxControl.Width = 300;
                this.requestConflictDenialMessage.TextBoxControl.Width = 300;

                // Add event handlers to check boxes which manage the visibility of other controls
                this.checkForConflict.CheckBoxControl.CheckedChanged += this.CheckForConflict_CheckedChanged;
                this.checkForConflict.CheckBoxControl.AutoPostBack = true;
                this.checkForRequestConflict.CheckBoxControl.CheckedChanged += this.CheckForRequestConflict_CheckedChanged;
                this.checkForRequestConflict.CheckBoxControl.AutoPostBack = true;
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SendEmailNotificationForm"/> class.
        /// </summary>
        public SendEmailNotificationForm()
        {
            Logger.Instance.WriteMethodEntry();

            try
            {
                // Add the standard controls to the form via the activity form controller
                this.activityDisplayName = this.controller.AddDisplayNameTextBox(ActivitySettings.ActivityDisplayName);

                this.advanced = this.controller.AddCheckBox(ActivitySettings.AdvancedFeatures, ActivitySettings.AdvancedFeaturesHelpText);
                this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
                this.advanced.CheckBoxControl.AutoPostBack = true;

                this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);

                this.emailTemplate = this.controller.AddTextBox(ActivitySettings.SendEmailNotificationEmailTemplate, ActivitySettings.SendEmailNotificationEmailTemplateHelpText, true, true);
                this.emailTemplate.TextBoxControl.Width = 300;

                this.to = this.controller.AddTextBox(ActivitySettings.SendEmailNotificationTo, ActivitySettings.SendEmailNotificationToHelpText, true, true);
                this.to.TextBoxControl.Width = 300;

                this.cc = this.controller.AddTextBox(ActivitySettings.SendEmailNotificationCC, ActivitySettings.SendEmailNotificationCCHelpText, false, false);
                this.cc.TextBoxControl.Width = 300;

                this.bcc = this.controller.AddTextBox(ActivitySettings.SendEmailNotificationBcc, ActivitySettings.SendEmailNotificationBccHelpText, false, false);
                this.bcc.TextBoxControl.Width = 300;

                this.suppressException = this.controller.AddCheckBox(ActivitySettings.SendEmailNotificationSuppressException, ActivitySettings.SendEmailNotificationSuppressExceptionHelpText, false, false);
            }
            catch (Exception e)
            {
                Logger.Instance.ReportError(e);
                throw;
            }
            finally
            {
                Logger.Instance.WriteMethodExit();
            }
        }