Implement DocumentWriter, control elements, and tests.
This commit is contained in:
@ -31,7 +31,7 @@ namespace zaaReloaded2.Controller.Elements
|
||||
/// to a Word document.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
class Items : ElementBase
|
||||
class Items : FormatElementBase
|
||||
{
|
||||
#region ElementBase implementation
|
||||
|
||||
@ -55,15 +55,13 @@ namespace zaaReloaded2.Controller.Elements
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_caption))
|
||||
{
|
||||
formatter.Document.Range().InsertAfter(
|
||||
String.Format("{0}: ", _caption)
|
||||
);
|
||||
formatter.Write(String.Format("{0}: ", _caption));
|
||||
};
|
||||
foreach (ItemFormatter i in items)
|
||||
{
|
||||
if (_needComma)
|
||||
{
|
||||
formatter.Document.Range().InsertAfter(", ");
|
||||
formatter.Write(", ");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -71,6 +69,7 @@ namespace zaaReloaded2.Controller.Elements
|
||||
}
|
||||
i.WriteToDocument(formatter);
|
||||
}
|
||||
formatter.Write("\r");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user