Esempio n. 1
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();
 }
 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();
 }
        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();
                    }
                }
            }
        }
Esempio n. 4
0
 protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
 {
     if (Confirm != "" & !Editing)
         writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "javascript:return confirm('" + Confirm + "')");
     else if (Editing)
         writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "alert('Must update first'); return false");
     base.AddAttributesToRender(writer);
 }
Esempio n. 5
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();
 }
Esempio n. 6
0
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            if (!string.IsNullOrEmpty(NavigateUrl))
                writer.AddAttribute("data-tab-href", Page.ResolveClientUrl(NavigateUrl));
            if (!string.IsNullOrEmpty(TabText))
                writer.AddAttribute("data-tab-text", TabText);
            if (Selected)
                writer.AddAttribute("data-tab-selected", "true");

            base.AddAttributesToRender(writer);
        }
        /// <inheritdoc />
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (Network == 0)
                throw new MissingRequiredAttribute("Network", Network);

            writer.AddAttribute("network", Network.ToString(CultureInfo.InvariantCulture));

            if (Uid != 0)
                writer.AddAttribute("uid", Uid.ToString(CultureInfo.InvariantCulture));
        }
Esempio n. 8
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;
     }
 }
        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 ();
        }
Esempio n. 10
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();
 }
Esempio n. 11
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();
            }
        }
        /// <inheritdoc />
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (Uid != 0)
                writer.AddAttribute("uid", Uid.ToString(CultureInfo.InvariantCulture));
        }
Esempio n. 13
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);
 }
Esempio n. 14
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();
 }
Esempio n. 15
0
		protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer) {

			// Wire up the onkeypress event handler to the ChangeBackgroundColor() JavaScript function
			VideoPlayer vp = (VideoPlayer)Page.FindControl(ControlToManage);
			writer.AddAttribute("onclick", "javascript:removePlayer('" + vp.PlayerName + "');return false;");
							
			base.AddAttributesToRender(writer);
		}
Esempio n. 16
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();
            }
        }
 /// <summary>
 /// Renders the attributes.
 /// </summary>
 /// <param name="writer">The HTML writer.</param>
 protected override void RenderAttributes(System.Web.UI.HtmlTextWriter writer)
 {
     base.RenderAttributes(writer);
     if (!string.IsNullOrEmpty(this.Colspan))
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Colspan, this.Colspan);
     }
 }
Esempio n. 18
0
 protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
 {
     if (IsRequired)
     {
         writer.AddAttribute("required", "true");
     }
     base.AddAttributesToRender(writer);
 }
Esempio n. 19
0
		public override void RenderBeginTag(System.Web.UI.HtmlTextWriter writer)
		{
			Url url = GetResizedImageUrl(ImageUrl, MaxWidth, MaxHeight);
			if (!string.IsNullOrEmpty(Hash))
				url = url.AppendQuery("hash", Hash);
			writer.AddAttribute("src", url);
			base.RenderBeginTag(writer);
		}
        /// <inheritdoc />
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (Uid == null)
                throw new MissingRequiredAttribute("Uid", Uid);

            writer.AddAttribute("uid", Uid);
        }
Esempio n. 21
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute("class", CssClass);
            writer.RenderBeginTag("div");

            base.Render(writer);

            writer.RenderEndTag();
        }
        /// <inheritdoc />
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            if (string.IsNullOrEmpty(Text))
                throw new MissingRequiredAttribute("Text", Text);

            base.AddAttributesToRender(writer);

            writer.AddAttribute("label", Text, true);
        }
Esempio n. 23
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();
        }
Esempio n. 24
0
 public override void RenderControl(System.Web.UI.HtmlTextWriter writer)
 {
     switch (Type)
     {
         case ButtonType .Edit :
             writer.AddAttribute("onclick", "JZ_Edit('" + ActionURL + "');return false;",false);
             break;
     }
     base.RenderControl(writer);
 }
Esempio n. 25
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();
 }
 /// <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 );
     }
 }
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);



            if (!string.IsNullOrEmpty(PinPadField))
            {
                writer.AddAttribute("PinPadField", PinPadField);
            }
          //  writer.AddAttribute("OrderNumber",OrderNumber.ToString());
        }
 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();
 }
Esempio n. 29
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();
 }
Esempio n. 30
0
        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>
        }