示例#1
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);

            writer.AddStyleAttribute("background-color", GetStatusBackColor());
            writer.AddStyleAttribute("color", GetStatusForeColor());

            writer.RenderBeginTag("span");

            writer.Write(status.ToString().ToLower());

            writer.RenderEndTag();
        }
示例#2
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            double sum = 0;

            for (int i = 0; i < values.Count; i++)
            {
                sum += values[i];
            }

            AddAttributesToRender(writer);
            writer.RenderBeginTag("table");
            writer.RenderBeginTag("tr");

            for (int i = 0; i < values.Count; i++)
            {
                writer.AddStyleAttribute("width", String.Format("{0}%", (int)Math.Round(values[i] / sum * 100)));

                writer.RenderBeginTag("td");
                writer.RenderEndTag();
            }

            writer.RenderEndTag();
            writer.RenderEndTag();
        }
 void RenderOuterBorderLeftBottomCorner(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddStyleAttribute("background-repeat", "no-repeat");
     writer.AddStyleAttribute("background-position", "bottom left");
     if (OuterBorderLeftBottomCornerImageUrl.Length > 0)
         writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundImage, "url(" + ResolveClientUrl(OuterBorderLeftBottomCornerImageUrl) + ")");
     if (!String.IsNullOrEmpty(ClientID))
         writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_BorderLB");
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     //if (OuterBorderLeftBottomCornerImageUrl.Length > 0)
     //{
     //    writer.AddAttribute(HtmlTextWriterAttribute.Src, _urlResolver.ResolveClientUrl(OuterBorderLeftBottomCornerImageUrl));
     //    writer.AddAttribute(HtmlTextWriterAttribute.Alt, "");
     //    writer.RenderBeginTag(HtmlTextWriterTag.Img);
     //    writer.RenderEndTag();
     //}
     writer.RenderEndTag();
 }
        void RenderBeginOuterBorder(System.Web.UI.HtmlTextWriter writer)
        {
            if (OuterBorderStyle == OuterBorderStyle.None)
                return;

            AddClientScriptAttributes(writer);

            if (writer == null)
                throw new ArgumentNullException("writer");

            if (OuterBorderBackColor != Color.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(OuterBorderBackColor));

            writer.AddStyleAttribute(HtmlTextWriterStyle.Direction, "ltr");
            writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");
            writer.RenderBeginTag(HtmlTextWriterTag.Table);

            if ((OuterBorderStyle & OuterBorderStyle.Top) > 0)
                RenderOuterBorderTopRow(writer);

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);

            if ((OuterBorderStyle & OuterBorderStyle.Left) > 0)
                RenderOuterBorderLeft(writer);

            writer.RenderBeginTag(HtmlTextWriterTag.Td);

        }
