More work on Formatter; successful tests.
This commit is contained in:
@ -40,6 +40,11 @@ namespace zaaReloaded2.Formatter
|
||||
/// </summary>
|
||||
public ElementsList Elements { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the working Word document.
|
||||
/// </summary>
|
||||
public Document Document { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the style of the normal range reference.
|
||||
/// </summary>
|
||||
@ -67,6 +72,11 @@ namespace zaaReloaded2.Formatter
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current working set of TimePointFormatters.
|
||||
/// </summary>
|
||||
public ITimePointFormatterDictionary WorkingTimePoints { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
@ -76,6 +86,12 @@ namespace zaaReloaded2.Formatter
|
||||
Elements = new ElementsList();
|
||||
}
|
||||
|
||||
public Formatter(Document document)
|
||||
: this()
|
||||
{
|
||||
Document = document;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public methods
|
||||
@ -85,8 +101,13 @@ namespace zaaReloaded2.Formatter
|
||||
/// </summary>
|
||||
/// <param name="document">Word document to write to (at the
|
||||
/// current position of the cursor).</param>
|
||||
public void WriteToDocument(Document document)
|
||||
public void Run()
|
||||
{
|
||||
WorkingTimePoints = _timePointFormatters;
|
||||
foreach (ElementBase element in Elements)
|
||||
{
|
||||
element.Run(this);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user