diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 380a29974..7fe8c5938 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -257,6 +257,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication public bool Completed { get { return formCompleted; } } bool formCompleted; + bool forcedClose; /// Set in the forced close handler + + /// Number of text boxes for serial numbers public int WaterMetersCount; @@ -659,6 +662,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication AllCompletedHandler = null; stopWorkerThreads = true; + forcedClose = true; DialogResult = DialogResult.Cancel; Close(); @@ -2019,7 +2023,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication private void iPerlCommunicationForm_FormClosing(object sender, FormClosingEventArgs e) { - if ((e.CloseReason == CloseReason.UserClosing) && !checkBoxesEditMode) + if (!forcedClose && !formCompleted && !checkBoxesEditMode) { e.Cancel = true; } diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx index 3e4955461..38c6ecca8 100644 --- a/TBF/Resources/Strings.cs.resx +++ b/TBF/Resources/Strings.cs.resx @@ -358,7 +358,7 @@ Vyprázdnění - Vyprazdňování ({0}: Krok {1} / {2}) + Vypouštění ({0}: Krok {1} / {2}) Vyprázdnění nádrže @@ -715,7 +715,7 @@ Vyplachování - Vypouštění ({0}: Krok {1} / {2}) + Napouštění ({0}: Krok {1} / {2}) Objednávka