示例#5
0
        ///
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            string pwdText = string.Empty;
            if(Filled) pwdText = "        ";

            base.AddAttributesToRender(writer);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            //Password Line
            PasswordLineStyle.AddAttributesToRender(writer);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            PasswordLabelStyle.AddAttributesToRender(writer);
            writer.AddAttribute(HtmlTextWriterAttribute.For, ClientID + "_pwd");
            writer.RenderBeginTag(HtmlTextWriterTag.Label);
            writer.WriteEncodedText(PasswordLabel);
            writer.RenderEndTag();

            PasswordBoxStyle.AddAttributesToRender(writer);
            writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_pwd");
            writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID + "_pwd");
            writer.AddAttribute(HtmlTextWriterAttribute.Type, "password");
            writer.AddAttribute(HtmlTextWriterAttribute.Value, pwdText);
            writer.AddAttribute(HtmlTextWriterAttribute.Onchange, "ESW_Password_Valid( " + ClientID + " );");
            writer.RenderBeginTag(HtmlTextWriterTag.Input);
            writer.RenderEndTag();

            writer.RenderEndTag();

            //Confirm Line
            ConfirmLineStyle.AddAttributesToRender(writer);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            ConfirmLabelStyle.AddAttributesToRender(writer);
            writer.AddAttribute(HtmlTextWriterAttribute.For, ClientID + "_conf");
            writer.RenderBeginTag(HtmlTextWriterTag.Label);
            writer.WriteEncodedText(ConfirmLabel);
            writer.RenderEndTag();

            ConfirmBoxStyle.AddAttributesToRender(writer);
            writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_conf");
            writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID + "_conf");
            writer.AddAttribute(HtmlTextWriterAttribute.Type, "password");
            writer.AddAttribute(HtmlTextWriterAttribute.Value, pwdText);
            writer.AddAttribute(HtmlTextWriterAttribute.Onchange, "ESW_Password_Valid( " + ClientID + " );");
            writer.RenderBeginTag(HtmlTextWriterTag.Input);
            writer.RenderEndTag();

            writer.RenderEndTag();

            //Error Line
            ErrorStyle.AddAttributesToRender(writer);
            if(IsValid)
            {
                if(ErrorDisplay == ValidatorDisplay.Static)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.Visibility, "hidden");
                else
                    writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
            }
            writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_err");
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
            writer.WriteEncodedText(ErrorMessage);
            writer.RenderEndTag();

            writer.RenderEndTag();
        }
        internal override void RenderBeginList(System.Web.UI.HtmlTextWriter output)
        {
            BorderedPanel panel = new BorderedPanel ();
            panel.Page = fileView.Page;
            if (fileView.DetailsColumnHeaderStyle.HorizontalAlign == HorizontalAlign.NotSet)
                fileView.DetailsColumnHeaderStyle.HorizontalAlign = fileView.Controller.CurrentUICulture.TextInfo.IsRightToLeft ? HorizontalAlign.Right : HorizontalAlign.Left;
            panel.ControlStyle.CopyFrom (fileView.DetailsColumnHeaderStyle);

            output.AddAttribute (HtmlTextWriterAttribute.Cellpadding, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Cellspacing, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Border, "0");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "100%");
            output.RenderBeginTag (HtmlTextWriterTag.Table);
            output.RenderBeginTag (HtmlTextWriterTag.Thead);
            output.RenderBeginTag (HtmlTextWriterTag.Tr);
            output.RenderBeginTag (HtmlTextWriterTag.Th);

            output.AddAttribute (HtmlTextWriterAttribute.Onclick, fileView.GetSortEventReference (SortMode.Name));
            output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
            output.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "100%");
            output.AddAttribute (HtmlTextWriterAttribute.Id, fileView.ClientID + "_Thead_Name");

            panel.RenderBeginTag (output);
            output.Write (HttpUtility.HtmlEncode (controller.GetResourceString ("Name", "Name")));
            panel.RenderEndTag (output);

            output.RenderEndTag ();
            output.RenderBeginTag (HtmlTextWriterTag.Th);

            output.AddAttribute (HtmlTextWriterAttribute.Onclick, fileView.GetSortEventReference (SortMode.Size));
            output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
            output.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "100%");
            output.AddAttribute (HtmlTextWriterAttribute.Id, fileView.ClientID + "_Thead_Size");

            panel.RenderBeginTag (output);
            output.Write (HttpUtility.HtmlEncode (controller.GetResourceString ("Size", "Size")));
            panel.RenderEndTag (output);

            output.RenderEndTag ();
            output.RenderBeginTag (HtmlTextWriterTag.Th);

            output.AddAttribute (HtmlTextWriterAttribute.Onclick, fileView.GetSortEventReference (SortMode.Type));
            output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
            output.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "100%");
            output.AddAttribute (HtmlTextWriterAttribute.Id, fileView.ClientID + "_Thead_Type");

            panel.RenderBeginTag (output);
            output.Write (HttpUtility.HtmlEncode (controller.GetResourceString ("Type", "Type")));
            panel.RenderEndTag (output);

            output.RenderEndTag ();
            output.RenderBeginTag (HtmlTextWriterTag.Th);

            output.AddAttribute (HtmlTextWriterAttribute.Onclick, fileView.GetSortEventReference (SortMode.Modified));
            output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
            output.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "100%");
            output.AddAttribute (HtmlTextWriterAttribute.Id, fileView.ClientID + "_Thead_Modified");

            panel.RenderBeginTag (output);
            output.Write (HttpUtility.HtmlEncode (controller.GetResourceString ("Date_Modified", "Date Modified")));
            panel.RenderEndTag (output);

            output.RenderEndTag ();
            output.RenderEndTag ();
            output.RenderEndTag ();

            output.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "auto");
            output.RenderBeginTag (HtmlTextWriterTag.Tbody);
        }
		internal override void RenderItem (System.Web.UI.HtmlTextWriter output, FileViewItem item) {
			output.AddStyleAttribute (HtmlTextWriterStyle.Margin, "1px");
			output.AddStyleAttribute (HtmlTextWriterStyle.Width, "70px");
            output.AddStyleAttribute(HtmlTextWriterStyle.Display, "inline-block");
            output.AddStyleAttribute(HtmlTextWriterStyle.VerticalAlign, "top");
			output.RenderBeginTag (HtmlTextWriterTag.Div);

			fileView.RenderItemBeginTag (output, item);

			output.AddStyleAttribute (HtmlTextWriterStyle.Width, "70px");
			output.AddAttribute (HtmlTextWriterAttribute.Cellpadding, "0");
			output.AddAttribute (HtmlTextWriterAttribute.Cellspacing, "0");
			output.AddAttribute (HtmlTextWriterAttribute.Border, "0");
			output.RenderBeginTag (HtmlTextWriterTag.Table);

			output.RenderBeginTag (HtmlTextWriterTag.Tr);
			output.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, "center");
			output.AddStyleAttribute (HtmlTextWriterStyle.VerticalAlign, "middle");
			output.AddStyleAttribute (HtmlTextWriterStyle.Height, "41px");
			output.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, item.LargeImage);
			output.AddStyleAttribute ("background-position", "center center");
			output.AddStyleAttribute ("background-repeat", "no-repeat");
			if (item.Hidden)
				fileView.Controller.HiddenItemStyle.AddAttributesToRender (output);
			output.RenderBeginTag (HtmlTextWriterTag.Td);
			output.RenderEndTag ();
			output.RenderEndTag ();

			output.RenderBeginTag (HtmlTextWriterTag.Tr);
			output.RenderBeginTag (HtmlTextWriterTag.Td);
			output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
			output.AddStyleAttribute (HtmlTextWriterStyle.Width, "70px");
            output.AddStyleAttribute(HtmlTextWriterStyle.PaddingBottom, "2px");
			output.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "hidden");
			output.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, "center");
			output.AddAttribute (HtmlTextWriterAttribute.Id, item.ClientID + "_Name");
			output.RenderBeginTag (HtmlTextWriterTag.Div);
			RenderItemName (output, item);
			output.RenderEndTag ();
			output.RenderEndTag ();
			output.RenderEndTag ();

			output.RenderEndTag ();

			fileView.RenderItemEndTag (output);

			output.RenderEndTag ();
		}
