コード例 #1
0
 /// <summary>
 /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled.
 /// </summary>
 /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param>
 public override void RenderControl(HtmlTextWriter writer)
 {
     if (this.Visible)
     {
         RockControlHelper.RenderControl(this, writer);
     }
 }
コード例 #2
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Controls.Clear();
            RockControlHelper.CreateChildControls(this, Controls);
            EnsureChildControls();

            ddlActionList              = new RockDropDownList();
            ddlActionList.Label        = "Action";
            ddlActionList.AutoPostBack = true;
            ddlActionList.Items.Add(new ListItem("Do Nothing", "0"));
            ddlActionList.Items.Add(new ListItem("Push New Page", "1"));
            ddlActionList.Items.Add(new ListItem("Replace Current Page", "2"));
            ddlActionList.Items.Add(new ListItem("Pop Curent Page", "3"));
            ddlActionList.Items.Add(new ListItem("Open Browser", "4"));
            ddlActionList.SelectedIndexChanged += DdlActionList_SelectedIndexChanged;
            ddlActionList.CssClass              = "col-md-12";
            ddlActionList.ID = "ddlActionList_" + this.ID;

            ppPage = new PagePicker()
            {
                Label = "Page",
                ID    = "ppPage_" + this.ID
            };

            tbTarget = new RockTextBox()
            {
                Label = "Target",
                ID    = "tbTarget_" + this.ID
            };

            tbParameter = new RockTextBox()
            {
                Label = "Parameter",
                ID    = "tbParameter_" + this.ID
            };

            ddlRckipid       = new RockDropDownList();
            ddlRckipid.ID    = "ddlRckipid_" + this.ID;
            ddlRckipid.Label = "Send Impersonation Id";
            ddlRckipid.Items.Add(new ListItem("No", "0"));
            ddlRckipid.Items.Add(new ListItem("Yes", "1"));

            Controls.Add(ddlActionList);
            Controls.Add(ppPage);
            Controls.Add(tbTarget);
            Controls.Add(tbParameter);
            Controls.Add(ddlRckipid);
            EnsureChildControls();
        }
コード例 #3
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Controls.Clear();

            _bfFileType  = new BinaryFileTypePicker();
            _imgUploader = new ImageUploader();

            RockControlHelper.CreateChildControls(this, Controls);

            _bfFileType.ID                    = this.ID + "_bfFileType";
            _bfFileType.AutoPostBack          = true;
            _bfFileType.Label                 = "File Type";
            _bfFileType.SelectedIndexChanged += bfFileType_SelectedIndexChanged;
            Controls.Add(_bfFileType);

            _imgUploader.ID = this.ID + "_imgUploader";
            Controls.Add(_imgUploader);
        }