From 120c1cc39d237fbcffd58ad07c5769edf6ed64da Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 22 Sep 2015 11:29:20 +0200 Subject: [PATCH] Remaining test time is shown in minutes and seconds. --- .../CombinedMeters/CombinedMetersSeq.cs | 9 ++++++++- .../CombinedWithDetectionSeq.cs | 9 ++++++++- .../FixedStartCombinedMetersSeq.cs | 9 ++++++++- .../FixedStartMassCollectionSeq.cs | 9 ++++++++- .../TestMethods/FlyingStart/FlyingStartSeq.cs | 9 ++++++++- .../FlyingStartCollectionMethodSeq.cs | 9 ++++++++- .../TestMethods/LeakTest/LeakTestSeq.cs | 18 ++++++++++++++++-- .../TestMethods/PMaxTest/PMaxTestSeq.cs | 9 ++++++++- 8 files changed, 72 insertions(+), 9 deletions(-) diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index 65f7df1f4..3c7439591 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -263,7 +263,14 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } if (firstTime) { diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 2b022e548..ad62ad7e7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -442,7 +442,14 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } if (firstTime) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index 2517a8cc5..091dafe57 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -331,7 +331,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } if (firstTime) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 3ac0c13ec..9c1843cbf 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -331,7 +331,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } if (firstTime) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 3ec7c4c01..e79a8a790 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -161,7 +161,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStart } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } if (firstTime) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs index fd694d454..b4645df56 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs @@ -296,7 +296,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod //------------------------------------------------ int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } //------------------------------------------------ if (firstTime) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 8f677c866..1bad70585 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -149,7 +149,14 @@ namespace TBF.BenchControl.TestMethods.LeakTest if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } } while (e.Contains(Event.TimerBusy)); @@ -232,7 +239,14 @@ namespace TBF.BenchControl.TestMethods.LeakTest if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } tstRslt.TempInEnd = tempIn.Val; tstRslt.TempOutEnd = tempOut.Val; diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index db5382ea5..f35dad630 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -159,7 +159,14 @@ namespace TBF.BenchControl.TestMethods.PMaxTest if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; } int remainingTime = Math.Max(endTime - StateMachine.Time, 0); - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} min {2} s", Strings.Test_in_progress, remainingTime / 60, remainingTime % 60)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } } while (e.Contains(Event.TimerBusy));