示例#8
0
 protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
 {
     if (this.DesignMode)
     {
         writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "blue");
         writer.RenderBeginTag(HtmlTextWriterTag.Label);
         writer.Write(this.ID);
         writer.RenderEndTag();
     }
 }
示例#9
0
		public virtual void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer, WebControl owner)
		{
#if NET_2_0
			if (RegisteredCssClass.Length > 0) {
				string cssclass = CssClass;
				if (!String.IsNullOrEmpty (cssclass))
					writer.AddAttribute (HtmlTextWriterAttribute.Class, cssclass + " " + RegisteredCssClass);
				else
					writer.AddAttribute (HtmlTextWriterAttribute.Class, RegisteredCssClass);
			}
			else 
#endif
			{
				string cssclass = CssClass;
				if (cssclass != null && cssclass.Length > 0)
					writer.AddAttribute (HtmlTextWriterAttribute.Class, cssclass);
#if NET_2_0
				CssStyleCollection col = new CssStyleCollection ();
				FillStyleAttributes (col, owner);
				foreach (string key in col.Keys) {
					writer.AddStyleAttribute (key, col [key]);
				}
#else
				WriteStyleAttributes (writer);
#endif
			}
		}
示例#10
0
                protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
                {
                    _innerTbx.Attributes.Add("Align", "AbsMiddle");
                    _innerTbx.Width = new Unit(100);
                    //_innerTbx.Height = New Unit(20)
                    _innerTbx.RenderControl(writer);

                    string innerid = this.UniqueID + "_inner";

                    writer.AddAttribute("Align", "AbsMiddle");
                    writer.AddAttribute("src", ImagesPath + "dropdownbtn.gif");
                    writer.AddAttribute("onClick", "__datepicker_showpopup(\'" + innerid + "\')");
                    writer.RenderBeginTag(HtmlTextWriterTag.Img);
                    writer.RenderEndTag();

                    if (errorText != null)
                    {
                        writer.AddStyleAttribute("color", "red");
                        writer.AddStyleAttribute("display", "block");
                        writer.RenderBeginTag(HtmlTextWriterTag.Span);
                        writer.Write(errorText);
                        writer.RenderEndTag();
                    }

                    writer.AddStyleAttribute("position", "relative");
                    writer.RenderBeginTag(HtmlTextWriterTag.Div);

                    writer.AddStyleAttribute("position", "absolute");
                    writer.AddStyleAttribute("left", "0px");
                    writer.AddStyleAttribute("top", "0px");
                    writer.AddStyleAttribute("z-index", "100");
                    string panelvisible;
                    if (_panelvisible)
                    {
                        panelvisible = "block";
                    }
                    else
                    {
                        panelvisible = "none";
                    }
                    writer.AddStyleAttribute("display", panelvisible);
                    writer.AddStyleAttribute("background-color", "white");
                    writer.AddAttribute("id", innerid);
                    writer.AddAttribute("onfocusout", "__popup_losefocus(this)");
                    writer.RenderBeginTag(HtmlTextWriterTag.Div);

                    _innerCal.RenderControl(writer);

                    writer.RenderEndTag();
                    writer.RenderEndTag();
                }
