protected override void RenderEditMode(System.Web.UI.HtmlTextWriter writer)
 {
     List<PackageType> packageTypes = PackageController.GetPackageTypes();
     ControlStyle.AddAttributesToRender(writer);
     writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
     writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
     writer.RenderBeginTag(HtmlTextWriterTag.Select);
     writer.AddAttribute(HtmlTextWriterAttribute.Value, Null.NullString);
     if (StringValue == Null.NullString)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected");
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Option);
     writer.Write("<" + Localization.Localization.GetString("Not_Specified", Localization.Localization.SharedResourceFile) + ">");
     writer.RenderEndTag();
     foreach (PackageType type in packageTypes)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Value, type.Type);
         if (type.Type == StringValue)
         {
             writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected");
         }
         writer.RenderBeginTag(HtmlTextWriterTag.Option);
         writer.Write(type.Type);
         writer.RenderEndTag();
     }
     writer.RenderEndTag();
 }
        protected override void Render(System.Web.UI.HtmlTextWriter output)
        {
            var searchLinkManager = new SearchLinkManager();
            int pages = Total / PageSize;

            if (Total % PageSize > 0)
            {
                pages = pages + 1;
            }

            if (pages > 1)
            {

                for (int i = 1; i <= pages; i++)
                {
                    output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Class, "searchPagination");

                    if (i != Page)
                    {
                        output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Href, searchLinkManager.GetPageLink(i));
                        output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.A);
                        output.WriteLine(i.ToString());
                        output.RenderEndTag();
                    }
                    else
                    {
                        output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Span);
                        output.WriteLine(i.ToString());
                        output.RenderEndTag();
                    }
                }
            }
        }
Beispiel #3
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     if (null == data)
     {
         return;
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Div);
     writer.AddAttribute(HtmlTextWriterAttribute.Src, data.Url);
     writer.RenderBeginTag(HtmlTextWriterTag.Img);
     writer.RenderEndTag();
     base.Render(writer);
     writer.RenderEndTag();
 }
Beispiel #4
0
        /// <summary>
        /// Renders the specified writer.
        /// </summary>
        /// <param name="writer">The writer.</param>
        public override void Render( System.Web.UI.HtmlTextWriter writer )
        {
            if ( Person != null )
            {
                writer.AddAttribute( HtmlTextWriterAttribute.Class, "badge" );
                writer.AddAttribute( HtmlTextWriterAttribute.Title, GetToolTipText( Person ) );
                writer.RenderBeginTag( HtmlTextWriterTag.Div );

                writer.AddAttribute( HtmlTextWriterAttribute.Src, GetIconPath( Person ) );
                writer.RenderBeginTag( HtmlTextWriterTag.Img );
                writer.RenderEndTag();

                writer.RenderEndTag();
            }
        }
 protected override void RenderEditMode(System.Web.UI.HtmlTextWriter writer)
 {
     int length = Null.NullInteger;
     if ((CustomAttributes != null))
     {
         foreach (System.Attribute attribute in CustomAttributes)
         {
             if (attribute is MaxLengthAttribute)
             {
                 MaxLengthAttribute lengthAtt = (MaxLengthAttribute)attribute;
                 length = lengthAtt.Length;
                 break;
             }
         }
     }
     ControlStyle.AddAttributesToRender(writer);
     writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
     writer.AddAttribute(HtmlTextWriterAttribute.Value, StringValue);
     if (length > Null.NullInteger)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Maxlength, length.ToString());
     }
     writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
     writer.RenderBeginTag(HtmlTextWriterTag.Input);
     writer.RenderEndTag();
 }
Beispiel #6
0
 public override void RenderHeader(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddAttribute("src", ResolveUrl(ScriptUrl ?? ""));
     writer.AddAttribute("type", Type ?? "text/javascript");
     writer.RenderBeginTag("script");
     writer.RenderEndTag();
 }
Beispiel #7
0
 public override void RenderBeginTag(System.Web.UI.HtmlTextWriter writer)
 {
     //writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
     writer.AddAttribute(HtmlTextWriterAttribute.Class, "sn-listgrid-container");
     writer.RenderBeginTag(HtmlTextWriterTag.Div);
     base.RenderBeginTag(writer);
 }
Beispiel #8
0
 public override void RenderHeader(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddAttribute("rel", "stylesheet");
     writer.AddAttribute("href", ResolveUrl(CssUrl ?? ""));
     writer.AddAttribute("type", "text/css");
     writer.RenderBeginTag("link");
     writer.RenderEndTag();
 }
Beispiel #9
0
        /// <summary>
        /// Renders the begin tag.
        /// </summary>
        /// <param name="writer">The HTML writer.</param>
        protected override void RenderBeginTag(System.Web.UI.HtmlTextWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }

            writer.RenderBeginTag(HtmlTextWriterTag.I);
        }
Beispiel #10
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute("class", CssClass);
            writer.RenderBeginTag("div");

            base.Render(writer);

            writer.RenderEndTag();
        }
