From e14dc370607def7f8b5f9cc5b61abb2f2fd7322c Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 4 Jan 2016 16:03:17 +0100 Subject: [PATCH] TestCompletedEventArgs modification --- .../BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs | 2 +- .../TestMethods/CombinedMeters/CombinedMetersSeq.cs | 2 +- .../CombinedWithDetection/CombinedWithDetectionSeq.cs | 2 +- .../TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs | 2 +- .../FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs | 2 +- .../FixedStartMassCollection/FixedStartMassCollectionSeq.cs | 2 +- .../BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs | 2 +- .../FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs | 2 +- .../BenchControl/TestMethods/LeakTest/LeakTestSeq.cs | 2 +- .../BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs | 2 +- .../ReferenceFlowmeterCalibrationSeq.cs | 2 +- .../TestMethods/iPerlCommunication/iPerlCommunicationForm.cs | 2 +- .../TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs | 4 ++-- TestBenchFramework/UiBridge/TestCompletedEventArgs.cs | 4 +++- 14 files changed, 17 insertions(+), 15 deletions(-) diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 8f0018c35..ad2848e42 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -352,7 +352,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment /// /// Add to results (after user quits the adjustment loop) /// - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index 16b3f7f81..73df2447b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -463,7 +463,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 4be90edc0..923cdb5bf 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -648,7 +648,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index d88b4e4c9..6e77a3e7d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -560,7 +560,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index 20838b345..e23bd2ea4 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -589,7 +589,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index a0ddc1e44..467d8dcd3 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -559,7 +559,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index ca9d7ea4c..03044c270 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -311,7 +311,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 98a6e7244..239f0447c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -499,7 +499,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 21498cef2..90ff8c112 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -364,7 +364,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index 0fa8c5122..74cec4d61 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -280,7 +280,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 47f3fd8a5..2f3247183 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -375,7 +375,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration /// Add data - end - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, test.Part)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 961c31fbb..0ff2c6926 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -541,7 +541,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication UpdateRfidCommResult(StateMachine.Tests[0].Name); /// TODO: Pass the test info in a correct way - TBF.UiBridge.Bridge.OnTestCompleted(this, new TBF.UiBridge.TestCompletedEventArgs(StateMachine.Tests[0].Name)); + TBF.UiBridge.Bridge.OnTestCompleted(this, new TBF.UiBridge.TestCompletedEventArgs(StateMachine.Tests[0].Name, 0)); formCompleted = true; Program.LocalSettings.iPerlCommunicationsFormLeft = Location.X; diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index b11eb765c..c1fa856dc 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -76,7 +76,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication MakeCorrectedFrom(test.Name, fromTestName); - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, test.Part)); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file IList rList = new List(1); @@ -93,7 +93,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication else if (testParams.Activity.ToLower().Contains("compound rise")) MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.0f); else if (testParams.Activity.ToLower().Contains("compound fall")) MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.9f); - Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name)); + Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, test.Part)); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file for (int i = 0; i < Config.Data.WMsCount; i++) diff --git a/TestBenchFramework/UiBridge/TestCompletedEventArgs.cs b/TestBenchFramework/UiBridge/TestCompletedEventArgs.cs index 7d8cb7240..71cf81bec 100644 --- a/TestBenchFramework/UiBridge/TestCompletedEventArgs.cs +++ b/TestBenchFramework/UiBridge/TestCompletedEventArgs.cs @@ -9,10 +9,12 @@ namespace TBF.UiBridge public class TestCompletedEventArgs : EventArgs { public string TestName; + public int TestPart; - public TestCompletedEventArgs(string testName) + public TestCompletedEventArgs(string testName, int testPart) { this.TestName = testName; + this.TestPart = testPart; } } }