示例#11
0
 ///
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     base.AddAttributesToRender(writer);
     writer.AddStyleAttribute(HtmlTextWriterStyle.Margin, "0");
     writer.AddStyleAttribute(HtmlTextWriterStyle.Padding, "0");
     writer.RenderBeginTag(HtmlTextWriterTag.Ul);
     Items.Render(writer, true);
     writer.RenderEndTag();
 }
示例#12
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.BeginRender();
            try
            {
                //bool toggled = this.Toggled;

                // Write the anchor start.  This will make these images be an actionable object.
                writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
                writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
                writer.AddAttribute(HtmlTextWriterAttribute.Href, this.Page.ClientScript.GetPostBackClientHyperlink(this, "", true));
                if (this.StyleTheme != ButtonStyleTheme.Custom)
                    writer.AddAttribute(HtmlTextWriterAttribute.Class, "rsButton " + this.StyleTheme.ToString().ToLower() + " " + this.ColorTheme.ToString().ToLower() + (this.Enabled ? " active" : " disabled"));
                else if (!string.IsNullOrEmpty(this.CssClass))
                    writer.AddAttribute(HtmlTextWriterAttribute.Class, this.CssClass);
                if (Enabled)
                    writer.AddAttribute("Enabled","false");
                writer.RenderBeginTag(HtmlTextWriterTag.A);

                // Write the "outer" span.  This will be the left edge of the button.
                if (this.ControlStyleCreated)
                {
                    if (this.ControlStyle.Font.Italic)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.FontStyle, "oblique");
                    if (this.ControlStyle.Font.Size != FontUnit.Empty)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.FontSize, this.ControlStyle.Font.Size.ToString());
                    if (this.ControlStyle.Font.Names.Length > 0)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.FontFamily, string.Join(", ", this.ControlStyle.Font.Names));
                }
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "lOuter");
                writer.RenderBeginTag("span");

                // Write the "inner-outer" span.  This will be the right edge of the button.
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "rOuter");
                writer.RenderBeginTag("span");

                // Write the "inner" span.  This will be the center of the button and contain the text.
                if (this.Width != null && this.Width != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.Width, this.Width.ToString());
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "inner");
                writer.RenderBeginTag("span");

                if (this.ControlStyleCreated)
                {
                    if (this.ControlStyle.Font.Bold)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.FontWeight, "bold");
                    else if (this.ControlStyle.ForeColor != System.Drawing.Color.Transparent)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.Color, Hex.GetWebColor(this.ControlStyle.ForeColor));
                    if (this.ControlStyle.Font.Strikeout)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.TextDecoration, "strikeout");
                    if (this.ControlStyle.Font.Underline)
                        writer.AddStyleAttribute(HtmlTextWriterStyle.TextDecoration, "underline");
                }
                if (this.TextVerticalOffset != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.MarginTop, this.TextVerticalOffset.ToString());
                writer.RenderBeginTag("span");

                writer.WriteEncodedText(this.Text);


                writer.RenderEndTag(); // SPAN_text
                writer.RenderEndTag(); // SPAN_inner
                writer.RenderEndTag(); // SPAN_inner-outer
                writer.RenderEndTag(); // SPAN_outer
                writer.RenderEndTag(); // A
            }
            finally
            {
                // Make sure we "end" the rendering, no matter what.
                writer.EndRender();
            }

            // These are not the droids you're looking for...
            //base.Render(writer);
        }