Beispiel #11
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            writer.AddAttribute("class", String.Format("docking-{0}", DockingStyle.ToString().ToLowerInvariant()));
            writer.RenderBeginTag("div");

            base.Render(writer);

            writer.RenderEndTag();
        }
 /// <summary>
 /// Creates the beginning tag for the Web control in the markup that is transmitted to the target browser.
 /// </summary>
 /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to render the target-specific output.</param>
 protected override void RenderBeginTag( System.Web.UI.HtmlTextWriter writer )
 {
     // Preserve any classes that a developer put on the control (such as a "well") by wrapping it in a <div>.
     CheckBoxList cbl = Control as CheckBoxList;
     if ( cbl != null && !string.IsNullOrEmpty( cbl.CssClass ) )
     {
         writer.AddAttribute( "class", cbl.CssClass );
         writer.RenderBeginTag( HtmlTextWriterTag.Div );
     }
 }
Beispiel #13
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            base.Render(writer);

            Writer = writer;
            WriteTitle("WSFederationAuthenticationModule Information");

            writer.RenderBeginTag(HtmlTextWriterTag.Dl);
            for (Int32 i = 0; i != controls.Length; ++i)
                RenderListEntry(names[i], controls[i]);
            writer.RenderEndTag();
        }
Beispiel #14
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();
        }
        private void Render(System.Web.UI.HtmlTextWriter writer, bool isLastNode)
        {
            //base.Render(writer);
            if (this.Parent == null)
            {
                writer.AddAttribute("class", "root-node");
                writer.RenderBeginTag("ul");
            }

            if (isLastNode)
                writer.AddAttribute("class", "last");

            writer.RenderBeginTag("li");

            var dataString = "value:'" + this.Value + "'";
            if (this.Data.Keys.Count > 0)
                dataString += "," + Data.Select(kv => kv.Key + ":'" + kv.Value + "'").JoinToString(",");

            writer.AddAttribute("class", (this.CssClass + " { " + dataString + " }").Trim());

            writer.RenderBeginTag("span");
            writer.WriteLine("<img src='" + ImageUrl + "' alt='' />");
            writer.WriteLine(Text);
            writer.RenderEndTag(); // </span>

            if (this.Nodes.Count > 0)
            {
                writer.RenderBeginTag("ul");
                for (var i = 0; i < this.Nodes.Count; i++)
                    this.Nodes[i].Render(writer, i == this.Nodes.Count - 1);
                writer.RenderEndTag(); // </ul>
            }

            writer.RenderEndTag(); // </li>

            if (this.Parent == null)
                writer.RenderEndTag(); // </ul>
        }
Beispiel #16
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     if (!this.DesignMode)
     {
         EFClientTools.ClientUtility.ClientInfo.cErrorCode = 8270;
         writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ID);
         writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
         writer.AddAttribute(HtmlTextWriterAttribute.Class, JQControl.NumberBox);
         writer.AddAttribute(JQProperty.DataOptions, this.DataOptions);
         writer.RenderBeginTag(HtmlTextWriterTag.Input);
         writer.RenderEndTag();
         EFClientTools.ClientUtility.ClientInfo.cErrorCode = 0;
     }
 }
Beispiel #17
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     string strText = this.Text;
     int intLenCol = Convert.ToInt32(this.Width.Value);
     int intLenText = this.Text.Length;
     if (intLenText > intLenCol)
     {
         strText = strText.Substring(0, intLenCol) + "...";
         writer.AddAttribute("title", this.Text);
     }
     writer.AddAttribute("class", this.CssClass);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.Write(strText);
     writer.RenderEndTag();
 }
Beispiel #18
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();
        }
Beispiel #19
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     string text = Regex.Replace(LongText, @"\s+", " ");
     string compactText = text;
     if (MaxLength < 4 || text.Length <= MaxLength)
         writer.AddAttribute("title", PermanentToolTip);
     else
     {
         compactText = text.Substring(0, MaxLength - 3) + "...";
         writer.AddAttribute("title", text + (string.IsNullOrEmpty(PermanentToolTip) ? "" : " -> " + PermanentToolTip));
     }
     writer.AddAttribute("class", this.CssClass);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.Write(compactText);
     writer.RenderEndTag();
 }
        internal override void RenderItem(System.Web.UI.HtmlTextWriter output, FileViewItem item)
        {
            output.AddStyleAttribute (HtmlTextWriterStyle.Margin, "2px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Width, "70px");
            output.AddStyleAttribute (HtmlTextWriterStyle.Height, "71px");
            output.AddStyleAttribute ("float", fileView.Controller.CurrentUICulture.TextInfo.IsRightToLeft ? "right" : "left");
            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.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 ();
        }
Beispiel #21
0
 protected override void writeHtml(System.Web.UI.HtmlTextWriter html)
 {
     switch(BrTag.ComplianceMode)
     {
         case ComplianceModes.Xhtml:
             html.Write("<br />");
             break;
         case ComplianceModes.Html5:
             html.Write("<br>");
             break;
         case ComplianceModes.AspNet:
         default:
             html.RenderBeginTag("br");
             html.RenderEndTag();
             break;
     }
 }
Beispiel #22
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            if (IsInDesignMode)
            {
                writer.AddAttribute("class", "sig-zone");
                writer.AddAttribute("zone-name", ZoneName);
                writer.RenderBeginTag("div");
            }

            base.Render(writer);

            if (IsInDesignMode)
            {
                writer.Write("<div style=\"clear:both\"></div>");
                writer.RenderEndTag();
            }
        }
