Add CanRun property to Formatter.
This commit is contained in:
parent
75c9c984c6
commit
285c6a2555
@ -64,6 +64,12 @@ namespace zaaReloaded2.Formatter
|
||||
/// </summary>
|
||||
public Dictionary<DateTime, TimePointFormatter> WorkingTimePoints { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Is true if this Formatter object carries a Laboratory with
|
||||
/// at least one time point.
|
||||
/// </summary>
|
||||
public bool CanRun { get { return Laboratory.TimePoints.Count > 0; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@ -113,6 +119,8 @@ namespace zaaReloaded2.Formatter
|
||||
/// current position of the cursor).</param>
|
||||
public void Run()
|
||||
{
|
||||
if (!CanRun) throw new InvalidOperationException("No laboratory data to format.");
|
||||
|
||||
int current = 0;
|
||||
while (current < Settings.Elements.Count)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user