示例#13
0
        ///
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            if(!string.IsNullOrEmpty(DefaultButton))
            {
                Control button = Util.FindControlRecursive(this, DefaultButton);
                if(button is IButtonControl)
                    writer.AddAttribute("onkeypress", "return WebForm_FireDefaultButton(event, '" + button.ClientID + "')");
            }

            if(string.IsNullOrEmpty(Style["z-index"])) writer.AddStyleAttribute(HtmlTextWriterStyle.ZIndex, "1000");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            RenderChildren(writer);
            writer.RenderEndTag();
        }
示例#14
0
        public override void RenderBeginTag(System.Web.UI.HtmlTextWriter writer)
        {
            writer.BeginRender();
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
            if (this.MinimumWidth != Unit.Empty)
                writer.AddStyleAttribute("min-width", this.MinimumWidth.ToString());
            if (this.MaximumWidth != Unit.Empty)
                writer.AddStyleAttribute("max-width", this.MaximumWidth.ToString());
            writer.AddStyleAttribute("min-height", this.MinimumHeight.ToString());
            if (this.MaximumHeight != Unit.Empty)
                writer.AddStyleAttribute("max-height", this.MaximumHeight.ToString());
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            if (this.Width != Unit.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.Width, this.Width.ToString());
            if (this.Height != Unit.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.Height, this.Height.ToString());
            writer.AddStyleAttribute("empty-cells", "show");
            writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "rsFrameStyle1 " + this.ColorThemeTheme.ToString().ToLower());
            writer.RenderBeginTag(HtmlTextWriterTag.Table);
            writer.Write(writer.NewLine);
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "top");
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "l");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            writer.RenderEndTag();

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "c");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            if (!string.IsNullOrEmpty(this._titleImg))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Src, this.ResolveUrl(this._titleImg));
                writer.AddAttribute(HtmlTextWriterAttribute.Alt, "");
                writer.RenderBeginTag(HtmlTextWriterTag.Img);
            }
            this._titleStyle.AddAttributesToRender(writer);
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
            writer.Write(this.FrameTitle);
            writer.RenderEndTag();
            writer.RenderEndTag();

            writer.AddAttribute(CssClass, "r");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            writer.RenderEndTag();

            writer.RenderEndTag();  // tr
            writer.Write(writer.NewLine);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "middle");
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "l");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "s");
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
            writer.RenderEndTag();

            writer.RenderEndTag(); // td

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "c");
            writer.AddAttribute(HtmlTextWriterAttribute.Valign, "top");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            writer.Write(writer.NewLine);
            if (this._ovrFlw != OverflowType.NotSet)
                writer.AddStyleAttribute(HtmlTextWriterStyle.Overflow, this._ovrFlw.ToString());
            else
            {
                if (this._xOvrFlw != OverflowType.NotSet)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.OverflowX, this._xOvrFlw.ToString());
                if (this._yOvrFlw != OverflowType.NotSet)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.OverflowY, this._yOvrFlw.ToString());
            }
            //writer.AddStyleAttribute("min-height", "121px");
            if (this.MinimumHeight != Unit.Empty && this.MinimumHeight.Type != UnitType.Percentage && this.FrameHeaderHeight != Unit.Empty && this.FrameFooterHeight != Unit.Empty)
                writer.AddStyleAttribute("min-height", new Unit(this.MinimumHeight.Value - (this.FrameHeaderHeight.Value + this.FrameFooterHeight.Value), this.MinimumHeight.Type).ToString());
            int iTst, iCnt = 1;
            if (this.Width.Type != UnitType.Percentage)
            {
                while (int.TryParse(this.Width.ToString().Substring(0, iCnt), out iTst))
                    iCnt++;
                string divWidth = Convert.ToString(this.Width.Value - (this.FrameSideWidth.Value * 2)) + ((iCnt < this.Width.ToString().Length) ? this.Width.ToString().Substring(iCnt - 1).Trim() : "");
                writer.AddStyleAttribute(HtmlTextWriterStyle.Width, divWidth);
            }
            if (this.Height != Unit.Empty && this.Height.Type != UnitType.Percentage)
            {
                iCnt = 1;
                while (int.TryParse(this.Height.ToString().Substring(0, iCnt), out iTst))
                    iCnt++;
                string divHeight = Convert.ToString(this.Height.Value - (this.FrameHeaderHeight.Value + this.FrameFooterHeight.Value)) + ((iCnt < this.Height.ToString().Length) ? this.Height.ToString().Substring(iCnt - 1).Trim() : "");
                writer.AddStyleAttribute(HtmlTextWriterStyle.Height, divHeight);
            }
            if (this.Padding != Unit.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.Padding, this.Padding.ToString());
            else
            {
                if (this.PaddingBottom != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.PaddingBottom, this.PaddingBottom.ToString());
                if (this.PaddingLeft != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.PaddingLeft, this.PaddingLeft.ToString());
                if (this.PaddingRight != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.PaddingRight, this.PaddingRight.ToString());
                if (this.PaddingTop != Unit.Empty)
                    writer.AddStyleAttribute(HtmlTextWriterStyle.PaddingTop, this.PaddingTop.ToString());
            }
            if (this.ForeColor != Color.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.Color, RainstormStudios.Hex.GetWebColor(this.ForeColor));
            if (this.BackColor != Color.Empty)
                writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundColor, RainstormStudios.Hex.GetWebColor(this.BackColor));
            if (!string.IsNullOrEmpty(this.CssClass))
                writer.AddAttribute(HtmlTextWriterAttribute.Class, this.CssClass);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
        }
