From 95c05078deef99dbae81c5ecac9856ea5336aaee Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 9 Jul 2015 16:24:55 +0200 Subject: [PATCH] Introduction of Program.CompoundWMsCount, fix in DataEntry.Combined.CycleBeginningForm, version 1.5.68. --- .../DataEntry/Combined/CycleBeginningForm.cs | 22 +++++++++-------- .../DataEntry/Combined/CycleEndForm.cs | 16 ++++++------- .../DataEntry/Combined/EntryForm.cs | 24 +++++++++---------- .../DataEntry/Combined/TestStartEndForm.cs | 4 ++-- .../DataEntry/Munich/CycleBeginningForm.cs | 12 +++++----- .../DataEntry/Munich/CycleEndForm.cs | 16 ++++++------- .../Basic/BasicPrintDocument.cs | 4 ++-- .../ResultsWriters/Basic/Writer.cs | 2 +- .../CombinedMeters/CombinedMetersSeq.cs | 6 ++--- .../CombinedWithDetectionSeq.cs | 14 +++++------ .../FixedStartCombinedMetersSeq.cs | 6 ++--- TestBenchFramework/Entities/TestResult.cs | 5 ++-- TestBenchFramework/Program.cs | 8 +++---- TestBenchFramework/Properties/AssemblyInfo.cs | 4 ++-- .../Screens/ResultsTabPageCtrl.cs | 4 ++-- 15 files changed, 74 insertions(+), 73 deletions(-) diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/CycleBeginningForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/CycleBeginningForm.cs index 33038a3a0..382c8bf5e 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/CycleBeginningForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/CycleBeginningForm.cs @@ -50,7 +50,7 @@ namespace TBF.BenchControl.DataEntry.Combined checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3 }; enabledComboBoxes = new List(); - this.WaterMetersCount = Program.WMsCount / 2; /// Default number of compound water meters + this.WaterMetersCount = Program.CompoundWMsCount; /// Default number of compound water meters completed = false; StartForceCloseHandler(); @@ -63,7 +63,7 @@ namespace TBF.BenchControl.DataEntry.Combined public CycleBeginningForm(int compoundWaterMetersCount) : this() { - this.WaterMetersCount = compoundWaterMetersCount; /// = Program.WMsCount / 2 + this.WaterMetersCount = compoundWaterMetersCount; /// = Program.CompondWMsCount MainSNText = new string[compoundWaterMetersCount]; AuxSNText = new string[compoundWaterMetersCount]; Disabled = new bool[compoundWaterMetersCount]; @@ -93,20 +93,22 @@ namespace TBF.BenchControl.DataEntry.Combined if (WaterMetersCount >= 2) groupBox2.Visible = true; if (WaterMetersCount >= 3) groupBox3.Visible = true; - if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount && - Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount) + for (int i = 0; i < TextBoxesCount; i++) { - for (int i = 0; i < TextBoxesCount; i++) + mainLabels[i].Visible = mainComboBoxes[i].Visible = true; + auxLabels[i].Visible = auxComboBoxes[i].Visible = true; + checkBoxes[i].Visible = true; + enabledComboBoxes.Add(mainComboBoxes[i]); + enabledComboBoxes.Add(auxComboBoxes[i]); + + if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount && + Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount) { mainComboBoxes[i].Items.Add(Program.LocalSettings.LastMainSNTexts[i]); auxComboBoxes[i].Items.Add(Program.LocalSettings.LastAuxSNTexts[i]); - mainLabels[i].Visible = mainComboBoxes[i].Visible = true; - auxLabels[i].Visible = auxComboBoxes[i].Visible = true; - checkBoxes[i].Visible = true; - enabledComboBoxes.Add(mainComboBoxes[i]); - enabledComboBoxes.Add(auxComboBoxes[i]); } } + } void Localize() diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/CycleEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/CycleEndForm.cs index 1d4971592..a08e5b7c4 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/CycleEndForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/CycleEndForm.cs @@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Combined { InitializeComponent(); - MainStateText = new string[Program.WMsCount / 2]; - AuxStateText = new string[Program.WMsCount / 2]; - QRise = new float[Program.WMsCount / 2]; - QFall = new float[Program.WMsCount / 2]; + MainStateText = new string[Program.CompoundWMsCount]; + AuxStateText = new string[Program.CompoundWMsCount]; + QRise = new float[Program.CompoundWMsCount]; + QFall = new float[Program.CompoundWMsCount]; completed = false; StartForceCloseHandler(); @@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Combined qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); - if (Program.WMsCount / 2 >= 2) + if (Program.CompoundWMsCount >= 2) { qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); @@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Combined Height = 305; } - if (Program.WMsCount / 2 >= 3) + if (Program.CompoundWMsCount >= 3) { qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); @@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Combined if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; } if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; } - if (Program.WMsCount / 2 >= 2) + if (Program.CompoundWMsCount >= 2) { MainStateText[1] = mainState2TextBox.Text; AuxStateText[1] = auxState2TextBox.Text; @@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Combined if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; } } - if (Program.WMsCount / 2 >= 3) + if (Program.CompoundWMsCount >= 3) { MainStateText[2] = mainState3TextBox.Text; AuxStateText[2] = auxState3TextBox.Text; diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs index 44670dee7..e2ae92c17 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs @@ -69,12 +69,12 @@ namespace TBF.BenchControl.DataEntry.Combined public EntryForm(EntryFormCfg cfg) : base(cfg) { - serialNr = new string[Program.WMsCount / 2 * 2]; - disabled = new bool[Program.WMsCount / 2]; - wmStartState = new float[Program.WMsCount / 2 * 2]; - wmStartStateStr = new string[Program.WMsCount / 2 * 2]; - wmEndState = new float[Program.WMsCount / 2 * 2]; - wmCycleEndState = new string[Program.WMsCount / 2 * 2]; + serialNr = new string[Program.CompoundWMsCount * 2]; + disabled = new bool[Program.CompoundWMsCount]; + wmStartState = new float[Program.CompoundWMsCount * 2]; + wmStartStateStr = new string[Program.CompoundWMsCount * 2]; + wmEndState = new float[Program.CompoundWMsCount * 2]; + wmCycleEndState = new string[Program.CompoundWMsCount * 2]; entryFormCfg = cfg; currentOp = CurrentOp.None; @@ -122,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.Combined /// void OpenBeginningDlg(EntryForm myRef) { - myRef.modelessDlg = new CycleBeginningForm(Program.WMsCount / 2); + myRef.modelessDlg = new CycleBeginningForm(Program.CompoundWMsCount); modelessDlg.Show(); } /// @@ -135,20 +135,20 @@ namespace TBF.BenchControl.DataEntry.Combined /// void OpenTestStartStatesDlg(EntryForm myRef) { - myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, disabled); + myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, disabled); modelessDlg.Show(); } /// void OpenTestEndStatesDlg(EntryForm myRef) { - string[] mainStartSateStr = new string[Program.WMsCount / 2]; - string[] auxStartSateStr = new string[Program.WMsCount / 2]; - for (int i = 0; i < Program.WMsCount / 2; i++) + string[] mainStartSateStr = new string[Program.CompoundWMsCount]; + string[] auxStartSateStr = new string[Program.CompoundWMsCount]; + for (int i = 0; i < Program.CompoundWMsCount; i++) { mainStartSateStr[i] = wmStartStateStr[2 * i]; auxStartSateStr[i] = wmStartStateStr[2 * i + 1]; } - myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi); + myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi); modelessDlg.Show(); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/TestStartEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/TestStartEndForm.cs index 2aa61275c..8fbfb9a2c 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/TestStartEndForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/TestStartEndForm.cs @@ -132,9 +132,9 @@ namespace TBF.BenchControl.DataEntry.Combined /// void ShuffleTextBoxes() { - if (Program.WMsCount / 2 < TextBoxesCount) + if (Program.CompoundWMsCount < TextBoxesCount) { - TextBoxesCount = Program.WMsCount / 2; + TextBoxesCount = Program.CompoundWMsCount; } } diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/CycleBeginningForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/CycleBeginningForm.cs index dca86d4d0..d60fa667b 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich/CycleBeginningForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich/CycleBeginningForm.cs @@ -26,13 +26,13 @@ namespace TBF.BenchControl.DataEntry.Munich { InitializeComponent(); - MainSNText = new string[Program.WMsCount / 2]; - AuxSNText = new string[Program.WMsCount / 2]; + MainSNText = new string[Program.CompoundWMsCount]; + AuxSNText = new string[Program.CompoundWMsCount]; completed = false; StartForceCloseHandler(); - if (Program.WMsCount / 2 < 2) Height = 200; - else if (Program.WMsCount / 2 < 3) Height = 355; + if (Program.CompoundWMsCount < 2) Height = 200; + else if (Program.CompoundWMsCount < 3) Height = 355; Localize(); } @@ -57,13 +57,13 @@ namespace TBF.BenchControl.DataEntry.Munich MainSNText[0] = mainSN1TextBox.Text; AuxSNText[0] = auxSN1TextBox.Text; - if (Program.WMsCount / 2 >= 2) + if (Program.CompoundWMsCount >= 2) { MainSNText[1] = mainSN2TextBox.Text; AuxSNText[1] = auxSN2TextBox.Text; } - if (Program.WMsCount / 2 >= 3) + if (Program.CompoundWMsCount >= 3) { MainSNText[2] = mainSN3TextBox.Text; AuxSNText[2] = auxSN3TextBox.Text; diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/CycleEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/CycleEndForm.cs index a07f309a6..58656d983 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich/CycleEndForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich/CycleEndForm.cs @@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Munich { InitializeComponent(); - MainStateText = new string[Program.WMsCount / 2]; - AuxStateText = new string[Program.WMsCount / 2]; - QRise = new float[Program.WMsCount / 2]; - QFall = new float[Program.WMsCount / 2]; + MainStateText = new string[Program.CompoundWMsCount]; + AuxStateText = new string[Program.CompoundWMsCount]; + QRise = new float[Program.CompoundWMsCount]; + QFall = new float[Program.CompoundWMsCount]; completed = false; StartForceCloseHandler(); @@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Munich qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); - if (Program.WMsCount / 2 >= 2) + if (Program.CompoundWMsCount >= 2) { qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); @@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Munich Height = 305; } - if (Program.WMsCount / 2 >= 3) + if (Program.CompoundWMsCount >= 3) { qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3); qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3); @@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Munich if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; } if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; } - if (Program.WMsCount / 2 >= 2) + if (Program.CompoundWMsCount >= 2) { MainStateText[1] = mainState2TextBox.Text; AuxStateText[1] = auxState2TextBox.Text; @@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Munich if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; } } - if (Program.WMsCount / 2 >= 3) + if (Program.CompoundWMsCount >= 3) { MainStateText[2] = mainState3TextBox.Text; AuxStateText[2] = auxState3TextBox.Text; diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/BasicPrintDocument.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/BasicPrintDocument.cs index 027fb5dd8..b6d82708c 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/BasicPrintDocument.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/BasicPrintDocument.cs @@ -174,9 +174,9 @@ namespace TBF.BenchControl.ResultsPrinters.Basic if (combined) { - for (int wmNr = 1; wmNr <= Program.WMsCount / 2; wmNr++) /// wmNr is 1-based + for (int wmNr = 0; wmNr < Program.CompoundWMsCount; wmNr++) /// wmNr is 0-based { - nextWmTop += PrintCombinedWM(e, wmNr, nextWmTop); + nextWmTop += PrintCombinedWM(e, wmNr + 1, nextWmTop); } } else diff --git a/TestBenchFramework/BenchControl/ResultsWriters/Basic/Writer.cs b/TestBenchFramework/BenchControl/ResultsWriters/Basic/Writer.cs index 739a22a82..88bd08d12 100644 --- a/TestBenchFramework/BenchControl/ResultsWriters/Basic/Writer.cs +++ b/TestBenchFramework/BenchControl/ResultsWriters/Basic/Writer.cs @@ -225,7 +225,7 @@ namespace TBF.BenchControl.ResultsWriters.Basic ///-------- if (combined) { - for (int wmNr = 1; wmNr <= Program.WMsCount / 2; wmNr++) WriteCombinedWM(wmNr); /// wmNr is 1-based + for (int wmNr = 0; wmNr < Program.CompoundWMsCount; wmNr++) WriteCombinedWM(wmNr + 1); /// wmNr is 0-based } else { diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index 2b10f327a..bcb773750 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -292,7 +292,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq, cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow); - for (int i = 0; i < (Program.WMsCount / 2) * 2; i++) + for (int i = 0; i < Program.CompoundWMsCount * 2; i++) { logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]); } @@ -300,7 +300,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime); TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress); - for (int i = 0; i < Program.WMsCount / 2; i++) + for (int i = 0; i < Program.CompoundWMsCount; i++) { data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter + data.TestResult.Meters[2 * i + 1].VolumeMeter; @@ -415,7 +415,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters tstRslt.TimeDivEnd4 = 0; tstRslt.TimeDivEnd5 = 0; - for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++) + for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++) { tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index aca86821d..9fbb5cf54 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -20,9 +20,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection public IList Execute(Entities.Test test, CombinedWithDetTestParams testParams) { - if (test.Part < 1 || test.Part > (Program.WMsCount / 2)) + if (test.Part < 1 || test.Part > Program.CompoundWMsCount) { - UiBridge.Bridge.OnError(this, string.Format("Test 'Part' should be 1 .. {0}", Program.WMsCount / 2)); + UiBridge.Bridge.OnError(this, string.Format("Test 'Part' should be 1 .. {0}", Program.CompoundWMsCount)); IList retval = new List(1); retval.Add(Event.ConfigurationError); return retval; @@ -31,7 +31,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; /// Specific for combined meters - int[] lastWMPulses = new int[Program.WMsCount]; + int[] lastWMPulses = new int[2 * Program.CompoundWMsCount]; IList e = new List(); /// Events from currently running operations @@ -220,7 +220,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection while (!e.Contains(Event.PositionReached)); // Last pulses are kept to calculate differences - for (int i = 0; i < Program.WMsCount; i++) lastWMPulses[i] = WMPulses[i]; + for (int i = 0; i < 2 * Program.CompoundWMsCount; i++) lastWMPulses[i] = WMPulses[i]; // Shift data in the detection buffers for (int i = DetectionBufferSize - 2; i >= 0; i--) @@ -466,7 +466,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq, cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow); - for (int i = 0; i < (Program.WMsCount / 2) * 2; i++) + for (int i = 0; i < Program.CompoundWMsCount * 2; i++) { logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]); } @@ -475,7 +475,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime); TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress); - for (int i = 0; i < Program.WMsCount / 2; i++) + for (int i = 0; i < Program.CompoundWMsCount; i++) { data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter + data.TestResult.Meters[2 * i + 1].VolumeMeter; @@ -595,7 +595,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.TimeDivEnd4 = 0; tstRslt.TimeDivEnd5 = 0; - for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++) + for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++) { for (int i = 2 * iCmbnd; i < 2 * iCmbnd + 2; i++) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index 8c4da5af9..ecfa7518c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -369,7 +369,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime); TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress); - for (int i = 0; i < Program.WMsCount / 2; i++) + for (int i = 0; i < Program.CompoundWMsCount; i++) { data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter + data.TestResult.Meters[2 * i + 1].VolumeMeter; @@ -486,7 +486,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters while (!e.Contains(Event.ModelessFormClosed)); - for (int i = 0; i < Program.WMsCount / 2 * 2; i++) + for (int i = 0; i < Program.CompoundWMsCount * 2; i++) { tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMEndState(i); @@ -547,7 +547,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters tstRslt.TimeDivEnd4 = 0; tstRslt.TimeDivEnd5 = 0; - for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++) + for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++) { tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error tstRslt.CombinedMeters[iCmbnd].PulsesMaster = tstRslt.PulsesMaster; diff --git a/TestBenchFramework/Entities/TestResult.cs b/TestBenchFramework/Entities/TestResult.cs index 75bd22b4c..f301c3017 100644 --- a/TestBenchFramework/Entities/TestResult.cs +++ b/TestBenchFramework/Entities/TestResult.cs @@ -116,9 +116,8 @@ namespace TBF.Entities } else if (kind == MetersKind.Combined) { - int combinedCount = Program.WMsCount / 2; - for (int i = 0; i < 2 * combinedCount; i++) Meters.Add(new MeterTestResult(this)); - for (int i = 0; i < combinedCount; i++) CombinedMeters.Add(new MeterTestResult(this)); + for (int i = 0; i < 2 * Program.CompoundWMsCount; i++) Meters.Add(new MeterTestResult(this)); + for (int i = 0; i < Program.CompoundWMsCount; i++) CombinedMeters.Add(new MeterTestResult(this)); } } diff --git a/TestBenchFramework/Program.cs b/TestBenchFramework/Program.cs index d5bb42f09..0e07cdf02 100644 --- a/TestBenchFramework/Program.cs +++ b/TestBenchFramework/Program.cs @@ -39,19 +39,19 @@ namespace TBF #if DN100 || MUNICH public const int WMsCount = 3; public const int LineSize = 3; - public const int CompondWMsCount = 1; + public const int CompoundWMsCount = 1; #elif FUZHOU300 || FUZHOU150 || PT200IL public const int WMsCount = 6; public const int LineSize = 6; - public const int CompondWMsCount = 3; + public const int CompoundWMsCount = 3; #elif TORINO50 || BADGER_MALA_TRAT public const int WMsCount = 6; public const int LineSize = 6; - public const int CompondWMsCount = 1; + public const int CompoundWMsCount = 1; #elif TORUN_PT50_2015 || CEVAK_PT40_272 public const int WMsCount = 20; public const int LineSize = 10; - public const int CompondWMsCount = 1; + public const int CompoundWMsCount = 1; #endif /// diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 5fe58781e..2d340180e 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.5.67.1")] -[assembly: AssemblyFileVersion("1.5.67.1")] +[assembly: AssemblyVersion("1.5.68.1")] +[assembly: AssemblyFileVersion("1.5.68.1")] diff --git a/TestBenchFramework/Screens/ResultsTabPageCtrl.cs b/TestBenchFramework/Screens/ResultsTabPageCtrl.cs index 59d349b21..b4dfac12b 100644 --- a/TestBenchFramework/Screens/ResultsTabPageCtrl.cs +++ b/TestBenchFramework/Screens/ResultsTabPageCtrl.cs @@ -148,7 +148,7 @@ namespace TBF.Screens int enabledWMsCount = 0; if (combined) { - enabledWMsCount = Program.WMsCount / 2; + enabledWMsCount = Program.CompoundWMsCount; } else { @@ -179,7 +179,7 @@ namespace TBF.Screens flowLayoutPanel.AutoScroll = true; bool first = true; - for (int mtr = 1; mtr <= (combined ? Program.WMsCount / 2 : Program.WMsCount); mtr++) + for (int mtr = 1; mtr <= (combined ? Program.CompoundWMsCount : Program.WMsCount); mtr++) { if (combined || (testResults != null && testResults.Count > 0 && !testResults[0].Meters[mtr - 1].Disabled)) {