コード例 #1
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            NumericInputExtender numericInputExtender = new NumericInputExtender();

            numericInputExtender.TargetControlID = this.textBox.UniqueID;
            this.Controls.Add(numericInputExtender);
        }
コード例 #2
0
        protected override void CreateChildControls()
        {
            this.chkExpiryDate.Text      = Strings.TransportRuleExpiryDate;
            this.chkActivationDate.Text  = Strings.TransportRuleActivationDate;
            this.chkExpiryDate.ID        = string.Format("{0}_label", this.dtpExpiryDate.ID);
            this.chkActivationDate.ID    = string.Format("{0}_label", this.dtpActivationDate.ID);
            this.radRuleMode.CellPadding = 0;
            this.radRuleMode.Items.Add(new ListItem(Strings.EnforceRule, RuleMode.Enforce.ToString()));
            if (RbacPrincipal.Current.IsInRole("FFO") && !RbacPrincipal.Current.IsInRole("EOPPremium"))
            {
                this.radRuleMode.Items.Add(new ListItem(Strings.TestRuleDisabledFFO, RuleMode.Audit.ToString()));
            }
            else
            {
                this.radRuleMode.Items.Add(new ListItem(Strings.TestRuleEnabled, RuleMode.AuditAndNotify.ToString()));
                this.radRuleMode.Items.Add(new ListItem(Strings.TestRuleDisabled, RuleMode.Audit.ToString()));
            }
            this.radRuleMode.SelectedValue = RuleMode.Enforce.ToString();
            this.ruleModePanel.Controls.Add(new Label
            {
                Text = Strings.RuleModeDescription,
                ID   = string.Format("{0}_label", this.radRuleMode.ID)
            });
            this.ruleModePanel.Controls.Add(this.radRuleMode);
            NumericInputExtender numericInputExtender = new NumericInputExtender();

            numericInputExtender.TargetControlID = this.numberControl.UniqueID;
            this.rulePriorityPanel.Controls.Add(new Label
            {
                Text = Strings.TransportRulePriority,
                ID   = string.Format("{0}_label", this.numberControl.ID)
            });
            this.rulePriorityPanel.Controls.Add(new LiteralControl("<br />"));
            this.rulePriorityPanel.Controls.Add(this.numberControl);
            this.rulePriorityPanel.Controls.Add(numericInputExtender);
            this.staticOptionsPanel.Controls.Add(this.rulePriorityPanel);
            this.staticOptionsPanel.Controls.Add(this.ruleModePanel);
            this.activationExpiryPanel.Controls.Add(this.chkActivationDate);
            this.activationExpiryPanel.Controls.Add(this.dtpActivationDate);
            this.activationExpiryPanel.Controls.Add(this.chkExpiryDate);
            this.activationExpiryPanel.Controls.Add(this.dtpExpiryDate);
            this.ruleCommentsPanel.Controls.Add(new Label
            {
                Text = Strings.RuleComments,
                ID   = string.Format("{0}_label", this.txtComment.ID)
            });
            this.ruleCommentsPanel.Controls.Add(new LiteralControl("<br />"));
            this.ruleCommentsPanel.Controls.Add(this.txtComment);
            this.evenMoreOptionsPanel.Controls.Add(this.activationExpiryPanel);
            this.evenMoreOptionsPanel.Controls.Add(this.ruleCommentsPanel);
            base.CreateChildControls();
        }
コード例 #3
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            this.tbxAtLeast    = new TextBox();
            this.tbxAtLeast.ID = "tbxAtLeast";
            this.tbxAtMost     = new TextBox();
            this.tbxAtMost.ID  = "tbxAtMost";
            Label label  = new Label();
            Label label2 = new Label();

            label.ID    = this.tbxAtLeast.ID + "_label";
            label2.ID   = this.tbxAtMost.ID + "_label";
            label.Text  = Strings.AtLeast;
            label2.Text = Strings.AtMost;
            HtmlTable          htmlTable           = new HtmlTable();
            HtmlTableRow       htmlTableRow        = new HtmlTableRow();
            HtmlTableRow       htmlTableRow2       = new HtmlTableRow();
            HtmlTableCell      htmlTableCell       = new HtmlTableCell();
            HtmlTableCell      htmlTableCell2      = new HtmlTableCell();
            HtmlTableCell      htmlTableCell3      = new HtmlTableCell();
            HtmlTableCell      htmlTableCell4      = new HtmlTableCell();
            HtmlGenericControl htmlGenericControl  = new HtmlGenericControl("div");
            HtmlGenericControl htmlGenericControl2 = new HtmlGenericControl("div");

            htmlTable.CellPadding = (htmlTable.CellSpacing = 0);
            htmlTableCell2.Attributes.Add("class", "labelCell");
            htmlTableCell.Attributes.Add("class", "labelCell");
            htmlTableCell4.Attributes.Add("class", "inputCell");
            htmlTableCell3.Attributes.Add("class", "inputCell");
            htmlGenericControl.Controls.Add(label);
            htmlTableCell.Controls.Add(htmlGenericControl);
            htmlTableCell3.Controls.Add(this.tbxAtLeast);
            htmlTableRow.Cells.Add(htmlTableCell);
            htmlTableRow.Cells.Add(htmlTableCell3);
            htmlTable.Rows.Add(htmlTableRow);
            htmlGenericControl2.Controls.Add(label2);
            htmlTableCell2.Controls.Add(htmlGenericControl2);
            htmlTableCell4.Controls.Add(this.tbxAtMost);
            htmlTableRow2.Cells.Add(htmlTableCell2);
            htmlTableRow2.Cells.Add(htmlTableCell4);
            htmlTable.Rows.Add(htmlTableRow2);
            this.Controls.Add(htmlTable);
            NumericInputExtender numericInputExtender = new NumericInputExtender();

            numericInputExtender.TargetControlID = this.tbxAtLeast.UniqueID;
            this.Controls.Add(numericInputExtender);
            NumericInputExtender numericInputExtender2 = new NumericInputExtender();

            numericInputExtender2.TargetControlID = this.tbxAtMost.UniqueID;
            this.Controls.Add(numericInputExtender2);
        }