Beispiel #23
0
 /// 
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     base.AddAttributesToRender(writer);
     if(!string.IsNullOrEmpty(ForControl))
     {
         Control ctrl = Util.FindControlRecursive(Page, ForControl);
         if(ctrl == null)
         {
             writer.AddAttribute(HtmlTextWriterAttribute.For, ForControl);
         }
         else
         {
             writer.AddAttribute(HtmlTextWriterAttribute.For, ctrl.ClientID);
         }
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Label);
     writer.Write(Text);
     writer.RenderEndTag();
 }
        protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Id, "traceContainer");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            var linkToggle = new HtmlAnchor {HRef = "#", ID = "lnkToggleView", InnerText = "toggle"};
            linkToggle.RenderControl(writer);

            btnClear.RenderControl(writer);

            const string contentPlaceholder = @"<table id='traceTable'><td><b>Start</b></td><td><b>Duration</b></td><td><b>Query</b></td></table>";
            writer.Write(contentPlaceholder);

            writer.Write(GetTraceTemplate());
            writer.Write(GetTraceAsJson());
            writer.Write(GetToggleJavascript());

            writer.RenderEndTag();		// div

            base.RenderContents(writer);
        }
Beispiel #25
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     if (error)
         lblError.RenderControl(writer);
     else
     {
         writer.RenderBeginTag(HtmlTextWriterTag.Div);
         btnExport.RenderControl(writer);
         btnImport.RenderControl(writer);
         writer.RenderEndTag();
         txtXml.RenderControl(writer);
         writer.RenderBeginTag(HtmlTextWriterTag.Div);
         btnCancel.RenderControl(writer);
         btnSave.RenderControl(writer);
         writer.RenderEndTag();
     }
 }
Beispiel #26
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();
        }
		public static void WriteFooter (System.Web.UI.HtmlTextWriter writer)
		{
			writer.AddAttribute ("class", "footer");
			writer.RenderBeginTag ("div");
			
			writer.Write (Catalog.GetString ("Gallery generated by") + " ");
			
			writer.AddAttribute ("href", "http://www.gnome.org/projects/f-spot");
			writer.RenderBeginTag ("a");
			writer.Write (String.Format ("{0} {1}", FSpot.Defines.PACKAGE, FSpot.Defines.VERSION));
			writer.RenderEndTag ();

			writer.RenderEndTag ();
		}
		public void WriteHeader (System.Web.UI.HtmlTextWriter writer)
		{
			writer.RenderBeginTag ("head");
			/* It seems HtmlTextWriter always uses UTF-8, unless told otherwise */
			writer.Write ("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />");
			writer.WriteLine ();
			writer.RenderBeginTag ("title");
			writer.Write (gallery_name);
			writer.RenderEndTag ();

			writer.Write ("<link type=\"text/css\" rel=\"stylesheet\" href=\"");
			writer.Write (String.Format ("{0}", "style/" + stylesheet));
			writer.Write ("\" title=\"" + dark + "\" media=\"screen\" />" + Environment.NewLine);

			writer.Write ("<link type=\"text/css\" rel=\"prefetch ") ;
			writer.Write ("alternate stylesheet\" href=\"");
			writer.Write (String.Format ("{0}", "style/" + altstylesheet));
			writer.Write ("\" title=\"" + light + "\" media=\"screen\" />" + Environment.NewLine);

			writer.Write ("<script src=\"script/" + javascript + "\"");
			writer.Write (" type=\"text/javascript\"></script>" + Environment.NewLine);

			writer.RenderEndTag ();
		}
		public static void WritePageNav (System.Web.UI.HtmlTextWriter writer, string id, string url, string name)
		{
			writer.AddAttribute ("id", id);
			writer.RenderBeginTag ("div");				
			 
			writer.AddAttribute ("href", url);
			writer.RenderBeginTag ("a");
			writer.Write (name);
			writer.RenderEndTag ();
			
			writer.RenderEndTag ();
		}
 protected override void RenderViewMode(System.Web.UI.HtmlTextWriter writer)
 {
     string propValue = this.Page.Server.HtmlDecode(Convert.ToString(this.Value));
     ControlStyle.AddAttributesToRender(writer);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.Write(propValue);
     writer.RenderEndTag();
 }