Exemplo n.º 1
0
        private static void WriteProgressBar(TextWriter writer)
        {
            HtmlGenericControl container = new HtmlGenericControl("div");

            container.ID = "progressArea";

            HtmlGenericControl progressContainer = new HtmlGenericControl("div");

            container.Controls.Add(progressContainer);

            progressContainer.ID = "progressContainer";
            progressContainer.Style["width"] = "100%";
            progressContainer.Style["height"] = "20px";
            progressContainer.Style["border"] = "1px solid silver";

            HtmlGenericControl progressBar = new HtmlGenericControl("div");

            progressContainer.Controls.Add(progressBar);

            progressBar.ID = "progressBar";
            progressBar.Style["text-align"] = "left";
            progressBar.Style["width"] = "0%";
            progressBar.Style["height"] = "20px";
            progressBar.Style["background-color"] = "blue";

            HtmlGenericControl statusText = new HtmlGenericControl("div");

            container.Controls.Add(statusText);

            statusText.ID = "statusText";
            statusText.Style["text-align"] = "left";
            statusText.Style["padding-left"] = "8px";
            statusText.Style["padding-right"] = "8px";

            writer.Write(container.GetHtml());
        }
Exemplo n.º 2
0
		private void WriteGridTitle(HtmlTextWriter writer)
		{
			if (this.GridTitle.IsNotEmpty())
			{
				HtmlGenericControl divHeader = new HtmlGenericControl("div");

				divHeader.Attributes["class"] = "table-header";

				HtmlGenericControl divTitle = new HtmlGenericControl("div");

				divTitle.Attributes["class"] = "dataTables-title";
				divHeader.Controls.Add(divTitle);

				divHeader.CreateSubItems("span", span => span.InnerText = Translator.Translate(this.Category, this.GridTitle));

				writer.Write(divHeader.GetHtml());
			}
		}