Ejemplo n.º 1
0
 /// <summary>
 ///  Render the webpage onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 ///  The root of the folder of the web server. 
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='writer'>
 ///  The html writer to write content to. 
 /// </param>
 public override void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     writer.Write (this.fragment);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///  Render the webpage onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 /// The root of the folder of the web server.
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='writer'>
 /// The html writer to write content to.
 /// </param>
 public virtual void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     this.Load (serverFolder);
     if (this.pieces != null) {
         foreach (IWebPagePiece piece in this.Pieces) {
             piece.Render (serverFolder, engine, writer);
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///  Render the webpage onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 ///  The root of the folder of the web server. 
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='writer'>
 ///  The html writer to write content to. 
 /// </param>
 public abstract void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer);
Ejemplo n.º 4
0
 /// <summary>
 /// Render the webpage onto the give specified engine.
 /// </summary>
 /// <param name="serverFolder">The root of the folder of the web server.</param>
 /// <param name="engine">The given specified engine.</param>
 /// <param name="writer">The html writer to write content to.</param>
 /// <remarks>
 /// <para>This method should be overridden with the query answer.</para>
 /// </remarks>
 public virtual void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 ///  Render the result of the query onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 ///  The root of the folder of the web server. 
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='writer'>
 ///  The html writer to write content to. 
 /// </param>
 public override void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     writer.WriteLine (Error404);
 }
Ejemplo n.º 6
0
 /// <summary>
 ///  Render the webpage icon onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 /// The root of the server folder that contains the custom favoicon.
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='stream'>
 /// The stream to write the content to.
 /// </param>
 public void RenderIcon(string serverFolder, HttpEngine engine, Stream stream)
 {
     this.Load (serverFolder);
     using (BinaryWriter bw = new BinaryWriter (stream)) {
         bw.Write (this.data);
     }
 }
 /// <summary>
 /// Render the webpage onto the give specified engine.
 /// </summary>
 /// <param name="serverFolder">The root of the folder of the web server.</param>
 /// <param name="engine">The given specified engine.</param>
 /// <param name="writer">The html writer to write content to.</param>
 public override void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     string landingName = this.LandingName;
     writer.AddAttribute (HtmlTextWriterAttribute.Id, landingName);
     writer.RenderBeginTag (HtmlTextWriterTag.Div);
     writer.RenderEndTag ();
     if (this.QueryPage != null) {
         writer.RenderBeginTag (HtmlTextWriterTag.Script);
         writer.WriteLine ("genericAjax (\"{0}\", \"{1}\");", this.QueryPage.Href, landingName);
         writer.RenderEndTag ();
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Render the webpage onto the give specified engine.
 /// </summary>
 /// <param name="serverFolder">The root of the folder of the web server.</param>
 /// <param name="engine">The given specified engine.</param>
 /// <param name="writer">The html writer to write content to.</param>
 public override void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     writer.AddAttribute (HtmlTextWriterAttribute.Class, "table table-hover table-condensed table-bordered");
     writer.RenderBeginTag (HtmlTextWriterTag.Table);
     {
         writer.RenderBeginTag (HtmlTextWriterTag.Thead);
         {
             writer.RenderBeginTag (HtmlTextWriterTag.Tr);
             {
                 foreach (WebPredicateTableColumn column in this.Columns) {
                     writer.RenderBeginTag (HtmlTextWriterTag.Th);
                     writer.Write (column.Name);
                     writer.RenderEndTag ();
                 }
                 writer.RenderBeginTag (HtmlTextWriterTag.Th);
                 writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn-group");
                 writer.RenderBeginTag (HtmlTextWriterTag.Div);
                 {
                     writer.AddAttribute (HtmlTextWriterAttribute.Onclick, string.Format ("genericAjax (\"{0}\", \"landing{1}\");", this.Href, this.Id));
                     writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn btn-info btn-xs");
                     writer.RenderBeginTag (HtmlTextWriterTag.Button);
                     writer.WriteLine ("<i class=\"glyphicon glyphicon-refresh\"></i>");
                     writer.RenderEndTag ();
                     writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn btn-success btn-xs");
                     writer.RenderBeginTag (HtmlTextWriterTag.Button);
                     writer.WriteLine ("<i class=\"glyphicon glyphicon-plus\"></i>");
                     writer.RenderEndTag ();
                 }
                 writer.RenderEndTag ();
                 writer.RenderEndTag ();
             }
             writer.RenderEndTag ();
         }
         writer.RenderEndTag ();
         writer.RenderBeginTag (HtmlTextWriterTag.Tbody);
         {
             IEnumerable<int> indices = this.Columns.Select (x => x.Index).ToArray ();
             foreach (IEnumerable<object> row in this.Source) {
                 writer.WriteLine ();
                 writer.RenderBeginTag (HtmlTextWriterTag.Tr);
                 foreach (object item in row.IndicesOrdered (indices)) {
                     writer.RenderBeginTag (HtmlTextWriterTag.Td);
                     writer.Write (item);
                     writer.RenderEndTag ();
                 }
                 writer.RenderBeginTag (HtmlTextWriterTag.Td);
                 writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn-group");
                 writer.RenderBeginTag (HtmlTextWriterTag.Div);
                 {
                     writer.AddAttribute (HtmlTextWriterAttribute.Onclick, string.Format ("genericAjax (\"{0}\", \"landing{1}\");", this.Href, this.Id));
                     writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn btn-warning btn-xs");
                     writer.RenderBeginTag (HtmlTextWriterTag.Button);
                     writer.WriteLine ("<i class=\"glyphicon glyphicon-edit\"></i>");
                     writer.RenderEndTag ();
                     writer.AddAttribute (HtmlTextWriterAttribute.Class, "btn btn-danger btn-xs");
                     writer.RenderBeginTag (HtmlTextWriterTag.Button);
                     writer.WriteLine ("<i class=\"glyphicon glyphicon-remove\"></i>");
                     writer.RenderEndTag ();
                 }
                 writer.RenderEndTag ();
                 writer.RenderEndTag ();
                 writer.RenderEndTag ();
             }
         }
         writer.RenderEndTag ();
     }
     writer.RenderEndTag ();
 }
Ejemplo n.º 9
0
 /// <summary>
 ///  Render the webpage onto the give specified engine. 
 /// </summary>
 /// <param name='serverFolder'>
 ///  The root of the folder of the web server. 
 /// </param>
 /// <param name='engine'>
 ///  The given specified engine. 
 /// </param>
 /// <param name='writer'>
 ///  The html writer to write content to. 
 /// </param>
 public override void Render(string serverFolder, HttpEngine engine, Html32TextWriter writer)
 {
     this.Load (serverFolder);
     foreach (HtmlAttribute ha in this.node.Attributes) {
         writer.AddAttribute (ha.Name, ha.Value);
     }
     writer.RenderBeginTag (this.node.Name);
     if (this.pieces != null) {
         foreach (IWebPagePiece piece in this.pieces) {
             piece.Render (serverFolder, engine, writer);
         }
     }
     writer.RenderEndTag ();
 }