using System;
using System.Collections.Generic;
using System.Text;
using FastReport.Utils;
namespace FastReport.Export.Html
{
///
/// Represents the HTML export templates.
///
public class HtmlTemplates
{
#region private fields
private string pageTemplateTitle;
private string pageTemplateFooter;
private string navigatorTemplate;
private string outlineTemplate;
private string indexTemplate;
private FastString capacitor;
#endregion
#region private methods
private void NewCapacitor()
{
capacitor = new FastString(512);
}
private void Part(string str)
{
capacitor.AppendLine(str);
}
private string Capacitor()
{
return capacitor.ToString();
}
#endregion
#region public properties
///
/// Page Template Title
///
public string PageTemplateTitle
{
get { return pageTemplateTitle; }
set { pageTemplateTitle = value; }
}
///
/// Page Template Footer
///
public string PageTemplateFooter
{
get { return pageTemplateFooter; }
set { pageTemplateFooter = value; }
}
///
/// Navigator Template
///
public string NavigatorTemplate
{
get { return navigatorTemplate; }
set { navigatorTemplate = value; }
}
///
/// OutlineTemplate
///
public string OutlineTemplate
{
get { return outlineTemplate; }
set { outlineTemplate = value; }
}
///
/// Index Template
///
public string IndexTemplate
{
get { return indexTemplate; }
set { indexTemplate = value; }
}
#endregion
///
/// Initializes a new instance of the class.
///
public HtmlTemplates()
{
#region fill page template
// {0} - title
NewCapacitor();
Part("");
Part("
");
Part("");
Part("");
Part("{0}");
pageTemplateTitle = Capacitor();
NewCapacitor();
Part("");
pageTemplateFooter = Capacitor();
#endregion
#region fill navigator template
// {0} - pages count {1} - name of report {2} multipage document {3} prefix of pages
// {4} first caption {5} previous caption {6} next caption {7} last caption
// {8} total caption
NewCapacitor();
Part("");
Part("");
Part("");
Part("");
Part("");
Part("");
Part("");
navigatorTemplate = Capacitor();
#endregion
#region fill outline template
// under construction
outlineTemplate = String.Empty;
#endregion
#region fill index template
// {0} - title, {1} - navigator frame, {2} - main frame
NewCapacitor();
Part("");
Part("");
Part("");
Part("{0}");
Part("");
Part("");
indexTemplate = Capacitor();
#endregion
}
}
}