diff --git a/TBF/BenchControl/DataEntry/Combined/EntryForm.cs b/TBF/BenchControl/DataEntry/Combined/EntryForm.cs
index 995ed454a..5a398ea93 100644
--- a/TBF/BenchControl/DataEntry/Combined/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/Combined/EntryForm.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Combined
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/HeatMeters12/EntryForm.cs b/TBF/BenchControl/DataEntry/HeatMeters12/EntryForm.cs
index 3606884d8..3f9ea8ec7 100644
--- a/TBF/BenchControl/DataEntry/HeatMeters12/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/HeatMeters12/EntryForm.cs
@@ -52,6 +52,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/HeatMeters6/EntryForm.cs b/TBF/BenchControl/DataEntry/HeatMeters6/EntryForm.cs
index f0ee35845..d66960e99 100644
--- a/TBF/BenchControl/DataEntry/HeatMeters6/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/HeatMeters6/EntryForm.cs
@@ -52,6 +52,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Munich/EntryForm.cs b/TBF/BenchControl/DataEntry/Munich/EntryForm.cs
index 2f8ca7353..5e7fe874d 100644
--- a/TBF/BenchControl/DataEntry/Munich/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/Munich/EntryForm.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Munich
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
bool resultSaved; /// Set in Run() when results are saved
diff --git a/TBF/BenchControl/DataEntry/Munich3/EntryForm.cs b/TBF/BenchControl/DataEntry/Munich3/EntryForm.cs
index 0830b58c8..815582927 100644
--- a/TBF/BenchControl/DataEntry/Munich3/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/Munich3/EntryForm.cs
@@ -44,6 +44,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Single/EntryFormNoStartEnd.cs b/TBF/BenchControl/DataEntry/Single/EntryFormNoStartEnd.cs
index df258ee72..31ae4449d 100644
--- a/TBF/BenchControl/DataEntry/Single/EntryFormNoStartEnd.cs
+++ b/TBF/BenchControl/DataEntry/Single/EntryFormNoStartEnd.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Single
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Standard12/EntryFormNoStartEnd.cs b/TBF/BenchControl/DataEntry/Standard12/EntryFormNoStartEnd.cs
index e73cc75a9..88fd5e2cc 100644
--- a/TBF/BenchControl/DataEntry/Standard12/EntryFormNoStartEnd.cs
+++ b/TBF/BenchControl/DataEntry/Standard12/EntryFormNoStartEnd.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Standard24/EntryFormNoStartEnd.cs b/TBF/BenchControl/DataEntry/Standard24/EntryFormNoStartEnd.cs
index d7e2130bd..efe2eb992 100644
--- a/TBF/BenchControl/DataEntry/Standard24/EntryFormNoStartEnd.cs
+++ b/TBF/BenchControl/DataEntry/Standard24/EntryFormNoStartEnd.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Standard48/EntryFormNoStartEnd.cs b/TBF/BenchControl/DataEntry/Standard48/EntryFormNoStartEnd.cs
index 8a92d9d95..d5452c24a 100644
--- a/TBF/BenchControl/DataEntry/Standard48/EntryFormNoStartEnd.cs
+++ b/TBF/BenchControl/DataEntry/Standard48/EntryFormNoStartEnd.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/Standard6/EntryFormNoStartEnd.cs b/TBF/BenchControl/DataEntry/Standard6/EntryFormNoStartEnd.cs
index 156ed4669..d765d3d4c 100644
--- a/TBF/BenchControl/DataEntry/Standard6/EntryFormNoStartEnd.cs
+++ b/TBF/BenchControl/DataEntry/Standard6/EntryFormNoStartEnd.cs
@@ -40,6 +40,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/StandardCamera/EntryForm.cs b/TBF/BenchControl/DataEntry/StandardCamera/EntryForm.cs
index be422e8d3..da54d89a4 100644
--- a/TBF/BenchControl/DataEntry/StandardCamera/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/StandardCamera/EntryForm.cs
@@ -90,6 +90,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/DataEntry/WMStates/EntryForm.cs b/TBF/BenchControl/DataEntry/WMStates/EntryForm.cs
index a6cbca22b..1dc20c467 100644
--- a/TBF/BenchControl/DataEntry/WMStates/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/WMStates/EntryForm.cs
@@ -47,6 +47,7 @@ namespace TBF.BenchControl.DataEntry.WMStates
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
bool resultSaved;
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs b/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
index 328ff4af7..3ba10531c 100644
--- a/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
@@ -41,6 +41,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;
diff --git a/TBF/BenchControl/GenericDevices/IDataEntry.cs b/TBF/BenchControl/GenericDevices/IDataEntry.cs
index 4444f3b87..04bac8d25 100644
--- a/TBF/BenchControl/GenericDevices/IDataEntry.cs
+++ b/TBF/BenchControl/GenericDevices/IDataEntry.cs
@@ -1,5 +1,5 @@
///
-/// Copyright (c) 2013-2017 Sensus Metering Systems
+/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using Config.Entities;
@@ -9,6 +9,11 @@ namespace TBF.BenchControl.GenericDevices
{
public interface IDataEntry : IComponent
{
+ ///
+ /// true when DataEntry dialog was completed or when it does not support IHasCompleted (to avoid TBF freeze).
+ ///
+ bool Completed { get; }
+
///
/// Updates test results with the information collected in watermeters.
///
diff --git a/TBF/BenchControl/GenericDevices/IHasCompleted.cs b/TBF/BenchControl/GenericDevices/IHasCompleted.cs
index bf2ec9d00..c6b7ed285 100644
--- a/TBF/BenchControl/GenericDevices/IHasCompleted.cs
+++ b/TBF/BenchControl/GenericDevices/IHasCompleted.cs
@@ -5,8 +5,11 @@ using System;
namespace TBF.BenchControl.GenericDevices
{
- interface IHasCompleted
+ public interface IHasCompleted
{
+ ///
+ /// true when a dialog was completed
+ ///
bool Completed { get; }
}
}
diff --git a/TBF/BenchControl/RegisterReaders/KPackE/DataEntryForRadio/EntryForm.cs b/TBF/BenchControl/RegisterReaders/KPackE/DataEntryForRadio/EntryForm.cs
index 4b9511e30..09ceaf804 100644
--- a/TBF/BenchControl/RegisterReaders/KPackE/DataEntryForRadio/EntryForm.cs
+++ b/TBF/BenchControl/RegisterReaders/KPackE/DataEntryForRadio/EntryForm.cs
@@ -44,6 +44,7 @@ namespace TBF.BenchControl.RegisterReaders.KPackE.DataEntryForRadio
System.Windows.Forms.Form modelessDlg;
+ public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
double refVolume;
double errLimLo;