Example #1
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            #region Menu of Map

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.AddAttribute(HtmlTextWriterAttribute.Colspan, "2");
            writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "left");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            RenderMapMenu(writer);
            writer.RenderEndTag(); //Td
            writer.RenderEndTag(); //Tr

            #endregion

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);

            #region work panel

            //writer.AddAttribute(HtmlTextWriterAttribute.Rowspan, "2");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, WorkPanelWidth.IsEmpty ? "300px" : WorkPanelWidth.ToString());
            writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "left");
            writer.AddStyleAttribute(HtmlTextWriterStyle.VerticalAlign, "top");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            RenderWorkPanel(writer);
            writer.RenderEndTag();//Td

            #endregion

            #region Map

            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
            writer.AddStyleAttribute(HtmlTextWriterStyle.Height, Height.IsEmpty ? "400px" : Height.ToString());
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.RenderEndTag(); //Div
            writer.RenderEndTag(); //Td

            #endregion

            writer.RenderEndTag();//Tr

            #region Status Panel

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.AddAttribute(HtmlTextWriterAttribute.Colspan, "2");
            writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "left");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            RenderStatusPanel(writer);
            writer.RenderEndTag(); //Td
            writer.RenderEndTag(); //Tr

            #endregion
        }
Example #2
0
        protected virtual void RenderWorkPanel(HtmlTextWriter writer)
        {
            writer.AddStyleAttribute(HtmlTextWriterStyle.Overflow, "auto");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Width, WorkPanelWidth.IsEmpty ? "300px" : WorkPanelWidth.ToString());
            writer.AddStyleAttribute(HtmlTextWriterStyle.Height, Height.IsEmpty ? "400px" : Height.ToString());
            writer.RenderBeginTag(HtmlTextWriterTag.Div);


            writer.AddStyleAttribute(HtmlTextWriterStyle.Position, "relative");
            //writer.AddStyleAttribute(HtmlTextWriterStyle.Left, "5px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Top, "4px");
            new BaseHyperLink {
                ImgUrl = "/images/checkall.png", ToolTip = "Показать все слои", CssClass = "map-checkall",
            }.
            RenderControl(writer);

            writer.AddStyleAttribute(HtmlTextWriterStyle.Position, "relative");
            //writer.AddStyleAttribute(HtmlTextWriterStyle.Left, "28px");
            writer.AddStyleAttribute(HtmlTextWriterStyle.Top, "4px");
            new BaseHyperLink {
                ImgUrl = "/images/uncheckall.png", ToolTip = "Скрыть все слои", CssClass = "map-uncheckall",
            }.
            RenderControl(writer);

            writer.Write("Слои загрязнений<hr/>");

            AddLayer(writer, 0, "Слой 1", "Описание слоя 1");
            AddLayer(writer, 1, "Слой 2", "Описание слоя 2");
            AddLayer(writer, 2, "Слой 3", "Описание слоя 3");
            AddLayer(writer, 3, "Слой 4", "Описание слоя 4");
            writer.RenderEndTag();
        }