示例#1
0
        protected override void RenderToolPart(HtmlTextWriter output)
        {
            base.RenderToolPart(output);
            ToolPane tp = this.ParentToolPane;
            DisplayProfilePictures myWP =
                (DisplayProfilePictures)tp.SelectedWebPart;

            //output.Write("<div>");
            output.Write("<div class=\"UserSectionTitle\">");
            output.Write("<table style=\"PADDING-LEFT: 5px\" cellPadding=\"1\">");
            output.Write("<tbody>");
            output.Write("<tr>");

            output.Write("<td>");
            if (myWP.LargeImage)
            {
                output.Write("<input type=\"checkbox\" name=\"cbLargeSize\" checked=\"checked\" value=\"true\" />Large Size");
            }
            else
            {
                output.Write("<input type=\"checkbox\" name=\"cbLargeSize\" value=\"true\" />Large Size");
            }
            output.Write("</td>");
            output.Write("</tr>");
            output.Write("</tbody>");
            output.Write("</table>");
            output.Write("</div>");
        }
示例#2
0
        public override void ApplyChanges()
        {
            ToolPane tp = this.ParentToolPane;
            DisplayProfilePictures myWP =
                (DisplayProfilePictures)tp.SelectedWebPart;

            bool result = false;

            bool.TryParse(Page.Request["cbLargeSize"], out result);
            myWP.LargeImage = result;
        }