Implement styling of abnormal values.

- NEU: Auszeichnung pathologischer Werte kann eingestellt werden.
This commit is contained in:
Daniel Kraus
2015-08-24 23:17:49 +02:00
parent b8b96af9bb
commit cde32f0a7e
13 changed files with 170 additions and 11 deletions

View File

@ -41,6 +41,11 @@ namespace zaaReloaded2.Formatter
/// </summary>
public ReferenceStyle ReferenceStyle { get; set; }
/// <summary>
/// Gets or sets the style to use for abnormal values.
/// </summary>
public AbnormalStyle AbnormalStyle { get; set; }
/// <summary>
/// Gets or sets a flag that indicates whether this ItemFormatter
/// has been used, i.e. whether the LabItem was written to a
@ -73,11 +78,14 @@ namespace zaaReloaded2.Formatter
/// Creates a new ItemFormatter that wraps a <paramref name="labItem"/>.
/// </summary>
/// <param name="labItem">LabItem to wrap in this ItemFormatter.</param>
public ItemFormatter(LabItem labItem, ReferenceStyle referenceStyle)
public ItemFormatter(LabItem labItem,
ReferenceStyle referenceStyle,
AbnormalStyle abnormalStyle)
{
IncludeMaterial = true;
LabItem = labItem;
ReferenceStyle = referenceStyle;
AbnormalStyle = abnormalStyle;
}
#endregion
@ -164,9 +172,7 @@ namespace zaaReloaded2.Formatter
);
if (!LabItem.IsNormal)
{
output = String.Format(
"<b>{0}</b>",
output);
output = AbnormalStyle.ToMarkup(false) + output + AbnormalStyle.ToMarkup(true);
}
formatter.Write(output);