示例#15
0
 void RenderOuterBorderRight(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddStyleAttribute("background-repeat", "repeat-y");
     writer.AddStyleAttribute("background-position", "center right");
     if (OuterBorderRightWidth != Unit.Empty)
         writer.AddStyleAttribute(HtmlTextWriterStyle.Width, OuterBorderRightWidth.ToString());
     if (OuterBorderRightImageUrl.Length > 0)
         writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundImage, "url(" + ResolveClientUrl(OuterBorderRightImageUrl) + ")");
     if (!String.IsNullOrEmpty(ClientID))
         writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_BorderR");
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     writer.RenderEndTag();
 }
示例#16
0
                protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
                {
                    string listid = _innerList.ClientID;
                    string tbxid = _innerTbx.ClientID;

                    _innerTbx.Attributes.Add("Align", "AbsMiddle");
                    _innerTbx.Width = new Unit(100);
                    //_innerTbx.Height = New Unit(16)
                    //_innerTbx.Style.Add("padding", "0")
                    _innerTbx.RenderControl(writer);

                    writer.AddAttribute("Align", "AbsMiddle");
                    writer.AddAttribute("src", ImagesPath + "dropdownbtn.gif");
                    writer.AddAttribute("onClick", "__timepicker_showpopup(\'" + listid + "\')");
                    writer.RenderBeginTag(HtmlTextWriterTag.Img);
                    writer.RenderEndTag();

                    if (errorText != null)
                    {
                        writer.AddStyleAttribute("color", "red");
                        writer.AddStyleAttribute("display", "block");
                        writer.RenderBeginTag(HtmlTextWriterTag.Span);
                        writer.Write(errorText);
                        writer.RenderEndTag();
                    }

                    writer.AddStyleAttribute("position", "relative");
                    writer.RenderBeginTag(HtmlTextWriterTag.Div);

                    _innerList.Width = new Unit(120);
                    _innerList.Rows = 8;
                    _innerList.Style.Add("position", "absolute");
                    _innerList.Style.Add("left", "0px");
                    _innerList.Style.Add("display", "none");
                    _innerList.Attributes.Add("onfocusout", "__popup_losefocus(this);");
                    _innerList.Attributes.Add("onchange", "__timepicker_timechanged(\'" + tbxid + "\',this);");

                    _innerList.RenderControl(writer);

                    writer.RenderEndTag();
                }
        internal override void RenderItem(System.Web.UI.HtmlTextWriter output, FileViewItem item)
        {
            output.AddStyleAttribute (HtmlTextWriterStyle.Margin, "1px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "120px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Height, "126px");
            output.AddStyleAttribute ("float", fileView.Controller.CurrentUICulture.TextInfo.IsRightToLeft ? "right" : "left");
            output.RenderBeginTag (HtmlTextWriterTag.Div);

            fileView.RenderItemBeginTag (output, item);

            output.AddAttribute (HtmlTextWriterAttribute.Cellpadding, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Cellspacing, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Border, "0");
            output.RenderBeginTag (HtmlTextWriterTag.Table);

            output.RenderBeginTag (HtmlTextWriterTag.Tr);
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "120px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Height, "96px");
            output.AddStyleAttribute (HtmlTextWriterStyle.PaddingLeft, "13px");
            output.AddStyleAttribute (HtmlTextWriterStyle.PaddingRight, "13px");
            output.AddStyleAttribute (HtmlTextWriterStyle.PaddingTop, "2px");
            output.RenderBeginTag (HtmlTextWriterTag.Td);

            output.AddAttribute (HtmlTextWriterAttribute.Cellpadding, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Cellspacing, "0");
            output.AddAttribute (HtmlTextWriterAttribute.Border, "0");
            output.RenderBeginTag (HtmlTextWriterTag.Table);
            output.RenderBeginTag (HtmlTextWriterTag.Tr);
            output.AddStyleAttribute (HtmlTextWriterStyle.BorderColor, "#ACA899");
            output.AddStyleAttribute (HtmlTextWriterStyle.BorderStyle, "solid");
            output.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "1px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "92px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Height, "92px");
            output.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, "center");
            output.AddStyleAttribute (HtmlTextWriterStyle.VerticalAlign, "middle");
            output.AddStyleAttribute("background-image", "url(\"" + item.ThumbnailImage + "\")");
            output.AddStyleAttribute ("background-position", "center center");
            output.AddStyleAttribute ("background-repeat", "no-repeat");
            if (item.Hidden)
                fileView.Controller.HiddenItemStyle.AddAttributesToRender (output);
            output.RenderBeginTag (HtmlTextWriterTag.Td);
            output.RenderEndTag ();
            output.RenderEndTag ();
            output.RenderEndTag ();

            output.RenderEndTag ();
            output.RenderEndTag ();

            output.RenderBeginTag (HtmlTextWriterTag.Tr);
            output.RenderBeginTag (HtmlTextWriterTag.Td);
            output.AddStyleAttribute (HtmlTextWriterStyle.Cursor, "default");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "120px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Height, "30px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "hidden");
            output.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, "center");
            output.AddAttribute (HtmlTextWriterAttribute.Id, item.ClientID + "_Name");
            output.RenderBeginTag (HtmlTextWriterTag.Div);
            RenderItemName (output, item);
            output.RenderEndTag ();
            output.RenderEndTag ();
            output.RenderEndTag ();

            output.RenderEndTag ();

            fileView.RenderItemEndTag (output);

            output.RenderEndTag ();
        }
示例#18
0
        ///
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "left");
            if(!AllowTextWrap) writer.AddStyleAttribute(HtmlTextWriterStyle.WhiteSpace, "nowrap");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            Nodes.Render(this, writer);

            writer.RenderEndTag();
        }
示例#19
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            base.Render(writer);

            Random rand = new Random();

            for (int i = 0; i < this.NumberofDays; i++)
            {
                int weatherValue = rand.Next(1000) % 3;
                WeatherType todayWeather = (WeatherType)weatherValue;

                Image img = new Image();
                img.ImageUrl = "~/Images/Lion.jpg";
                img.AlternateText = "Today's weather";

                writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "center");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
                img.RenderControl(writer);
                writer.WriteBreak();
                writer.Write(todayWeather.ToString());
                writer.RenderEndTag();

            }
        }