Exemple #1
0
        protected virtual void WriteRow(HtmlTextWriter writer, ListCatalogsRow row, string link)
        {
            //<div class="g_catalog_float_box" onclick="window.location=\''.$link.'\'">
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "g_catalog_float_box");
            writer.AddAttribute(HtmlTextWriterAttribute.Onclick, String.Format("window.location=\'{0}\'", link));
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            //<div class="g_catalog_float_icon">
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "g_catalog_float_icon");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            //<a class="guayaquil_tablecatalog" href="'.$link.'">
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "guayaquil_tablecatalog");
            writer.AddAttribute(HtmlTextWriterAttribute.Href, link);
            writer.RenderBeginTag(HtmlTextWriterTag.A);

            //<img border="0" width="40" height="40" src="'.$this->iconsFolder.$catalog['icon'].'">
            writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
            writer.AddAttribute(HtmlTextWriterAttribute.Width, "40");
            writer.AddAttribute(HtmlTextWriterAttribute.Height, "40");
            writer.AddAttribute(HtmlTextWriterAttribute.Src, GetResourceUrl(string.Format(ImageResourceTemplate, row.icon)));
            writer.RenderBeginTag(HtmlTextWriterTag.Img);
            writer.RenderEndTag();

            //</a></div>
            writer.RenderEndTag();
            writer.RenderEndTag();

            //<div class="g_catalog_float_name">
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "g_catalog_float_name");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            //<a class="guayaquil_tablecatalog" href="'.$link.'">'.$catalog['name'].'</a>
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "guayaquil_tablecatalog");
            writer.AddAttribute(HtmlTextWriterAttribute.Href, link);
            writer.RenderBeginTag(HtmlTextWriterTag.A);
            writer.Write(row.name);
            writer.RenderEndTag();

            //</div></div>
            writer.RenderEndTag();
            writer.RenderEndTag();
        }
Exemple #2
0
        protected virtual void WriteRowCell(HtmlTextWriter writer, ListCatalogsRow row, string link, string column)
        {
            //<td valign="center">
            writer.AddAttribute(HtmlTextWriterAttribute.Valign, "center");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            //<a class="guayaquil_tablecatalog" href="'.$link.'">
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "guayaquil_tablecatalog");
            writer.AddAttribute(HtmlTextWriterAttribute.Href, link);
            writer.RenderBeginTag(HtmlTextWriterTag.A);

            WriteRowCellValue(writer, row, column);

            writer.RenderEndTag();
            writer.RenderEndTag();
        }
Exemple #3
0
 protected virtual void WriteRowCellValue(HtmlTextWriter writer, ListCatalogsRow row, string column)
 {
     switch (column)
     {
         case "icon":
             //<img border="0" width="40" height="40" src="'.$this->iconsFolder.$catalog['icon'].'">
             writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
             writer.AddAttribute(HtmlTextWriterAttribute.Width, "40");
             writer.AddAttribute(HtmlTextWriterAttribute.Height, "40");
             writer.AddAttribute(HtmlTextWriterAttribute.Src,
                                 GetResourceUrl(String.Format(ImageResourceTemplate, row.icon)));
             writer.RenderBeginTag(HtmlTextWriterTag.Img);
             writer.RenderEndTag();
             break;
         case "name":
             //'.$catalog['name'].'
             writer.Write(row.name);
             break;
         case "version":
             //'.$catalog['version'].'
             writer.Write(row.version);
             break;
     }
 }
Exemple #4
0
        protected virtual void WriteRow(HtmlTextWriter writer, ListCatalogsRow row, string link)
        {
            //'<tr onmouseout="this.className=\'\';" onmouseover="this.className=\'over\';" onclick="window.location=\''.$link.'\'">'
            writer.AddAttribute("onmouseout", "this.className=\'\';");
            writer.AddAttribute("onmouseover", "this.className=\'over\';");
            writer.AddAttribute(HtmlTextWriterAttribute.Onclick, String.Format("window.location=\'{0}\'", link));
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);

            foreach (string column in Columns)
            {
                WriteRowCell(writer, row, link, column.ToLower());
            }

            writer.RenderEndTag();
        }