From 0ac1fe2b4eecc0f613eed5e13dc6d5017cc995cf Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 28 Jun 2016 18:04:52 +0200 Subject: [PATCH] HeatMetersPath, UI, etc., HEAT_METERS_SUPPORT symbol introduced ProcedureDlg modifications: (1) localization by TBF.Resources.Strings, (2) Heat meters support FlyingStartMassCollection and CombinedMeters methods with similar sequences --- Config/Config.csproj | 2 + Config/Entities/Enums.cs | 1 + Config/Entities/HeatMetersPath.cs | 39 + Config/Entities/Test.cs | 8 +- Config/Entities/TestResult.cs | 7 +- Config/Mappings/HeatMetersPathMap.cs | 22 + Config/Mappings/TestMap.cs | 5 +- Results/BatchResults.cs | 5 +- Results/Entities/Batch.cs | 7 +- Results/Entities/WaterMeter.cs | 5 +- Results/Entities/WaterMeterData.cs | 4 +- Results/Mappings/WaterMeterDataMap.cs | 4 +- .../BenchControl/HeatMetersPath.cs | 36 + .../BenchControl/Sequences/MainSeq.cs | 26 +- .../BenchControl/Sequences/SequenceBase.cs | 2 + .../BenchControl/StateMachine.cs | 36 +- .../CombinedMeters/CombinedMetersSeq.cs | 425 +-- .../FlyingStartMassCollectionSeq.cs | 480 ++-- .../FlyingStartMassCollection/TestMethod.cs | 2 +- TestBenchFramework/Forms/ResultsConfig.cs | 2 +- TestBenchFramework/LocalSettings.cs | 5 + TestBenchFramework/MainWnd.cs | 1 - TestBenchFramework/PathsDlg.Designer.cs | 290 +- TestBenchFramework/PathsDlg.cs | 57 +- TestBenchFramework/PathsDlg.resx | 606 +++-- TestBenchFramework/ProcedureDlg.Designer.cs | 81 +- TestBenchFramework/ProcedureDlg.cs | 89 +- TestBenchFramework/ProcedureDlg.cs.resx | 238 -- TestBenchFramework/ProcedureDlg.de.resx | 328 --- TestBenchFramework/ProcedureDlg.resx | 2346 +++++++++-------- TestBenchFramework/ProcedureDlg.zh-CN.resx | 193 -- .../Resources/Strings.Designer.cs | 234 +- TestBenchFramework/Resources/Strings.cs.resx | 55 +- TestBenchFramework/Resources/Strings.de.resx | 70 +- TestBenchFramework/Resources/Strings.pl.resx | 10 +- TestBenchFramework/Resources/Strings.resx | 74 +- TestBenchFramework/Resources/Strings.ro.resx | 4 +- TestBenchFramework/Resources/Strings.sk.resx | 6 + .../Resources/Strings.zh-CN.resx | 49 +- .../Screens/ProcessTabPageCtrl24.cs | 8 +- TestBenchFramework/TBF.csproj | 13 +- .../UiControls/PathsHeatMetersCtrl.cs | 177 ++ 42 files changed, 3181 insertions(+), 2871 deletions(-) create mode 100644 Config/Entities/HeatMetersPath.cs create mode 100644 Config/Mappings/HeatMetersPathMap.cs create mode 100644 TestBenchFramework/BenchControl/HeatMetersPath.cs delete mode 100644 TestBenchFramework/ProcedureDlg.cs.resx delete mode 100644 TestBenchFramework/ProcedureDlg.de.resx delete mode 100644 TestBenchFramework/ProcedureDlg.zh-CN.resx create mode 100644 TestBenchFramework/UiControls/PathsHeatMetersCtrl.cs diff --git a/Config/Config.csproj b/Config/Config.csproj index 9ab87e828..aa743e332 100644 --- a/Config/Config.csproj +++ b/Config/Config.csproj @@ -74,6 +74,7 @@ + @@ -99,6 +100,7 @@ + diff --git a/Config/Entities/Enums.cs b/Config/Entities/Enums.cs index 14b156e87..323002bd2 100644 --- a/Config/Entities/Enums.cs +++ b/Config/Entities/Enums.cs @@ -67,6 +67,7 @@ namespace Config.Entities { Single, Combined, + HeatMeter, } public enum CompoundMeterId : byte diff --git a/Config/Entities/HeatMetersPath.cs b/Config/Entities/HeatMetersPath.cs new file mode 100644 index 000000000..15eee569f --- /dev/null +++ b/Config/Entities/HeatMetersPath.cs @@ -0,0 +1,39 @@ +/// +/// Copyright (c) 2016 Sensus Metering Systems +/// +using System; + +namespace Config.Entities +{ + public class HeatMetersPath : IHasItemNr + { + public virtual int Id { get; protected set; } + public virtual int ItemNr { get; set; } + public virtual string Name { get; set; } + public virtual string TempWarm { get; set; } + public virtual string TempCold { get; set; } + + /// ------------- Additional stuff not mapped into the database ------------- + + public HeatMetersPath() + { + } + + public HeatMetersPath(string name, int itemNr) + : this() + { + Name = name; + ItemNr = itemNr; + } + + public virtual HeatMetersPath Clone(string name, int itemNr) + { + HeatMetersPath result = new HeatMetersPath(name, itemNr); + + result.TempWarm = TempWarm; + result.TempCold = TempCold; + + return result; + } + } +} diff --git a/Config/Entities/Test.cs b/Config/Entities/Test.cs index 71d353ca8..ad3be6274 100644 --- a/Config/Entities/Test.cs +++ b/Config/Entities/Test.cs @@ -44,7 +44,10 @@ namespace Config.Entities public virtual string BenchPath { get; set; } public virtual string OutputPath { get; set; } public virtual string MetersPath { get; set; } - public virtual string RelTransBefore { get; set; } +#if HEAT_METERS_SUPPORT + public virtual string HeatMetersPath { get; set; } +#endif + public virtual string RelTransBefore { get; set; } public virtual string RelTransBetween { get; set; } public virtual string RelTransAfter { get; set; } public virtual string TransitionAfter { get; set; } @@ -126,6 +129,9 @@ namespace Config.Entities result.BenchPath = BenchPath; result.OutputPath = OutputPath; result.MetersPath = MetersPath; +#if HEAT_METERS_SUPPORT + result.HeatMetersPath = HeatMetersPath; +#endif result.RelTransBefore = RelTransBefore; result.RelTransBetween = RelTransBetween; result.RelTransAfter = RelTransAfter; diff --git a/Config/Entities/TestResult.cs b/Config/Entities/TestResult.cs index ea41fc1bb..6b029e0c5 100644 --- a/Config/Entities/TestResult.cs +++ b/Config/Entities/TestResult.cs @@ -120,7 +120,12 @@ namespace Config.Entities for (int i = 0; i < 2 * Config.Data.CompoundWMsCount; i++) Meters.Add(new MeterTestResult(this)); for (int i = 0; i < Config.Data.CompoundWMsCount; i++) CombinedMeters.Add(new MeterTestResult(this)); } - } + else if (kind == MetersKind.HeatMeter) + { + /// TODO: Verify if this is OK + for (int i = 0; i < Config.Data.WMsCount; i++) Meters.Add(new MeterTestResult(this)); + } + } public TestResult(Test test, int repetitionNr, MetersKind kind) : this(kind) diff --git a/Config/Mappings/HeatMetersPathMap.cs b/Config/Mappings/HeatMetersPathMap.cs new file mode 100644 index 000000000..2554388d5 --- /dev/null +++ b/Config/Mappings/HeatMetersPathMap.cs @@ -0,0 +1,22 @@ +/// +/// Copyright (c) 2016 Sensus Metering Systems +/// +using FluentNHibernate.Mapping; +using Config.Entities; + +namespace Config.Mappings +{ +#if HEAT_METERS_SUPPORT + class HeatMetersPathMap : ClassMap + { + public HeatMetersPathMap() + { + Id(x => x.Id); + Map(x => x.ItemNr); + Map(x => x.Name); + Map(x => x.TempWarm); + Map(x => x.TempCold); + } + } +#endif +} diff --git a/Config/Mappings/TestMap.cs b/Config/Mappings/TestMap.cs index 9633d699b..89ec3e11a 100644 --- a/Config/Mappings/TestMap.cs +++ b/Config/Mappings/TestMap.cs @@ -44,7 +44,10 @@ namespace Config.Mappings Map(x => x.BenchPath); Map(x => x.OutputPath); Map(x => x.MetersPath); - Map(x => x.RelTransBefore); +#if HEAT_METERS_SUPPORT + Map(x => x.HeatMetersPath); +#endif + Map(x => x.RelTransBefore); Map(x => x.RelTransBetween); Map(x => x.RelTransAfter); Map(x => x.TransitionAfter); diff --git a/Results/BatchResults.cs b/Results/BatchResults.cs index 842803904..8d86655b7 100644 --- a/Results/BatchResults.cs +++ b/Results/BatchResults.cs @@ -49,7 +49,10 @@ namespace Results ProtocolTitle = procedure.ProtocolTitle, StartTime = DateTime.Now, Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined), - }; +#if HEAT_METERS_SUPPORT + HeatMeter = (procedure.MetersKind == Config.Entities.MetersKind.HeatMeter), +#endif + }; /// /// Add watermeter to an array, array index is WM position. diff --git a/Results/Entities/Batch.cs b/Results/Entities/Batch.cs index 2ec36792a..533f2c73c 100644 --- a/Results/Entities/Batch.cs +++ b/Results/Entities/Batch.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -31,8 +31,11 @@ namespace Results.Entities public virtual IList WaterMeters { get; set; } public virtual IList TestRslts { get; set; } public virtual bool Compound { get; set; } /// Not mapped to DB now +#if HEAT_METERS_SUPPORT + public virtual bool HeatMeter { get; set; } /// Not mapped to DB now +#endif - public Batch() + public Batch() { Tests = new List(); WaterMeters = new List(); diff --git a/Results/Entities/WaterMeter.cs b/Results/Entities/WaterMeter.cs index 16437f530..34d25261c 100644 --- a/Results/Entities/WaterMeter.cs +++ b/Results/Entities/WaterMeter.cs @@ -51,7 +51,10 @@ namespace Results.Entities public virtual double Q2_Qt() { return WaterMeterData.Q2_Qt; } public virtual double Q1_Qmin() { return WaterMeterData.Q1_Qmin; } - public virtual bool Compound() { return WaterMeterData.Compound; } + public virtual bool Compound() { return WaterMeterData.Compound; } +#if HEAT_METER_SUPPORT + public virtual bool HeatMeter() { return WaterMeterData.HeatMeter; } +#endif public virtual string ProducerAux() { return WaterMeterData.ProducerAux; } public virtual double Q3_Qn_Aux() { return WaterMeterData.Q3_Qn_Aux; } diff --git a/Results/Entities/WaterMeterData.cs b/Results/Entities/WaterMeterData.cs index bf54a8b5f..21759e6ed 100644 --- a/Results/Entities/WaterMeterData.cs +++ b/Results/Entities/WaterMeterData.cs @@ -47,7 +47,9 @@ namespace Results.Entities public virtual string Text5 { get; set; } public virtual bool Compound { get; set; } - +#if HEAT_METER_SUPPORT + public virtual bool HeatMeter { get; set; } +#endif #if IPERLST || IPERLST_SPECIAL public virtual int WMTypeId { get; set; } public virtual int WMTypeRev { get; set; } diff --git a/Results/Mappings/WaterMeterDataMap.cs b/Results/Mappings/WaterMeterDataMap.cs index 2b89cf618..62b36871f 100644 --- a/Results/Mappings/WaterMeterDataMap.cs +++ b/Results/Mappings/WaterMeterDataMap.cs @@ -46,7 +46,9 @@ namespace Results.Mappings Map(x => x.Text5); Map(x => x.Compound); - +#if HEAT_METER_SUPPORT + Map(x => x.HeatMeter); +#endif #if IPERLST || IPERLST_SPECIAL Map(x => x.WMTypeId); Map(x => x.WMTypeRev); diff --git a/TestBenchFramework/BenchControl/HeatMetersPath.cs b/TestBenchFramework/BenchControl/HeatMetersPath.cs new file mode 100644 index 000000000..7aae9863f --- /dev/null +++ b/TestBenchFramework/BenchControl/HeatMetersPath.cs @@ -0,0 +1,36 @@ +/// +/// Copyright (c) 2016 Sensus Metering Systems +/// +using System.Collections.Generic; +using TBF.BenchControl.GenericDevices; + +namespace TBF.BenchControl +{ + public class HeatMetersPath + { + public int ItemNr; + public string Name; + public ITempMeter TempWarm; + public ITempMeter TempCold; + + /// Constructor from name, the rest is empty + public HeatMetersPath(string name, int itemNr) + { + ItemNr = itemNr; + Name = name; + } + + /// Constructor from data entity + public HeatMetersPath(Config.Entities.HeatMetersPath entity, IList components) + : this(entity.Name, entity.ItemNr) + { + TempWarm = TbfComponents.FindComponent(entity.TempWarm, components) as ITempMeter; + TempCold = TbfComponents.FindComponent(entity.TempCold, components) as ITempMeter; + } + + public override string ToString() + { + return string.Format("{0}", Name); + } + } +} diff --git a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs index 5a13fceed..6af15cf76 100644 --- a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs +++ b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs @@ -487,8 +487,8 @@ namespace TBF.BenchControl.Sequences /// Try to fetch all test paths and transitions /// to detect configuration errors as early as possible. string errorMsg; - if (!StateMachine.GetPaths(test, out inPath, out benchPath, - out outPath, out sensPath, + if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath, + out heatMetersPath, out transitionBefore, out transitionAfter, out errorMsg)) { @@ -504,9 +504,9 @@ namespace TBF.BenchControl.Sequences /// Fetch the test paths and transitions string errorMsg; - if (!StateMachine.GetPaths(test, out inPath, out benchPath, - out outPath, out sensPath, - out transitionBefore, out transitionAfter, + if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath, + out heatMetersPath, + out transitionBefore, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -585,9 +585,9 @@ namespace TBF.BenchControl.Sequences /// Try to fetch all test paths and transitions /// to detect configuration errors as early as possible. string errorMsg; - if (!StateMachine.GetPaths(test, out inPath, out benchPath, - out outPath, out sensPath, - out transitionBefore, out transitionAfter, + if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath, + out heatMetersPath, + out transitionBefore, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -602,9 +602,9 @@ namespace TBF.BenchControl.Sequences /// Fetch the test paths and transitions string errorMsg; - if (!StateMachine.GetPaths(test, out inPath, out benchPath, - out outPath, out sensPath, - out transitionBefore, out transitionAfter, + if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath, + out heatMetersPath, + out transitionBefore, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -659,8 +659,8 @@ namespace TBF.BenchControl.Sequences /// Fetch the test paths and transitions string errorMsg; - if (!StateMachine.GetPaths(test, out inPath, out benchPath, - out outPath, out sensPath, + if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath, + out heatMetersPath, out transitionBefore, out transitionAfter, out errorMsg)) { diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index e2923c447..81b97398e 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -54,6 +54,8 @@ namespace TBF.BenchControl.Sequences protected static BenchControl.BenchPath benchPath; protected static BenchControl.OutputPath outPath; protected static BenchControl.MetersPath sensPath; + protected static BenchControl.HeatMetersPath heatMetersPath; + protected static TransitionSequence transitionBefore; protected static TransitionSequence transitionAfter; diff --git a/TestBenchFramework/BenchControl/StateMachine.cs b/TestBenchFramework/BenchControl/StateMachine.cs index ad0e2c408..7872d7989 100644 --- a/TestBenchFramework/BenchControl/StateMachine.cs +++ b/TestBenchFramework/BenchControl/StateMachine.cs @@ -38,7 +38,8 @@ namespace TBF.BenchControl static IList benchPaths; static IList outputPaths; static IList metersPaths; - public static IList TransitionSequences; + static IList heatMetersPaths; + public static IList TransitionSequences; /// Public components public static Elde.ControlBoardDev ControlBoard; @@ -324,7 +325,10 @@ namespace TBF.BenchControl benchPaths = session.CreateQuery("FROM BenchPath ORDER BY ItemNr").List(); outputPaths = session.CreateQuery("FROM OutputPath ORDER BY ItemNr").List(); metersPaths = session.CreateQuery("FROM MetersPath ORDER BY ItemNr").List(); - TransitionSequences = session.CreateQuery("FROM TransitionSequence ORDER BY ItemNr").List(); + TransitionSequences = session.CreateQuery("FROM TransitionSequence ORDER BY ItemNr").List(); +#if HEAT_METERS_SUPPORT + heatMetersPaths = session.CreateQuery("FROM HeatMetersPath ORDER BY ItemNr").List(); +#endif // Automatic detection of empty tank valves foreach (var opath in outputPaths) @@ -418,13 +422,15 @@ namespace TBF.BenchControl out BenchPath pben, out OutputPath pout, out MetersPath pmtrs, - out TransitionSequence transitionBefore, + out HeatMetersPath phmtrs, + out TransitionSequence transitionBefore, out TransitionSequence transitionAfter, out string errorMsg) { pfeed = null; pben = null; pout = null; + phmtrs = null; transitionBefore = null; transitionAfter = null; @@ -445,17 +451,29 @@ namespace TBF.BenchControl pmtrs = GetMetersPath(test); - foreach (var tr in TransitionSequences) - { - if (tr.Name == test.RelTransBefore) transitionBefore = tr; - if (tr.Name == test.TransitionAfter) transitionAfter = tr; - } + if ((pfeed == null) || (pben == null) || (pout == null) || (pmtrs == null)) + { + errorMsg = "Cannot load paths"; + return false; + } - if ((pfeed == null) || (pben == null) || (pout == null) || (pmtrs == null)) +#if HEAT_METERS_SUPPORT + foreach (var path in heatMetersPaths) + { + if (test.HeatMetersPath == path.Name) { phmtrs = new HeatMetersPath(path, components); break; } + } + if (phmtrs == null) { errorMsg = "Cannot load paths"; return false; } +#endif + + foreach (var tr in TransitionSequences) + { + if (tr.Name == test.RelTransBefore) transitionBefore = tr; + if (tr.Name == test.TransitionAfter) transitionAfter = tr; + } if (pout.Balance == null) { diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index dab3fae10..fe4e51b89 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -29,35 +29,27 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters public IList Execute(Config.Entities.Test test, CombinedTestParams testParams) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; - + IList e = new List(); /// Events from currently running operations Event retVal = Event.Done; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state - - LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h] - - /// Notes: - /// float timeHr = volumeLtr / (1000.0f * targetFlow); - /// float timeSec = 3600.0f * timeHr; - /// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow)); - int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); - - LtrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse] - /// processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this); - - int repetitionNr = 1; /// First test: repetitionNr=1 - //==================================== - // Transition or SetRoute - Start - //==================================== + LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; + int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); + + int repetitionNr = 1; /// First test: repetitionNr = 1 + + //==================================== + // Transition or SetRoute - Start + //==================================== switch (Transition(transitionBefore, TransitionContext.BeforeTest)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } } - //==================================== + //==================================== loop: /// Start the test, initialize test results Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, totalPulses)); @@ -65,110 +57,165 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters TestStartTime = DateTime.Now; TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 }); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.JustStarted)); - - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); int flowSetTime0 = StateMachine.Time; - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Setting_the_flow); - //------------------------------------------------ - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Checking_tank_capacity); + //------------------------------------------------ + bool tankEmptyingInProgress = test.Emptying; - State.Create("CombinedMeters : Waiting 5 sec") - .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(5)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); - - - State.Create("CombinedMeters : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - - - if (!test.Emptying) /// If condition met => skip measuring and force emptying + if (!tankEmptyingInProgress) /// If condition met => skip measuring and force emptying { - /// - /// Measure the weight and skip emptying if there is enough room in the tank - /// - State.Create("CombinedMeters : Measuring the mass of water in the tank") + /// + /// Measure the weight and skip emptying if there is enough room in the tank + /// + State.Create("CombinedMeters : Checking available tank capacity") .AddOperation(checkUiOp) .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } } while (!e.Contains(Event.BalanceDone)); float estimatedEndMass = Mass.Val + test.Volume; - if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor) + if (estimatedEndMass >= outPath.Balance.Capacity * Constants.TankFullFactor) { - goto set_flow; /// Enough room in the tank -> skip emptying + tankEmptyingInProgress = true; } } + /// + if (tankEmptyingInProgress) + { + State.Create("SequenceBase : Opening the emptying valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.EmptyTankValve, null)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } - /// - /// Empty the water tank - /// - switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) - { - case Event.Error: { retVal = Event.Error; goto stopTest; } - case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } - } - set_flow: + if (inPath.Pump != null) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + /// + State.Create("CombinedMeters : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } + + + if (test.TimePump2StartV > 0) + { + State.Create("CombinedMeters : Waiting after the pump started") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimePump2StartV)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + + + if (benchPath.StopBFValve != null) + { + State.Create("CombinedMeters : Opening the stop backflow valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(benchPath.StopBFValve, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } + + + if (test.TimeBeforeFlow > 0) + { + State.Create("CombinedMeters : Waiting before flow setting process starts") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimeBeforeFlow)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + + + setting_flow: //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_flow); //------------------------------------------------ - State.Create("CombinedMeters : Setting the flow") - .AddOperation(checkUiOp) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min. - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + State.Create("CombinedMeters : Setting the flow") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min. + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.RegulValveTimeOut)) + { + Bridge.OnError(this, Strings.Timeout); + retVal = Event.Done; + goto stopTest; + } + if (e.Contains(Event.Next)) goto flow_set; + } + while (!e.Contains(Event.FlowReached)); - if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - if (e.Contains(Event.RegulValveTimeOut)) - { - Bridge.OnError(this, Strings.Timeout); - retVal = Event.Done; - goto stopTest; - } - if (e.Contains(Event.Next)) goto flow_set; - } - while (!e.Contains(Event.FlowReached)); flow_set: - int flowSetTime = StateMachine.Time - flowSetTime0; + + int flowSetTime = StateMachine.Time - flowSetTime0; float currentFlow = RefFlow.Val; /// Extract cameras from the current sensors path, add operations to the detection state @@ -179,39 +226,63 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); } - State.Create("CombinedMeters : Waiting before 1st mass measurement") - .AddOperation(checkUiOp) - .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) - .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) - .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) - .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) - .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) - .AddOperation((StateMachine.Ambient != null) - ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) - .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) - .AddOperation(cBrd.UpdateTankWeightOp()) - .AddOperation(processDataLoggingOp) - .AddOperation(new Operations.TimerOp(test.TimeFlow2Mass)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); + + if (tankEmptyingInProgress) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Closing_the_tank); + //------------------------------------------------ + + /// + /// Make sure tank emptying completed + /// + switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) + { + case Event.Error: { retVal = Event.Error; goto stopTest; } + case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } + } + + tankEmptyingInProgress = false; + } + + + if (test.TimeFlow2Mass > 0) + { + State.Create("CombinedMeters : Waiting before 1st mass measurement") + .AddOperation(checkUiOp) + .AddOperation(cBrd.UpdateTankWeightOp()) + .AddOperation(new Operations.TimerOp(test.TimeFlow2Mass)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } - LogProcessHeader(processDataLogger, "Start mass"); - //------------------------------------------------ Bridge.OnActivity(this, Strings.Measuring_the_weight); //------------------------------------------------ - State.Create("CombinedMeters : Measuring the start mass") + + LogProcessHeader(processDataLogger, "Start mass"); + + State.Create("CombinedMeters : Measuring the start mass") .AddOperation(checkUiOp) + .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) + .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) + .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) + .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) + .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation((StateMachine.Ambient != null) + ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) .AddOperations(measureOperations) .AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod)) - .EnterState(); + .AddOperation(cBrd.UpdateTankWeightOp()) + .AddOperation(processDataLoggingOp) + .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -220,6 +291,9 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters } while (!e.Contains(Event.BalanceDone)); + LogProcessHeader(processDataLogger, "Measurement"); + + log.WarnFormat("Start mass = {0}kg", StartMass); Mass.Val = StartMass.Val; //------------------------------------------------ @@ -227,7 +301,16 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters //------------------------------------------------ State.Create("CombinedMeters : Starting the test") .AddOperation(checkUiOp) + .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) + .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) + .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) + .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) + .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation((StateMachine.Ambient != null) + ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) .AddOperations(measureOperations) + .AddOperation(cBrd.UpdateTankWeightOp()) + .AddOperation(processDataLoggingOp) .AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro, test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed)) .EnterState(); @@ -241,55 +324,62 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters /// Measurement loop - preparation readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders); - queryEnd1 = cBrd.QueryMeasurementEndOp(); - queryEnd2 = cBrd.QueryMeasurementEndOp(); + int estimtdEndTime = StateMachine.Time + (int)test.TstTime; ClearAllStatistics(); - int estimtdEndTime = StateMachine.Time + (int)test.TstTime; /// Measurement loop - begin - while (true) - { - //-------------------------------- - switch(ReadRegistersTempPressAmbient(measureOperations, true)) - { - case Event.Error: { retVal = Event.Error; goto stopTest; } - case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } - case Event.MeasurementCompleted: goto test_completed; - } + State.Create("Read water meters") + .AddOperation(checkUiOp) + .AddOperations(measureOperations) + .AddOperation(readRegistersOp) + .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) + .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) + .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) + .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) + .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation((StateMachine.Ambient != null) + ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) + : null) + .AddOperation(cBrd.QueryMeasurementEndOp()) + .AddOperation(processDataLoggingOp) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.MeasurementCompleted)) goto test_completed; - int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); - if (remainingTime > 60) - { - Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Test_in_progress, remainingTime / 60, "min", remainingTime % 60, Strings.sec)); - } - else - { - Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); - } + //------------------------------------------------ + int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0); + if (remainingTime > 60) + { + Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Test_in_progress, remainingTime / 60, "min", remainingTime % 60, Strings.sec)); + } + else + { + Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime)); + } + //------------------------------------------------ - UpdateAllStatistics(); + UpdateAllStatistics(); RefFreq.Val = cBrd.ReferenceFreq; RefFlow.Val = cBrd.ReferenceFlow; - /// TODO: Reimplement - //for (int i = 0; i < Config.Data.CompoundWMsCount; i++) - //{ - // data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter - // + data.TestResult.Meters[2 * i + 1].VolumeMeter; - // if (data.Volume.Valid) - // { - // data.TestResult.CombinedMeters[i].VolumeErrorPct = - // Formulas.ErrorFromVolumes(data.TestResult.CombinedMeters[i].VolumeMeter, data.Volume.Val); - // } - //} - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); - } - /// Measurement loop - end + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); + } + while (true); + /// Measurement loop - end test_completed: - State.Create("CombinedMeters : Waiting before mass measurement") + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Measuring_the_weight); + //------------------------------------------------ + State.Create("CombinedMeters : Waiting before the 2nd mass measurement") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) @@ -312,14 +402,22 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters } while (!e.Contains(Event.TimerExpired)); - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Measuring_the_weight); - //------------------------------------------------ + LogProcessHeader(processDataLogger, "End mass"); + State.Create("CombinedMeters : Measuring the end mass") .AddOperation(checkUiOp) + .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) + .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) + .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) + .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) + .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation(readRegistersOp) + .AddOperation((StateMachine.Ambient != null) + ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) .AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod)) .AddOperation(cBrd.UpdateTankWeightOp()) - .EnterState(); + .AddOperation(processDataLoggingOp) + .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -328,6 +426,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters } while (!e.Contains(Event.BalanceDone)); /// + log.WarnFormat("End mass = {0}kg", EndMass); TestEndTime = DateTime.Now; //------------------------------------------------ @@ -464,13 +563,11 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); - if (++repetitionNr <= test.Repeats) { goto loop; } - stopTest: ///----------------------/// diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 9c24829a0..12491bc65 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -33,17 +33,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection IList e = new List(); /// Events from currently running operations Event retVal = Event.Done; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state - - LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h] - - /// Notes: - /// float timeHr = volumeLtr / (1000.0f * targetFlow); - /// float timeSec = 3600.0f * timeHr; - /// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow)); - int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); - processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this); + LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; + int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); + int repetitionNr = 1; /// First test: repetitionNr = 1 //==================================== @@ -55,8 +49,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } } - int flowSetTime0 = StateMachine.Time; - //==================================== loop: /// Start the test, initialize test results @@ -65,126 +57,131 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection TestStartTime = DateTime.Now; TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 }); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.JustStarted)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + int flowSetTime0 = StateMachine.Time; + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Checking_tank_capacity); + //------------------------------------------------ + bool tankEmptyingInProgress = test.Emptying; - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Checking_tank_capacity); - //------------------------------------------------ - bool tankEmptyingInProgress = test.Emptying; - - if (!tankEmptyingInProgress) /// If condition met => skip measuring and force emptying - { - /// - /// Measure the weight and skip emptying if there is enough room in the tank - /// - State.Create("FlyingStartMassCollection : Checking available tank capacity") - .AddOperation(checkUiOp) - .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (!tankEmptyingInProgress) /// If condition met => skip measuring and force emptying + { + /// + /// Measure the weight and skip emptying if there is enough room in the tank + /// + State.Create("FlyingStartMassCollection : Checking available tank capacity") + .AddOperation(checkUiOp) + .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } } - while (!e.Contains(Event.BalanceDone)); + while (!e.Contains(Event.BalanceDone)); - float estimatedEndMass = Mass.Val + test.Volume; - if (estimatedEndMass >= outPath.Balance.Capacity * Constants.TankFullFactor) - { - tankEmptyingInProgress = true; - } - } - /// - if (tankEmptyingInProgress) - { - State.Create("SequenceBase : Opening the emptying valve") - .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.EmptyTankValve, null)) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - } + float estimatedEndMass = Mass.Val + test.Volume; + if (estimatedEndMass >= outPath.Balance.Capacity * Constants.TankFullFactor) + { + tankEmptyingInProgress = true; + } + } + /// + if (tankEmptyingInProgress) + { + State.Create("SequenceBase : Opening the emptying valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.EmptyTankValve, null)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } - if (inPath.Pump != null) - { - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Starting_the_pump); - //------------------------------------------------ - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); - /// - State.Create("FlyingStartMassCollection : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + if (inPath.Pump != null) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + /// + State.Create("FlyingStartMassCollection : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } - if (test.TimePump2StartV > 0) - { - State.Create("FlyingStartMassCollection : Waiting after the pump started") - .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(test.TimePump2StartV)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + if (test.TimePump2StartV > 0) + { + State.Create("FlyingStartMassCollection : Waiting after the pump started") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimePump2StartV)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); - } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } - if (benchPath.StopBFValve != null) - { - State.Create("FlyingStartMassCollection : Opening the stop backflow valve") - .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(benchPath.StopBFValve, null)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - } + if (benchPath.StopBFValve != null) + { + State.Create("FlyingStartMassCollection : Opening the stop backflow valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(benchPath.StopBFValve, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + } + while (!e.Contains(Event.ValvesSet)); + } - if (test.TimeBeforeFlow > 0) - { - State.Create("FlyingStartMassCollection : Waiting before flow setting process starts") - .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(test.TimeBeforeFlow)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + if (test.TimeBeforeFlow > 0) + { + State.Create("FlyingStartMassCollection : Waiting before flow setting process starts") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimeBeforeFlow)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); - } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } setting_flow: @@ -192,62 +189,61 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_flow); //------------------------------------------------ - State.Create("FlyingStartMassCollection : Setting the flow") - .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min. - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + State.Create("FlyingStartMassCollection : Setting the flow") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min. + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; } - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } if (e.Contains(Event.RegulValveTimeOut)) - { - Bridge.OnError(this, Strings.Timeout); - retVal = Event.Done; - goto stopTest; - } - if (e.Contains(Event.Next)) goto flow_set; - } - while (!e.Contains(Event.FlowReached)); + { + Bridge.OnError(this, Strings.Timeout); + retVal = Event.Done; + goto stopTest; + } + if (e.Contains(Event.Next)) goto flow_set; + } + while (!e.Contains(Event.FlowReached)); flow_set: - int flowSetTime = StateMachine.Time - flowSetTime0; - float currentFlow = RefFlow.Val; + int flowSetTime = StateMachine.Time - flowSetTime0; + float currentFlow = RefFlow.Val; - /// Extract cameras from the current sensors path, add operations to the detection state - IList measureOperations = new List(); - for (int i = 0; i < sensPath.RegisterReaders.Length; i++) - { - GenericDevices.ICameraRoi cameraRoi = sensPath.RegisterReaders[i] as GenericDevices.ICameraRoi; - if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); - } + /// Extract cameras from the current sensors path, add operations to the detection state + IList measureOperations = new List(); + for (int i = 0; i < sensPath.RegisterReaders.Length; i++) + { + GenericDevices.ICameraRoi cameraRoi = sensPath.RegisterReaders[i] as GenericDevices.ICameraRoi; + if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); + } - if (tankEmptyingInProgress) - { - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Closing_the_tank); - //------------------------------------------------ + if (tankEmptyingInProgress) + { + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Closing_the_tank); + //------------------------------------------------ - /// - /// Make sure tank emptying completed - /// - switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) - { - case Event.Error: { retVal = Event.Error; goto stopTest; } - case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } - } - - tankEmptyingInProgress = false; - } + /// + /// Make sure tank emptying completed + /// + switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) + { + case Event.Error: { retVal = Event.Error; goto stopTest; } + case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } + } + tankEmptyingInProgress = false; + } if (test.TimeFlow2Mass > 0) { @@ -258,7 +254,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection .EnterState(); do{ e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } } while (!e.Contains(Event.TimerExpired)); @@ -333,7 +329,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// Measurement loop - preparation readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders); - queryEnd1 = cBrd.QueryMeasurementEndOp(); int estimtdEndTime = StateMachine.Time + (int)test.TstTime; ClearAllStatistics(); @@ -353,7 +348,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection .AddOperation((StateMachine.Ambient != null) ? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null) - .AddOperation(queryEnd1) + .AddOperation(cBrd.QueryMeasurementEndOp()) .AddOperation(processDataLoggingOp) .EnterState(); do @@ -389,7 +384,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection //------------------------------------------------ Bridge.OnActivity(this, Strings.Measuring_the_weight); //------------------------------------------------ - State.Create("FlyingStartMassCollection : Waiting before 2nd mass measurement") + State.Create("FlyingStartMassCollection : Waiting before the 2nd mass measurement") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) @@ -407,14 +402,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection do { e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } } while (!e.Contains(Event.TimerExpired)); LogProcessHeader(processDataLogger, "End mass"); - State.Create("FlyingStartMassCollection : Measuring the end mass") + State.Create("FlyingStartMassCollection : Measuring the end mass") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) @@ -507,59 +502,122 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; - Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single); - GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i]; - WaterMeters.iPerl.WaterMeter iPerl = regReader as WaterMeters.iPerl.WaterMeter; + if (BatchRslts.Batch.Compound) + { + /// + /// Compound meters + /// + Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain); + Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux); - if (meterRslt != null && regReader != null) - { - meterRslt.PulsesPerLiter = regReader.PulsesPerLtr; - meterRslt.PulsesMeter = Convert.ToDouble(regReader.WMPulses); - meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); + for (int isAux = 0; isAux <= 1; isAux++) /// 0=main, 1=aux + { + GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[2 * i + isAux]; + Results.Entities.MeterTestRslt meterRslt = (isAux == 0) ? mainMeterRslt : auxMeterRslt; - if (iPerl != null) - { - meterRslt.TimestampStart = iPerl.TimestampSecStart; - meterRslt.TimestampEnd = iPerl.NoSamples ? (iPerl.TimestampSecStart + tstRslt.TestTime) : iPerl.TimestampSecEnd; - meterRslt.TestTime = iPerl.NoSamples ? tstRslt.TestTime : (meterRslt.TimestampEnd - meterRslt.TimestampStart); - meterRslt.VolumeStart = iPerl.VolumeLtrStart; /// liter - meterRslt.VolumeEnd = iPerl.VolumeLtrEnd; /// liter - meterRslt.VolumeMeter = Math.Abs(iPerl.VolumeLtrEnd - iPerl.VolumeLtrStart); - meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime / tstRslt.TestTime; - iPerl.VolumeLtrRef = meterRslt.VolumeRef; + if (meterRslt != null && regReader != null) + { + meterRslt.PulsesPerLiter = regReader.PulsesPerLtr; + + /// Optionally supress pulses from the large water meter + meterRslt.PulsesMeter = Convert.ToDouble(regReader.WMPulses); + meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); + + meterRslt.TestTime = tstRslt.TestTime; + meterRslt.VolumeStart = 0; + meterRslt.VolumeEnd = 0; + meterRslt.VolumeRef = tstRslt.VolumeCTV; + meterRslt.VolumeMeter = meterRslt.PulsesMeter * regReader.LtrsPerPulse; /// liter + + if (meterRslt.PulsesMaster != 0) + { + meterRslt.VolumeMeter *= (tstRslt.PulsesMaster / meterRslt.PulsesMaster); + } + + meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, tstRslt.VolumeCTV); /// Main/Aux meter error is not usedfor evaluation + } + } + + Results.Entities.MeterTestRslt compoundMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Compound); + + if (compoundMeterRslt != null && mainMeterRslt != null && auxMeterRslt != null) + { + compoundMeterRslt.VolumeRef = tstRslt.VolumeCTV; + compoundMeterRslt.VolumeMeter = mainMeterRslt.VolumeMeter + auxMeterRslt.VolumeMeter; + compoundMeterRslt.PulsesMaster = tstRslt.PulsesMaster; + compoundMeterRslt.TestTime = tstRslt.TestTime; + compoundMeterRslt.Error = Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef); + compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.ErrLimLo + test.Uncertainty) + && (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty); + mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed; + mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; + } + } +#if HEAT_METERS_SUPPORT + else if (BatchRslts.Batch.HeatMeter) + { + /// + /// Heat meters + /// + } +#endif + else + { + /// MetersKind.Single meters + Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single); + GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i]; + WaterMeters.iPerl.WaterMeter iPerl = regReader as WaterMeters.iPerl.WaterMeter; + + if (meterRslt != null && regReader != null) + { + meterRslt.PulsesPerLiter = regReader.PulsesPerLtr; + meterRslt.PulsesMeter = Convert.ToDouble(regReader.WMPulses); + meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); + + if (iPerl != null) + { + meterRslt.TimestampStart = iPerl.TimestampSecStart; + meterRslt.TimestampEnd = iPerl.NoSamples ? (iPerl.TimestampSecStart + tstRslt.TestTime) : iPerl.TimestampSecEnd; + meterRslt.TestTime = iPerl.NoSamples ? tstRslt.TestTime : (meterRslt.TimestampEnd - meterRslt.TimestampStart); + meterRslt.VolumeStart = iPerl.VolumeLtrStart; /// liter + meterRslt.VolumeEnd = iPerl.VolumeLtrEnd; /// liter + meterRslt.VolumeMeter = Math.Abs(iPerl.VolumeLtrEnd - iPerl.VolumeLtrStart); + meterRslt.VolumeRef = tstRslt.VolumeCTV * meterRslt.TestTime / tstRslt.TestTime; + iPerl.VolumeLtrRef = meterRslt.VolumeRef; #if IPERLST || IPERLST_SPECIAL meterRslt.WaterMeter.CalibFactor = (iPerl.CalibrationStruct != null) ? iPerl.CalibrationStruct.Calibration : 0; meterRslt.WaterMeter.Q2Correction = iPerl.Q2CorrectionFactor; #endif - iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result - iPerl.LastTestResult = meterRslt; /// Save this test result - iPerl.NominalTestFlow = 500.0 * (test.Qfrom + test.Qto); /// Ave. + convert to liter/hour - } - else - { - meterRslt.TestTime = tstRslt.TestTime; /// TODO: Malo by sa citat z dosky - meterRslt.VolumeStart = 0; /// liter - meterRslt.VolumeEnd = 0; /// liter - meterRslt.VolumeMeter = meterRslt.PulsesMeter * regReader.LtrsPerPulse; /// liter - meterRslt.VolumeRef = meterRslt.PulsesMaster * tstRslt.ConstMaster; /// liter - } + iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result + iPerl.LastTestResult = meterRslt; /// Save this test result + iPerl.NominalTestFlow = 500.0 * (test.Qfrom + test.Qto); /// Ave. + convert to liter/hour + } + else + { + meterRslt.TestTime = tstRslt.TestTime; /// TODO: Malo by sa citat z dosky + meterRslt.VolumeStart = 0; /// liter + meterRslt.VolumeEnd = 0; /// liter + meterRslt.VolumeMeter = meterRslt.PulsesMeter * regReader.LtrsPerPulse; /// liter + meterRslt.VolumeRef = meterRslt.PulsesMaster * tstRslt.ConstMaster; /// liter + } - meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); - meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) - && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); - meterRslt.TestDone = true; - } - } + meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); + meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) + && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); + meterRslt.TestDone = true; + } + } - tstRslt.Components = Results.Entities.Components - .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, - (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", - inPath.Pump != null ? inPath.Pump.Name : string.Empty, - outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, - outPath.Balance != null ? outPath.Balance.Name : string.Empty, - outPath.RegulValve != null ? outPath.RegulValve.Name : string.Empty, - outPath.Diverter != null ? outPath.Diverter.Name : string.Empty)); + tstRslt.Components = Results.Entities.Components + .UpdateList(BatchRslts.ComponentsList, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", + inPath.Pump != null ? inPath.Pump.Name : string.Empty, + outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, + outPath.Balance != null ? outPath.Balance.Name : string.Empty, + outPath.RegulValve != null ? outPath.RegulValve.Name : string.Empty, + outPath.Diverter != null ? outPath.Diverter.Name : string.Empty)); + } /// Update results Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, tstRslt)); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs index 6607ee32c..4bee21b11 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs @@ -17,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection public bool Evaluate(Test test) { return true; } public bool Publish(Test test) { return true; } - public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; } + public bool CanTest(MetersKind meters) { return true; } public TestMethod() { diff --git a/TestBenchFramework/Forms/ResultsConfig.cs b/TestBenchFramework/Forms/ResultsConfig.cs index 3cdd84434..2d07e085b 100644 --- a/TestBenchFramework/Forms/ResultsConfig.cs +++ b/TestBenchFramework/Forms/ResultsConfig.cs @@ -57,7 +57,7 @@ namespace TBF.Forms nrMetersLabel.Text = Strings.Nr_meters_in_a_group; groupBox1.Text = Strings.Water_Meter; singleRadioButton.Text = Strings.SingleBtnText; - combinedRadioButton.Text = Strings.CombinedBtnText; + combinedRadioButton.Text = Strings.Compound; groupBox2.Text = Strings.Device; screenRadioButton.Text = Strings.ScreenBtnText; printerRadioButton.Text = Strings.PrinterBtnText; diff --git a/TestBenchFramework/LocalSettings.cs b/TestBenchFramework/LocalSettings.cs index 7b00760f6..5588975f1 100644 --- a/TestBenchFramework/LocalSettings.cs +++ b/TestBenchFramework/LocalSettings.cs @@ -106,6 +106,11 @@ namespace TBF [XmlIgnore] public int MetersColumnCount { get { return (MetersColumnWidths != null) ? MetersColumnWidths.Length : 0; } } + [XmlArrayAttribute("HeatMetersColumnWidths")] + public int[] HeatMetersColumnWidths; + [XmlIgnore] + public int HeatMetersColumnCount { get { return (HeatMetersColumnWidths != null) ? HeatMetersColumnWidths.Length : 0; } } + /// Transitions public int TransitionsDlgLeft; public int TransitionsDlgTop; diff --git a/TestBenchFramework/MainWnd.cs b/TestBenchFramework/MainWnd.cs index cd0d15878..9eb03eece 100644 --- a/TestBenchFramework/MainWnd.cs +++ b/TestBenchFramework/MainWnd.cs @@ -563,7 +563,6 @@ namespace TBF return; } - if ((testResults != null) && (testResults.Count != 0) && (testResults[0].MetersKind == MetersKind.Single)) { PrintOrderDocument doc = new PrintOrderDocument(procedure[0], testResults, tester); diff --git a/TestBenchFramework/PathsDlg.Designer.cs b/TestBenchFramework/PathsDlg.Designer.cs index 9fdc28050..e78a271ab 100644 --- a/TestBenchFramework/PathsDlg.Designer.cs +++ b/TestBenchFramework/PathsDlg.Designer.cs @@ -31,150 +31,148 @@ namespace TBF /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PathsDlg)); - this.splitContainer = new System.Windows.Forms.SplitContainer(); - this.pathsTabControl = new System.Windows.Forms.TabControl(); - this.feedingTabPage = new System.Windows.Forms.TabPage(); - this.pathsFeedingCtrl = new TBF.UiControls.PathsFeedingCtrl(); - this.benchTabPage = new System.Windows.Forms.TabPage(); - this.pathsBenchCtrl = new TBF.UiControls.PathsBenchCtrl(); - this.outputTabPage = new System.Windows.Forms.TabPage(); - this.pathsOutputCtrl = new TBF.UiControls.PathsOutputCtrl(); - this.metersTabPage = new System.Windows.Forms.TabPage(); - this.pathsMetersCtrl = new TBF.UiControls.PathsMetersCtrl(); - this.sharedButtons = new TBF.UiControls.SharedButtons(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); - this.splitContainer.Panel1.SuspendLayout(); - this.splitContainer.Panel2.SuspendLayout(); - this.splitContainer.SuspendLayout(); - this.pathsTabControl.SuspendLayout(); - this.feedingTabPage.SuspendLayout(); - this.benchTabPage.SuspendLayout(); - this.outputTabPage.SuspendLayout(); - this.metersTabPage.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer - // - resources.ApplyResources(this.splitContainer, "splitContainer"); - this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer.Name = "splitContainer"; - // - // splitContainer.Panel1 - // - resources.ApplyResources(this.splitContainer.Panel1, "splitContainer.Panel1"); - this.splitContainer.Panel1.Controls.Add(this.pathsTabControl); - // - // splitContainer.Panel2 - // - resources.ApplyResources(this.splitContainer.Panel2, "splitContainer.Panel2"); - this.splitContainer.Panel2.Controls.Add(this.sharedButtons); - // - // pathsTabControl - // - resources.ApplyResources(this.pathsTabControl, "pathsTabControl"); - this.pathsTabControl.Controls.Add(this.feedingTabPage); - this.pathsTabControl.Controls.Add(this.benchTabPage); - this.pathsTabControl.Controls.Add(this.outputTabPage); - this.pathsTabControl.Controls.Add(this.metersTabPage); - this.pathsTabControl.Name = "pathsTabControl"; - this.pathsTabControl.SelectedIndex = 0; - this.pathsTabControl.SelectedIndexChanged += new System.EventHandler(this.pathsTabControl_SelectedIndexChanged); - // - // feedingTabPage - // - resources.ApplyResources(this.feedingTabPage, "feedingTabPage"); - this.feedingTabPage.Controls.Add(this.pathsFeedingCtrl); - this.feedingTabPage.Name = "feedingTabPage"; - this.feedingTabPage.UseVisualStyleBackColor = true; - // - // pathsFeedingCtrl - // - resources.ApplyResources(this.pathsFeedingCtrl, "pathsFeedingCtrl"); - this.pathsFeedingCtrl.DoubleClickActivation = false; - this.pathsFeedingCtrl.FullRowSelect = true; - this.pathsFeedingCtrl.GridLines = true; - this.pathsFeedingCtrl.Name = "pathsFeedingCtrl"; - this.pathsFeedingCtrl.UseCompatibleStateImageBehavior = false; - this.pathsFeedingCtrl.View = System.Windows.Forms.View.Details; - this.pathsFeedingCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); - // - // benchTabPage - // - resources.ApplyResources(this.benchTabPage, "benchTabPage"); - this.benchTabPage.Controls.Add(this.pathsBenchCtrl); - this.benchTabPage.Name = "benchTabPage"; - this.benchTabPage.UseVisualStyleBackColor = true; - // - // pathsBenchCtrl - // - resources.ApplyResources(this.pathsBenchCtrl, "pathsBenchCtrl"); - this.pathsBenchCtrl.DoubleClickActivation = false; - this.pathsBenchCtrl.FullRowSelect = true; - this.pathsBenchCtrl.GridLines = true; - this.pathsBenchCtrl.Name = "pathsBenchCtrl"; - this.pathsBenchCtrl.UseCompatibleStateImageBehavior = false; - this.pathsBenchCtrl.View = System.Windows.Forms.View.Details; - this.pathsBenchCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); - // - // outputTabPage - // - resources.ApplyResources(this.outputTabPage, "outputTabPage"); - this.outputTabPage.Controls.Add(this.pathsOutputCtrl); - this.outputTabPage.Name = "outputTabPage"; - this.outputTabPage.UseVisualStyleBackColor = true; - // - // pathsOutputCtrl - // - resources.ApplyResources(this.pathsOutputCtrl, "pathsOutputCtrl"); - this.pathsOutputCtrl.DoubleClickActivation = false; - this.pathsOutputCtrl.FullRowSelect = true; - this.pathsOutputCtrl.GridLines = true; - this.pathsOutputCtrl.Name = "pathsOutputCtrl"; - this.pathsOutputCtrl.UseCompatibleStateImageBehavior = false; - this.pathsOutputCtrl.View = System.Windows.Forms.View.Details; - this.pathsOutputCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); - // - // metersTabPage - // - resources.ApplyResources(this.metersTabPage, "metersTabPage"); - this.metersTabPage.Controls.Add(this.pathsMetersCtrl); - this.metersTabPage.Name = "metersTabPage"; - this.metersTabPage.UseVisualStyleBackColor = true; - // - // pathsMetersCtrl - // - resources.ApplyResources(this.pathsMetersCtrl, "pathsMetersCtrl"); - this.pathsMetersCtrl.DoubleClickActivation = false; - this.pathsMetersCtrl.FullRowSelect = true; - this.pathsMetersCtrl.GridLines = true; - this.pathsMetersCtrl.Name = "pathsMetersCtrl"; - this.pathsMetersCtrl.UseCompatibleStateImageBehavior = false; - this.pathsMetersCtrl.View = System.Windows.Forms.View.Details; - this.pathsMetersCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); - // - // sharedButtons - // - resources.ApplyResources(this.sharedButtons, "sharedButtons"); - this.sharedButtons.Name = "sharedButtons"; - // - // PathsDlg - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.splitContainer); - this.Name = "PathsDlg"; - this.Load += new System.EventHandler(this.PathsDlg_Load); - this.splitContainer.Panel1.ResumeLayout(false); - this.splitContainer.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); - this.splitContainer.ResumeLayout(false); - this.pathsTabControl.ResumeLayout(false); - this.feedingTabPage.ResumeLayout(false); - this.benchTabPage.ResumeLayout(false); - this.outputTabPage.ResumeLayout(false); - this.metersTabPage.ResumeLayout(false); - this.ResumeLayout(false); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PathsDlg)); + this.splitContainer = new System.Windows.Forms.SplitContainer(); + this.pathsTabControl = new System.Windows.Forms.TabControl(); + this.feedingTabPage = new System.Windows.Forms.TabPage(); + this.pathsFeedingCtrl = new TBF.UiControls.PathsFeedingCtrl(); + this.benchTabPage = new System.Windows.Forms.TabPage(); + this.pathsBenchCtrl = new TBF.UiControls.PathsBenchCtrl(); + this.outputTabPage = new System.Windows.Forms.TabPage(); + this.pathsOutputCtrl = new TBF.UiControls.PathsOutputCtrl(); + this.metersTabPage = new System.Windows.Forms.TabPage(); + this.pathsMetersCtrl = new TBF.UiControls.PathsMetersCtrl(); + this.sharedButtons = new TBF.UiControls.SharedButtons(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); + this.splitContainer.Panel1.SuspendLayout(); + this.splitContainer.Panel2.SuspendLayout(); + this.splitContainer.SuspendLayout(); + this.pathsTabControl.SuspendLayout(); + this.feedingTabPage.SuspendLayout(); + this.benchTabPage.SuspendLayout(); + this.outputTabPage.SuspendLayout(); + this.metersTabPage.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer + // + resources.ApplyResources(this.splitContainer, "splitContainer"); + this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer.Name = "splitContainer"; + // + // splitContainer.Panel1 + // + this.splitContainer.Panel1.Controls.Add(this.pathsTabControl); + // + // splitContainer.Panel2 + // + this.splitContainer.Panel2.Controls.Add(this.sharedButtons); + // + // pathsTabControl + // + this.pathsTabControl.Controls.Add(this.feedingTabPage); + this.pathsTabControl.Controls.Add(this.benchTabPage); + this.pathsTabControl.Controls.Add(this.outputTabPage); + this.pathsTabControl.Controls.Add(this.metersTabPage); + resources.ApplyResources(this.pathsTabControl, "pathsTabControl"); + this.pathsTabControl.Name = "pathsTabControl"; + this.pathsTabControl.SelectedIndex = 0; + this.pathsTabControl.SelectedIndexChanged += new System.EventHandler(this.pathsTabControl_SelectedIndexChanged); + // + // feedingTabPage + // + this.feedingTabPage.Controls.Add(this.pathsFeedingCtrl); + resources.ApplyResources(this.feedingTabPage, "feedingTabPage"); + this.feedingTabPage.Name = "feedingTabPage"; + this.feedingTabPage.UseVisualStyleBackColor = true; + // + // pathsFeedingCtrl + // + resources.ApplyResources(this.pathsFeedingCtrl, "pathsFeedingCtrl"); + this.pathsFeedingCtrl.DoubleClickActivation = false; + this.pathsFeedingCtrl.FullRowSelect = true; + this.pathsFeedingCtrl.GridLines = true; + this.pathsFeedingCtrl.Name = "pathsFeedingCtrl"; + this.pathsFeedingCtrl.UseCompatibleStateImageBehavior = false; + this.pathsFeedingCtrl.View = System.Windows.Forms.View.Details; + this.pathsFeedingCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); + // + // benchTabPage + // + this.benchTabPage.Controls.Add(this.pathsBenchCtrl); + resources.ApplyResources(this.benchTabPage, "benchTabPage"); + this.benchTabPage.Name = "benchTabPage"; + this.benchTabPage.UseVisualStyleBackColor = true; + // + // pathsBenchCtrl + // + resources.ApplyResources(this.pathsBenchCtrl, "pathsBenchCtrl"); + this.pathsBenchCtrl.DoubleClickActivation = false; + this.pathsBenchCtrl.FullRowSelect = true; + this.pathsBenchCtrl.GridLines = true; + this.pathsBenchCtrl.Name = "pathsBenchCtrl"; + this.pathsBenchCtrl.UseCompatibleStateImageBehavior = false; + this.pathsBenchCtrl.View = System.Windows.Forms.View.Details; + this.pathsBenchCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); + // + // outputTabPage + // + this.outputTabPage.Controls.Add(this.pathsOutputCtrl); + resources.ApplyResources(this.outputTabPage, "outputTabPage"); + this.outputTabPage.Name = "outputTabPage"; + this.outputTabPage.UseVisualStyleBackColor = true; + // + // pathsOutputCtrl + // + resources.ApplyResources(this.pathsOutputCtrl, "pathsOutputCtrl"); + this.pathsOutputCtrl.DoubleClickActivation = false; + this.pathsOutputCtrl.FullRowSelect = true; + this.pathsOutputCtrl.GridLines = true; + this.pathsOutputCtrl.Name = "pathsOutputCtrl"; + this.pathsOutputCtrl.UseCompatibleStateImageBehavior = false; + this.pathsOutputCtrl.View = System.Windows.Forms.View.Details; + this.pathsOutputCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); + // + // metersTabPage + // + this.metersTabPage.Controls.Add(this.pathsMetersCtrl); + resources.ApplyResources(this.metersTabPage, "metersTabPage"); + this.metersTabPage.Name = "metersTabPage"; + this.metersTabPage.UseVisualStyleBackColor = true; + // + // pathsMetersCtrl + // + resources.ApplyResources(this.pathsMetersCtrl, "pathsMetersCtrl"); + this.pathsMetersCtrl.DoubleClickActivation = false; + this.pathsMetersCtrl.FullRowSelect = true; + this.pathsMetersCtrl.GridLines = true; + this.pathsMetersCtrl.Name = "pathsMetersCtrl"; + this.pathsMetersCtrl.UseCompatibleStateImageBehavior = false; + this.pathsMetersCtrl.View = System.Windows.Forms.View.Details; + this.pathsMetersCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); + // + // sharedButtons + // + resources.ApplyResources(this.sharedButtons, "sharedButtons"); + this.sharedButtons.Name = "sharedButtons"; + // + // PathsDlg + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainer); + this.Name = "PathsDlg"; + this.Load += new System.EventHandler(this.PathsDlg_Load); + this.splitContainer.Panel1.ResumeLayout(false); + this.splitContainer.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); + this.splitContainer.ResumeLayout(false); + this.pathsTabControl.ResumeLayout(false); + this.feedingTabPage.ResumeLayout(false); + this.benchTabPage.ResumeLayout(false); + this.outputTabPage.ResumeLayout(false); + this.metersTabPage.ResumeLayout(false); + this.ResumeLayout(false); } @@ -186,10 +184,10 @@ namespace TBF private System.Windows.Forms.TabPage benchTabPage; private System.Windows.Forms.TabPage outputTabPage; private System.Windows.Forms.TabPage metersTabPage; - private UiControls.SharedButtons sharedButtons; + private UiControls.SharedButtons sharedButtons; private UiControls.PathsFeedingCtrl pathsFeedingCtrl; private UiControls.PathsBenchCtrl pathsBenchCtrl; private UiControls.PathsOutputCtrl pathsOutputCtrl; private UiControls.PathsMetersCtrl pathsMetersCtrl; - } + } } \ No newline at end of file diff --git a/TestBenchFramework/PathsDlg.cs b/TestBenchFramework/PathsDlg.cs index 8bd60b6d9..2f7251e5a 100644 --- a/TestBenchFramework/PathsDlg.cs +++ b/TestBenchFramework/PathsDlg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -22,7 +22,8 @@ namespace TBF Feeding, Bench, Output, - Meters, + WaterMeters, + HeatMeters, } /// Used when re-scaling the dialog: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi @@ -33,6 +34,11 @@ namespace TBF public IList Valves; public ISession Session; /// One common DB session passed also to the controls inside tab pages +#if HEAT_METERS_SUPPORT + private System.Windows.Forms.TabPage heatMetersTabPage; + private UiControls.PathsHeatMetersCtrl pathsHeatMetersCtrl; +#endif + public PathsDlg() { /// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi. @@ -64,14 +70,49 @@ namespace TBF pathsTabControl.TabPages[(int)PathsDlgTabs.Feeding].Tag = pathsFeedingCtrl; pathsTabControl.TabPages[(int)PathsDlgTabs.Bench].Tag = pathsBenchCtrl; pathsTabControl.TabPages[(int)PathsDlgTabs.Output].Tag = pathsOutputCtrl; - pathsTabControl.TabPages[(int)PathsDlgTabs.Meters].Tag = pathsMetersCtrl; + pathsTabControl.TabPages[(int)PathsDlgTabs.WaterMeters].Tag = pathsMetersCtrl; - // Requires 'Session' to be created + // Requires 'Session' to be created pathsFeedingCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.Feeding]); pathsBenchCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.Bench]); pathsOutputCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.Output]); - pathsMetersCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.Meters]); - } + pathsMetersCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.WaterMeters]); + +#if HEAT_METERS_SUPPORT + this.heatMetersTabPage = new System.Windows.Forms.TabPage(); + this.pathsHeatMetersCtrl = new TBF.UiControls.PathsHeatMetersCtrl(); + + this.heatMetersTabPage.SuspendLayout(); + this.SuspendLayout(); + + this.pathsTabControl.Controls.Add(this.heatMetersTabPage); + // + // heatMetersTabPage + // + this.heatMetersTabPage.Controls.Add(this.pathsHeatMetersCtrl); + this.heatMetersTabPage.Name = "heatMetersTabPage"; + this.heatMetersTabPage.UseVisualStyleBackColor = true; + // + // pathsHeatMetersCtrl + // + this.pathsHeatMetersCtrl.DoubleClickActivation = false; + this.pathsHeatMetersCtrl.FullRowSelect = true; + this.pathsHeatMetersCtrl.GridLines = true; + this.pathsHeatMetersCtrl.Name = "pathsHeatMetersCtrl"; + this.pathsHeatMetersCtrl.UseCompatibleStateImageBehavior = false; + this.pathsHeatMetersCtrl.View = System.Windows.Forms.View.Details; + this.pathsHeatMetersCtrl.SelectedIndexChanged += new System.EventHandler(this.SelectedIndexChanged); + + this.heatMetersTabPage.ResumeLayout(false); + this.ResumeLayout(false); + + pathsTabControl.TabPages[(int)PathsDlgTabs.HeatMeters].Text = Strings.Heat_meter_sensors; /// Localization + pathsTabControl.TabPages[(int)PathsDlgTabs.HeatMeters].Tag = pathsHeatMetersCtrl; + + // Requires 'Session' to be created + pathsHeatMetersCtrl.Initialize(this, pathsTabControl.TabPages[(int)PathsDlgTabs.HeatMeters]); +#endif + } private void PathsDlg_Load(object sender, EventArgs e) { @@ -89,8 +130,8 @@ namespace TBF pathsTabControl.TabPages[(int)PathsDlgTabs.Feeding].Text = Strings.FeedingTabPageTitle; pathsTabControl.TabPages[(int)PathsDlgTabs.Bench].Text = Strings.BenchTabPageTitle; pathsTabControl.TabPages[(int)PathsDlgTabs.Output].Text = Strings.OutputTabPageTitle; - pathsTabControl.TabPages[(int)PathsDlgTabs.Meters].Text = Strings.MetersTabPageTitle; - } + pathsTabControl.TabPages[(int)PathsDlgTabs.WaterMeters].Text = Strings.MetersTabPageTitle; + } private void Unlocked(object sender, EventArgs e) { diff --git a/TestBenchFramework/PathsDlg.resx b/TestBenchFramework/PathsDlg.resx index 101a526ee..5aaef6997 100644 --- a/TestBenchFramework/PathsDlg.resx +++ b/TestBenchFramework/PathsDlg.resx @@ -117,331 +117,379 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 831, 277 - - - $this - - - splitContainer.Panel1 + + + Fill - + + True + + + + 0, 0 + + + Fill + + + 3, 3 + + + 825, 271 + + 0 - - pathsTabControl + + pathsFeedingCtrl + + + TBF.UiControls.PathsFeedingCtrl, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null + + + feedingTabPage + + + 0 + + + 4, 34 + + + 3, 3, 3, 3 + + + 831, 277 + + + 0 + + + Feeding + + + feedingTabPage System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 - - - outputTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + pathsTabControl - + + 0 + + + Fill + + 3, 3 825, 271 - - 825, 271 + + 0 + + + pathsBenchCtrl + + + TBF.UiControls.PathsBenchCtrl, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null benchTabPage - - TBF.UiControls.PathsBenchCtrl, TBF, Version=2.3.244.1, Culture=neutral, PublicKeyToken=null + + 0 - - + + 4, 34 + + + 3, 3, 3, 3 + + + 831, 277 + + + 1 + + + Bench + + + benchTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pathsTabControl + + + 1 + + Fill + + 3, 3 + + + 825, 271 + + + 0 + + + pathsOutputCtrl + + + TBF.UiControls.PathsOutputCtrl, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null + + + outputTabPage + + + 0 + + + 4, 34 + + + 3, 3, 3, 3 + + + 831, 277 + + + 2 + + + Output + + + outputTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pathsTabControl + + + 2 + + + Fill + + + 0, 0 + + + 831, 277 + + + 0 + + + pathsMetersCtrl + + + TBF.UiControls.PathsMetersCtrl, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null + + + metersTabPage + + + 0 + + + 4, 34 + + + 831, 277 + + + 3 + Sensors + + metersTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pathsTabControl + + + 3 + + + Fill + + + 0, 0 + + + 831, 277 + + + 0 + + + pathsHeatMetersCtrl + + + TBF.UiControls.PathsHeatMetersCtrl, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null + + + heatMetersTabPage + + + 0 + + + 4, 34 + + + 831, 277 + + + 4 + + + Heat meter sensors + + + heatMetersTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pathsTabControl + + + 4 + + + Fill + + + 42, 30 + + + 0, 0 + + + 839, 315 + + + 0 + + + pathsTabControl + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer.Panel1 + + + 0 + + + splitContainer.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer + + + 0 + + + -2, 0 + + + 100, 521 + + + 0 + + + sharedButtons + + + TBF.UiControls.SharedButtons, TBF, Version=2.8.315.1, Culture=neutral, PublicKeyToken=null + + + splitContainer.Panel2 + + + 0 + + + splitContainer.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + splitContainer 1 - - feedingTabPage - - - 3, 3, 3, 3 - - - 0 - - - 6, 13 - - - pathsTabControl - - - 0 - - - 4, 34 - - - outputTabPage - - - pathsOutputCtrl - - - CenterParent - - - TBF.UiControls.PathsFeedingCtrl, TBF, Version=2.3.244.1, Culture=neutral, PublicKeyToken=null - - - pathsTabControl - - - TBF.UiControls.PathsMetersCtrl, TBF, Version=2.3.244.1, Culture=neutral, PublicKeyToken=null - - - Bench - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - metersTabPage - - - Fill - - - 0, 0 - - - pathsFeedingCtrl - - - 831, 277 - - - 0, 0 - - - 2 - - - 0 - - - splitContainer.Panel2 - - - pathsMetersCtrl + + 941, 315 839 - - True - - - 3, 3 - - - sharedButtons - - - -2, 0 - - - 2 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 839, 315 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3, 3, 3, 3 - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 42, 30 - - - 0, 0 - - - 3, 3, 3, 3 - - - 0 - - - TBF.UiControls.SharedButtons, TBF, Version=2.3.244.1, Culture=neutral, PublicKeyToken=null - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - metersTabPage - - - PathsDlg - - - 831, 277 - - - 4, 34 - - - 0 - - - 3 - - - splitContainer.Panel1 - - - 0 - - - 0 - - - Fill - - - 0 - - - Output - - - benchTabPage - - - Feeding - - - 0 - - - 0 - - - 1 - - - TBF.UiControls.PathsOutputCtrl, TBF, Version=2.3.244.1, Culture=neutral, PublicKeyToken=null - - - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 831, 277 - - - 0 - - - feedingTabPage - - - 825, 271 - - - splitContainer.Panel2 - - - pathsTabControl - 0 - - 1 - - - Fill - - - 100, 521 - splitContainer - - 941, 315 + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Fill + + $this - - 4, 34 - - - pathsBenchCtrl - - - Bench - Paths - - + 0 - - 941, 315 - - - 3, 3 - - - 831, 277 - - - 0 - - - 0 - - - 4, 34 - - - splitContainer - - - Fill - True + + 6, 13 + + + 941, 315 + + + CenterParent + + + Bench - Paths + + + PathsDlg + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.Designer.cs b/TestBenchFramework/ProcedureDlg.Designer.cs index 274d40c64..a1380b449 100644 --- a/TestBenchFramework/ProcedureDlg.Designer.cs +++ b/TestBenchFramework/ProcedureDlg.Designer.cs @@ -80,6 +80,7 @@ namespace TBF this.parametersTabPage = new System.Windows.Forms.TabPage(); this.parametersListViewEx = new TBF.UiControls.ListViewEx(); this.sharedButtons = new TBF.UiControls.SharedButtons(); + this.metersKindRadioButton3 = new System.Windows.Forms.RadioButton(); ((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit(); this.mainSplitContainer.Panel1.SuspendLayout(); this.mainSplitContainer.Panel2.SuspendLayout(); @@ -101,30 +102,28 @@ namespace TBF // // mainSplitContainer.Panel1 // - resources.ApplyResources(this.mainSplitContainer.Panel1, "mainSplitContainer.Panel1"); this.mainSplitContainer.Panel1.Controls.Add(this.tabControl); // // mainSplitContainer.Panel2 // - resources.ApplyResources(this.mainSplitContainer.Panel2, "mainSplitContainer.Panel2"); this.mainSplitContainer.Panel2.Controls.Add(this.sharedButtons); // // tabControl // - resources.ApplyResources(this.tabControl, "tabControl"); this.tabControl.Controls.Add(this.generalTabPage); this.tabControl.Controls.Add(this.historyTabPage); this.tabControl.Controls.Add(this.metrology1TabPage); this.tabControl.Controls.Add(this.metrology2TabPage); this.tabControl.Controls.Add(this.processTabPage); this.tabControl.Controls.Add(this.parametersTabPage); + resources.ApplyResources(this.tabControl, "tabControl"); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); // // generalTabPage // - resources.ApplyResources(this.generalTabPage, "generalTabPage"); + this.generalTabPage.Controls.Add(this.metersKindRadioButton3); this.generalTabPage.Controls.Add(this.fileWriter4ComboBox); this.generalTabPage.Controls.Add(this.fileWriter3ComboBox); this.generalTabPage.Controls.Add(this.printer2ComboBox); @@ -159,33 +158,32 @@ namespace TBF this.generalTabPage.Controls.Add(this.label12); this.generalTabPage.Controls.Add(this.procNameTextBox); this.generalTabPage.Controls.Add(this.label1); - this.generalTabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.generalTabPage, "generalTabPage"); this.generalTabPage.Name = "generalTabPage"; - this.generalTabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.generalTabPage.UseVisualStyleBackColor = true; // // fileWriter4ComboBox // - resources.ApplyResources(this.fileWriter4ComboBox, "fileWriter4ComboBox"); this.fileWriter4ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.fileWriter4ComboBox, "fileWriter4ComboBox"); this.fileWriter4ComboBox.Name = "fileWriter4ComboBox"; // // fileWriter3ComboBox // - resources.ApplyResources(this.fileWriter3ComboBox, "fileWriter3ComboBox"); this.fileWriter3ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.fileWriter3ComboBox, "fileWriter3ComboBox"); this.fileWriter3ComboBox.Name = "fileWriter3ComboBox"; // // printer2ComboBox // - resources.ApplyResources(this.printer2ComboBox, "printer2ComboBox"); this.printer2ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.printer2ComboBox, "printer2ComboBox"); this.printer2ComboBox.Name = "printer2ComboBox"; // // fileWriter2ComboBox // - resources.ApplyResources(this.fileWriter2ComboBox, "fileWriter2ComboBox"); this.fileWriter2ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.fileWriter2ComboBox, "fileWriter2ComboBox"); this.fileWriter2ComboBox.Name = "fileWriter2ComboBox"; // // protocolTitleTextBox @@ -202,7 +200,6 @@ namespace TBF // metersKindRadioButton2 // resources.ApplyResources(this.metersKindRadioButton2, "metersKindRadioButton2"); - this.metersKindRadioButton2.ImageKey = global::TBF.Resources.Strings.Camera; this.metersKindRadioButton2.Name = "metersKindRadioButton2"; this.metersKindRadioButton2.TabStop = true; this.metersKindRadioButton2.UseVisualStyleBackColor = true; @@ -210,69 +207,63 @@ namespace TBF // metersKindRadioButton1 // resources.ApplyResources(this.metersKindRadioButton1, "metersKindRadioButton1"); - this.metersKindRadioButton1.ImageKey = global::TBF.Resources.Strings.Camera; this.metersKindRadioButton1.Name = "metersKindRadioButton1"; this.metersKindRadioButton1.TabStop = true; this.metersKindRadioButton1.UseVisualStyleBackColor = true; // // transitionEndComboBox // - resources.ApplyResources(this.transitionEndComboBox, "transitionEndComboBox"); this.transitionEndComboBox.FormattingEnabled = true; + resources.ApplyResources(this.transitionEndComboBox, "transitionEndComboBox"); this.transitionEndComboBox.Name = "transitionEndComboBox"; // // transitionEndLabel // resources.ApplyResources(this.transitionEndLabel, "transitionEndLabel"); - this.transitionEndLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.transitionEndLabel.Name = "transitionEndLabel"; // // transitionStartComboBox // - resources.ApplyResources(this.transitionStartComboBox, "transitionStartComboBox"); this.transitionStartComboBox.FormattingEnabled = true; + resources.ApplyResources(this.transitionStartComboBox, "transitionStartComboBox"); this.transitionStartComboBox.Name = "transitionStartComboBox"; // // transitionStartLabel // resources.ApplyResources(this.transitionStartLabel, "transitionStartLabel"); - this.transitionStartLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.transitionStartLabel.Name = "transitionStartLabel"; // // fileWriter1ComboBox // - resources.ApplyResources(this.fileWriter1ComboBox, "fileWriter1ComboBox"); this.fileWriter1ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.fileWriter1ComboBox, "fileWriter1ComboBox"); this.fileWriter1ComboBox.Name = "fileWriter1ComboBox"; // // printer1ComboBox // - resources.ApplyResources(this.printer1ComboBox, "printer1ComboBox"); this.printer1ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.printer1ComboBox, "printer1ComboBox"); this.printer1ComboBox.Name = "printer1ComboBox"; // // dataEntryComboBox // - resources.ApplyResources(this.dataEntryComboBox, "dataEntryComboBox"); this.dataEntryComboBox.FormattingEnabled = true; + resources.ApplyResources(this.dataEntryComboBox, "dataEntryComboBox"); this.dataEntryComboBox.Name = "dataEntryComboBox"; // // resultsWriterLabel // resources.ApplyResources(this.resultsWriterLabel, "resultsWriterLabel"); - this.resultsWriterLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.resultsWriterLabel.Name = "resultsWriterLabel"; // // resultsPrinterLabel // resources.ApplyResources(this.resultsPrinterLabel, "resultsPrinterLabel"); - this.resultsPrinterLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.resultsPrinterLabel.Name = "resultsPrinterLabel"; // // dataEntryLabel // resources.ApplyResources(this.dataEntryLabel, "dataEntryLabel"); - this.dataEntryLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.dataEntryLabel.Name = "dataEntryLabel"; // // notesTextBox @@ -283,7 +274,6 @@ namespace TBF // label18 // resources.ApplyResources(this.label18, "label18"); - this.label18.ImageKey = global::TBF.Resources.Strings.Camera; this.label18.Name = "label18"; // // watermetersTextBox @@ -294,7 +284,6 @@ namespace TBF // watermetersLabel // resources.ApplyResources(this.watermetersLabel, "watermetersLabel"); - this.watermetersLabel.ImageKey = global::TBF.Resources.Strings.Camera; this.watermetersLabel.Name = "watermetersLabel"; // // lastChangedOnTextBox @@ -305,7 +294,6 @@ namespace TBF // label15 // resources.ApplyResources(this.label15, "label15"); - this.label15.ImageKey = global::TBF.Resources.Strings.Camera; this.label15.Name = "label15"; // // lastChangedByTextBox @@ -316,7 +304,6 @@ namespace TBF // label16 // resources.ApplyResources(this.label16, "label16"); - this.label16.ImageKey = global::TBF.Resources.Strings.Camera; this.label16.Name = "label16"; // // createdOnTextBox @@ -327,7 +314,6 @@ namespace TBF // label14 // resources.ApplyResources(this.label14, "label14"); - this.label14.ImageKey = global::TBF.Resources.Strings.Camera; this.label14.Name = "label14"; // // createdByTextBox @@ -338,7 +324,6 @@ namespace TBF // label13 // resources.ApplyResources(this.label13, "label13"); - this.label13.ImageKey = global::TBF.Resources.Strings.Camera; this.label13.Name = "label13"; // // descriptionTextBox @@ -349,7 +334,6 @@ namespace TBF // label12 // resources.ApplyResources(this.label12, "label12"); - this.label12.ImageKey = global::TBF.Resources.Strings.Camera; this.label12.Name = "label12"; // // procNameTextBox @@ -360,22 +344,19 @@ namespace TBF // label1 // resources.ApplyResources(this.label1, "label1"); - this.label1.ImageKey = global::TBF.Resources.Strings.Camera; this.label1.Name = "label1"; // // historyTabPage // - resources.ApplyResources(this.historyTabPage, "historyTabPage"); this.historyTabPage.Controls.Add(this.historyListViewEx); - this.historyTabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.historyTabPage, "historyTabPage"); this.historyTabPage.Name = "historyTabPage"; - this.historyTabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.historyTabPage.UseVisualStyleBackColor = true; // // historyListViewEx // - resources.ApplyResources(this.historyListViewEx, "historyListViewEx"); this.historyListViewEx.AllowColumnReorder = true; + resources.ApplyResources(this.historyListViewEx, "historyListViewEx"); this.historyListViewEx.DoubleClickActivation = false; this.historyListViewEx.FullRowSelect = true; this.historyListViewEx.GridLines = true; @@ -385,17 +366,15 @@ namespace TBF // // metrology1TabPage // - resources.ApplyResources(this.metrology1TabPage, "metrology1TabPage"); this.metrology1TabPage.Controls.Add(this.metrology1ListViewEx); - this.metrology1TabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.metrology1TabPage, "metrology1TabPage"); this.metrology1TabPage.Name = "metrology1TabPage"; - this.metrology1TabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.metrology1TabPage.UseVisualStyleBackColor = true; // // metrology1ListViewEx // - resources.ApplyResources(this.metrology1ListViewEx, "metrology1ListViewEx"); this.metrology1ListViewEx.AllowColumnReorder = true; + resources.ApplyResources(this.metrology1ListViewEx, "metrology1ListViewEx"); this.metrology1ListViewEx.DoubleClickActivation = false; this.metrology1ListViewEx.FullRowSelect = true; this.metrology1ListViewEx.GridLines = true; @@ -406,17 +385,15 @@ namespace TBF // // metrology2TabPage // - resources.ApplyResources(this.metrology2TabPage, "metrology2TabPage"); this.metrology2TabPage.Controls.Add(this.metrology2ListViewEx); - this.metrology2TabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.metrology2TabPage, "metrology2TabPage"); this.metrology2TabPage.Name = "metrology2TabPage"; - this.metrology2TabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.metrology2TabPage.UseVisualStyleBackColor = true; // // metrology2ListViewEx // - resources.ApplyResources(this.metrology2ListViewEx, "metrology2ListViewEx"); this.metrology2ListViewEx.AllowColumnReorder = true; + resources.ApplyResources(this.metrology2ListViewEx, "metrology2ListViewEx"); this.metrology2ListViewEx.DoubleClickActivation = false; this.metrology2ListViewEx.FullRowSelect = true; this.metrology2ListViewEx.GridLines = true; @@ -427,17 +404,15 @@ namespace TBF // // processTabPage // - resources.ApplyResources(this.processTabPage, "processTabPage"); this.processTabPage.Controls.Add(this.processListViewEx); - this.processTabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.processTabPage, "processTabPage"); this.processTabPage.Name = "processTabPage"; - this.processTabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.processTabPage.UseVisualStyleBackColor = true; // // processListViewEx // - resources.ApplyResources(this.processListViewEx, "processListViewEx"); this.processListViewEx.AllowColumnReorder = true; + resources.ApplyResources(this.processListViewEx, "processListViewEx"); this.processListViewEx.DoubleClickActivation = false; this.processListViewEx.FullRowSelect = true; this.processListViewEx.GridLines = true; @@ -448,17 +423,15 @@ namespace TBF // // parametersTabPage // - resources.ApplyResources(this.parametersTabPage, "parametersTabPage"); this.parametersTabPage.Controls.Add(this.parametersListViewEx); - this.parametersTabPage.ImageKey = global::TBF.Resources.Strings.Camera; + resources.ApplyResources(this.parametersTabPage, "parametersTabPage"); this.parametersTabPage.Name = "parametersTabPage"; - this.parametersTabPage.ToolTipText = global::TBF.Resources.Strings.Camera; this.parametersTabPage.UseVisualStyleBackColor = true; // // parametersListViewEx // - resources.ApplyResources(this.parametersListViewEx, "parametersListViewEx"); this.parametersListViewEx.AllowColumnReorder = true; + resources.ApplyResources(this.parametersListViewEx, "parametersListViewEx"); this.parametersListViewEx.DoubleClickActivation = false; this.parametersListViewEx.FullRowSelect = true; this.parametersListViewEx.Name = "parametersListViewEx"; @@ -470,6 +443,13 @@ namespace TBF resources.ApplyResources(this.sharedButtons, "sharedButtons"); this.sharedButtons.Name = "sharedButtons"; // + // metersKindRadioButton3 + // + resources.ApplyResources(this.metersKindRadioButton3, "metersKindRadioButton3"); + this.metersKindRadioButton3.Name = "metersKindRadioButton3"; + this.metersKindRadioButton3.TabStop = true; + this.metersKindRadioButton3.UseVisualStyleBackColor = true; + // // ProcedureDlg // resources.ApplyResources(this, "$this"); @@ -543,5 +523,6 @@ namespace TBF private System.Windows.Forms.ComboBox fileWriter3ComboBox; private System.Windows.Forms.ComboBox printer2ComboBox; private System.Windows.Forms.ComboBox fileWriter4ComboBox; + private System.Windows.Forms.RadioButton metersKindRadioButton3; } } \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.cs b/TestBenchFramework/ProcedureDlg.cs index 6f88d9425..8631a7f12 100644 --- a/TestBenchFramework/ProcedureDlg.cs +++ b/TestBenchFramework/ProcedureDlg.cs @@ -43,7 +43,8 @@ namespace TBF IList benchPaths; IList outputPaths; IList metersPaths; - IList transitionSequences; + IList heatMetersPaths; + IList transitionSequences; IList testParamsCtrls; IList procedureParamsCtrls; @@ -131,7 +132,10 @@ namespace TBF benchPaths = session.CreateQuery("FROM BenchPath").List(); outputPaths = session.CreateQuery("FROM OutputPath").List(); metersPaths = session.CreateQuery("FROM MetersPath").List(); - transitionSequences = session.CreateQuery("FROM TransitionSequence").List(); +#if HEAT_METERS_SUPPORT + heatMetersPaths = session.CreateQuery("FROM HeatMetersPath").List(); +#endif + transitionSequences = session.CreateQuery("FROM TransitionSequence").List(); } transitionStartComboBox.Items.Add("---"); @@ -294,8 +298,11 @@ namespace TBF fileWriter4ComboBox.Enabled = false; metersKindRadioButton1.Enabled = false; metersKindRadioButton2.Enabled = false; - notesTextBox.Enabled = false; - + metersKindRadioButton3.Enabled = false; + notesTextBox.Enabled = false; +#if !HEAT_METERS_SUPPORT + metersKindRadioButton3.Visible = false; +#endif /// Make some controls readonly createdByTextBox.ReadOnly = true; createdOnTextBox.ReadOnly = true; @@ -317,9 +324,34 @@ namespace TBF void Localize() { + Text = Strings.Procedure; + + generalTabPage.Text = Strings.General; + historyTabPage.Text = Strings.History_of_changes; + metrology1TabPage.Text = Strings.Metrology + " I."; + metrology2TabPage.Text = Strings.Metrology + " II."; + processTabPage.Text = Strings.Process; + parametersTabPage.Text = Strings.Parameters; + + label1.Text = Strings.Procedure_name; + label12.Text = Strings.Short_description; + label13.Text = Strings.Created_by; + label16.Text = Strings.Last_changed_by; + label14.Text = Strings.Date; + label15.Text = Strings.Date; + label18.Text = Strings.Notes; + watermetersLabel.Text = Strings.Meter_types_tested; + protocolTitleLabel.Text = Strings.Protocol_title; + dataEntryLabel.Text = Strings.Data_entry; + transitionStartLabel.Text = Strings.Purge_Begin; + transitionEndLabel.Text = Strings.Purge_End; + resultsPrinterLabel.Text = Strings.Printing; + resultsWriterLabel.Text = Strings.Saving_results; + metersKindRadioButton1.Text = Strings.SingleBtnText; - metersKindRadioButton2.Text = Strings.CombinedBtnText; - } + metersKindRadioButton2.Text = Strings.Compound; + metersKindRadioButton3.Text = Strings.Heat_meter; + } void RefreshAllTabs() { @@ -377,9 +409,12 @@ namespace TBF fileWriter4ComboBox.Text = (fields.Length >= 4) ? fields[3] : "---"; } - metersKindRadioButton1.Checked = (LoadedProcedure.MetersKind == MetersKind.Single); + metersKindRadioButton1.Checked = (LoadedProcedure.MetersKind == MetersKind.Single + || (LoadedProcedure.MetersKind != MetersKind.Combined && LoadedProcedure.MetersKind != MetersKind.HeatMeter)); metersKindRadioButton2.Checked = (LoadedProcedure.MetersKind == MetersKind.Combined); - notesTextBox.Text = LoadedProcedure.LongDescription; + metersKindRadioButton3.Checked = (LoadedProcedure.MetersKind == MetersKind.HeatMeter); + + notesTextBox.Text = LoadedProcedure.LongDescription; } void UpdateFromGeneralTab() @@ -447,7 +482,9 @@ namespace TBF LoadedProcedure.ResultsWriter = sb.ToString(); } - LoadedProcedure.MetersKind = (metersKindRadioButton1.Checked ? MetersKind.Single : MetersKind.Combined); + LoadedProcedure.MetersKind = (metersKindRadioButton1.Checked ? MetersKind.Single + : (metersKindRadioButton2.Checked ? MetersKind.Combined + : MetersKind.HeatMeter)); LoadedProcedure.LongDescription = notesTextBox.Text; } @@ -659,7 +696,10 @@ namespace TBF Bench, Output, Sensor, - TrnStart, +#if HEAT_METERS_SUPPORT + HeatMeterSensors, +#endif + TrnStart, TrnStop, ProcessClmnCount } @@ -672,10 +712,13 @@ namespace TBF processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 }); processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Q_from_m3h, Width = 80 }); processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Q_to_m3h, Width = 80 }); - processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Feeding_chdr, Width = 90 }); - processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Bench_chdr, Width = 90 }); - processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Output_chdr, Width = 90 }); - processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Sensors_chdr, Width = 90 }); + processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Feeding_chdr, Width = 80 }); + processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Bench_chdr, Width = 80 }); + processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Output_chdr, Width = 80 }); + processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Sensors_chdr, Width = 80 }); +#if HEAT_METERS_SUPPORT + processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Heat_meter_sensors, Width = 110 }); +#endif processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TransitionStart_chdr, Width = 100 }); processListViewEx.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 }); @@ -689,6 +732,9 @@ namespace TBF new ComboBox(), /// Table new ComboBox(), /// Output new ComboBox(), /// Meters +#if HEAT_METERS_SUPPORT + new ComboBox(), /// Heat meters +#endif new ComboBox(), /// TransitionStart new ComboBox(), /// TransitionEnd }; @@ -697,6 +743,9 @@ namespace TBF foreach (var path in benchPaths) ((ComboBox)processEditors[(int)ProcessClmn.Bench]).Items.Add(path.Name); foreach (var path in outputPaths) ((ComboBox)processEditors[(int)ProcessClmn.Output]).Items.Add(path.Name); foreach (var path in metersPaths) ((ComboBox)processEditors[(int)ProcessClmn.Sensor]).Items.Add(path.Name); +#if HEAT_METERS_SUPPORT + foreach (var path in heatMetersPaths) ((ComboBox)processEditors[(int)ProcessClmn.HeatMeterSensors]).Items.Add(path.Name); +#endif ((ComboBox)processEditors[(int)ProcessClmn.TrnStart]).Items.Add("---"); ((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add("---"); @@ -859,6 +908,9 @@ namespace TBF lviProcess.SubItems.Add(test.BenchPath); lviProcess.SubItems.Add(test.OutputPath); lviProcess.SubItems.Add(test.MetersPath); +#if HEAT_METERS_SUPPORT + lviProcess.SubItems.Add(test.HeatMetersPath); +#endif lviProcess.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore); lviProcess.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter); @@ -992,6 +1044,12 @@ namespace TBF { entity.MetersPath = lvi.SubItems[(int)ProcessClmn.Sensor].Text; } +#if HEAT_METERS_SUPPORT + if ((processEditors[(int)ProcessClmn.HeatMeterSensors] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.HeatMeterSensors].Text)) + { + entity.HeatMetersPath = lvi.SubItems[(int)ProcessClmn.HeatMeterSensors].Text; + } +#endif if ((processEditors[(int)ProcessClmn.TrnStart] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnStart].Text)) { entity.RelTransBefore = lvi.SubItems[(int)ProcessClmn.TrnStart].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnStart].Text; @@ -1291,6 +1349,9 @@ namespace TBF dataEntryComboBox.Enabled = true; metersKindRadioButton1.Enabled = true; metersKindRadioButton2.Enabled = true; +#if HEAT_METERS_SUPPORT + metersKindRadioButton3.Enabled = true; +#endif printer1ComboBox.Enabled = true; printer2ComboBox.Enabled = true; fileWriter1ComboBox.Enabled = true; diff --git a/TestBenchFramework/ProcedureDlg.cs.resx b/TestBenchFramework/ProcedureDlg.cs.resx deleted file mode 100644 index 73043967c..000000000 --- a/TestBenchFramework/ProcedureDlg.cs.resx +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 85, 13 - - - Název protokolu - - - 90, 17 - - - Kombinované - - - 48, 17 - - - Singl - - - 55, 13 - - - Vypuštění - - - 38, 13 - - - Plnění - - - 33, 13 - - - Uložit - - - 48, 13 - - - Tisknout - - - 60, 13 - - - Vložte data - - - 56, 13 - - - Poznámky - - - 115, 13 - - - Testované typy měřičů - - - 38, 13 - - - Datum - - - 83, 13 - - - Poslední změna - - - 38, 13 - - - Datum - - - 42, 13 - - - Vytvořil - - - 71, 13 - - - Stručný popis - - - 79, 13 - - - Jméno postupu - - - Obecné - - - Historie změn - - - Metrologie I. - - - Metrologie II. - - - Proces - - - Parametry - - - Procedura - - \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.de.resx b/TestBenchFramework/ProcedureDlg.de.resx deleted file mode 100644 index e34254ced..000000000 --- a/TestBenchFramework/ProcedureDlg.de.resx +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 148, 105 - - - 526, 20 - - - 20, 108 - - - 428, 162 - - - 65, 17 - - - Verbund - - - 357, 162 - - - 53, 17 - - - Einzel - - - 20, 200 - - - 62, 13 - - - Entwässern - - - 45, 13 - - - Befüllen - - - 20, 269 - - - 122, 13 - - - Speichern auf Festplatte - - - 20, 223 - - - 45, 13 - - - Drucker - - - 20, 154 - - - 112, 13 - - - Zählernummereingabe - - - 357, 195 - - - 290, 200 - - - 61, 13 - - - Bemerkung - - - 148, 128 - - - 526, 20 - - - 20, 131 - - - 70, 13 - - - Wasserzellen - - - 357, 82 - - - 290, 85 - - - 38, 13 - - - Datum - - - 102, 13 - - - letzte Änderung von - - - 357, 59 - - - 290, 62 - - - 38, 13 - - - Datum - - - 62, 13 - - - Errstellt von - - - 526, 20 - - - 92, 13 - - - Kurzbeschreibung - - - 75, 13 - - - Prüfungsname - - - 923, 371 - - - Allgemein - - - 917, 365 - - - 923, 371 - - - Änderungen - - - 917, 365 - - - 923, 371 - - - Metrologie I. - - - 917, 365 - - - 923, 371 - - - Metrologie II. - - - 917, 365 - - - 923, 371 - - - Prüfstrecke - - - 923, 371 - - - 923, 371 - - - 931, 409 - - - 1034, 409 - - - 1034, 409 - - - Prüfung - - \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.resx b/TestBenchFramework/ProcedureDlg.resx index 668914e47..c9e7f5e36 100644 --- a/TestBenchFramework/ProcedureDlg.resx +++ b/TestBenchFramework/ProcedureDlg.resx @@ -117,1267 +117,1297 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - protocolTitleLabel - - - NoControl - - - Metrology I. - - - - 121, 20 - - - 353, 195 - - - 20, 62 - - - transitionStartComboBox - - - tabControl + + Fill - - 0 - - - 10 - - - 1 - - - generalTabPage - - - 148, 59 - - - Process - - - label15 - - - 923, 364 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 25 - - - 0 - - - printer1ComboBox - - - Printers - - - generalTabPage - - - 0 - - - metrology2TabPage - - - 20, 108 - - + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0, 0 - + + True + + + NoControl + + + 536, 163 + + + 77, 17 + + + 34 + + + Heat meter + + + metersKindRadioButton3 + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + 0 - - 931, 402 + + 148, 335 - - 30, 13 + + 121, 21 - + + 29 + + + fileWriter4ComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + 1 + + 148, 312 + + + 121, 21 + + + 28 + + + fileWriter3ComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 2 + 148, 243 - - 17 + + 121, 21 - - metrology2ListViewEx + + 24 - - 317, 161 + + printer2ComboBox - - 353, 59 - - - 86, 13 - - - 923, 364 - - - 26 - - - 32 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 353, 82 - - - 32 - - - 4, 34 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - procNameTextBox - - - History of Changes - - - 23 - - - metersKindRadioButton1 - - - 21 - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Single - - - resultsPrinterLabel - - - 148, 36 - - - 1 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 generalTabPage - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - historyTabPage - - - 16 - - - generalTabPage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3, 3, 3, 3 - - + 3 - - 2 + + 148, 289 - - generalTabPage + + 121, 21 - - NoControl + + 27 - - $this + + fileWriter2ComboBox - - 148, 174 - - - generalTabPage - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill - - - 0 - - - lastChangedOnTextBox - - - True - - - NoControl - - - Results writer - - - 148, 13 - - - Combined - - - -1, 0 - - - True - - - generalTabPage - - - 3, 3, 3, 3 - - - NoControl - - - 3, 3, 3, 3 - - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 generalTabPage - - 57, 13 + + 4 - - 6, 13 + + 148, 128 - - mainSplitContainer + + 522, 20 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 20 - - - 18 - - - Meter types tested - - - transitionEndLabel - - - 4, 34 - - - 3 - - - 0, 0 - - - 86, 13 - - - 148, 266 - - - TBF.UiControls.ListViewEx, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null - - - 31 - - - Fill - - - transitionStartLabel - - - 22 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - NoControl - - - 94, 13 - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - parametersTabPage - - - 20, 271 - - - generalTabPage - - - 923, 364 - - - historyListViewEx - - - tabControl - - - 13 - - - 923, 364 - - - 427, 163 - - - 291, 62 + + 15 protocolTitleTextBox - - notesTextBox + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - metrology1TabPage + + generalTabPage + + + 5 + + + True + + + NoControl + + + 20, 131 + + + 65, 13 + + + 14 + + + Protocol title + + + protocolTitleLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 6 + + + True + + + NoControl + + + 446, 163 + + + 72, 17 + + + 31 + + + Combined metersKindRadioButton2 - - 121, 21 + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + generalTabPage + + + 7 + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 356, 163 + + + 54, 17 + + + 30 + + + Single + + + metersKindRadioButton1 + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 8 148, 197 - - generalTabPage + + 121, 21 - - 2 - - - createdOnTextBox - - - label16 - - + 21 - - 33 + + transitionEndComboBox - - label12 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - watermetersTextBox + + generalTabPage + + + 9 + + + True + + + NoControl + + + 20, 202 + + + 63, 13 + + + 20 + + + Purge - End + + + transitionEndLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 10 + + + 148, 174 + + + 121, 21 + + + 19 + + + transitionStartComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 11 + + + True + + + NoControl + + + 20, 177 + + + 71, 13 + + + 18 + + + Purge - Begin + + + transitionStartLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 12 + + + 148, 266 + + + 121, 21 + + + 26 + + + fileWriter1ComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 13 + + + 148, 220 + + + 121, 21 + + + 23 + + + printer1ComboBox System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + generalTabPage + + + 14 + + + 148, 151 + + + 121, 21 + + + 17 + + + dataEntryComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 15 + + + True + + + NoControl + + + 20, 271 + + + 70, 13 + + + 25 + + + Results writer + + + resultsWriterLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 16 + + + True + + + NoControl + + + 20, 225 + + + 42, 13 + + + 22 + + + Printers + + + resultsPrinterLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 17 + + + True + + + NoControl + + + 21, 154 + + + 57, 13 + + + 16 + + + Data Entry + + + dataEntryLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 18 + + + 353, 195 + + + True + + + 317, 161 + + + 33 + + + notesTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 19 + + + True + + + NoControl + + + 291, 198 + + + 35, 13 + + + 32 + + + Notes + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 20 + + + 148, 105 + + + 522, 20 + + + 13 + + + watermetersTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 21 + + + True + + + NoControl + + + 20, 108 + + + 94, 13 + + + 12 + + + Meter types tested + + + watermetersLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 22 + + + 353, 82 + + + 150, 20 + + + 11 + + + lastChangedOnTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 23 + + + True + + + NoControl + + + 291, 85 + + + 30, 13 + + + 10 + + + Date + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 24 + + + 148, 82 + + + 121, 20 + + + 9 + + + lastChangedByTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 25 + + + True + + + NoControl + + + 20, 85 + + + 86, 13 + + + 8 + + + Last changed by + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 26 + + + 353, 59 + + + 150, 20 + + + 7 + + + createdOnTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + 27 - - Parameters + + True + + + NoControl + + + 291, 62 + + + 30, 13 + + + 6 + + + Date + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 28 + + + 148, 59 + + + 121, 20 + + + 5 + + + createdByTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 29 + + + True + + + NoControl + + + 20, 62 + + + 58, 13 + + + 4 + + + Created by + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 30 + + + 148, 36 + + + 522, 20 + + + 3 + + + descriptionTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 31 + + + True + + + NoControl + + + 20, 39 + + + 86, 13 + + + 2 + + + Short description + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 32 + + + 148, 13 + + + 217, 20 + + + 1 + + + procNameTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + generalTabPage + + + 33 + + + True + + + NoControl + + + 20, 16 + + + 85, 13 + + + 0 + + + Procedure name + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 generalTabPage + + 34 + + + 4, 34 + + + 3, 3, 3, 3 + + + 923, 364 + + + 0 + + + General + + + generalTabPage + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 - - - generalTabPage - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tabControl 0 - - metrology1TabPage - - - 85, 13 - - - 9 - - - NoControl - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - label13 - - - True - - - 23 - - - generalTabPage - - - generalTabPage - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 931 - - - 70, 13 - - - 3 - - - label18 - - - 121, 21 - - - 20 - - - 7 - - - 17 - - - label1 - - - generalTabPage - - - True - - - generalTabPage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 21, 154 - - - 0 - - - Fill - - - printer2ComboBox - - - 1 - - - fileWriter2ComboBox - - - True - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 54, 17 - - - Procedure name - - - TBF.UiControls.ListViewEx, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null - - - True - - - 11 - - - Fill - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 100, 400 - - - resultsWriterLabel - - - NoControl - - - 11 - - - 30 - - - 0, 0 - - - NoControl - - - 148, 82 - - - NoControl - - - mainSplitContainer - - - 148, 289 - - - 4 - - - 3 - - - metrology1ListViewEx - - - 150, 20 - - - 30, 13 - - - 31 - - - True - - - tabControl - - - generalTabPage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 27 - - - 148, 151 - - - 917, 358 - - - 18 - - - generalTabPage - - - 20, 131 - - - 0, 0 - - - transitionEndComboBox - - - 58, 13 - - - 12 - - - 522, 20 - - - NoControl - - - 148, 128 - - - generalTabPage - - - 24 - - - 29 - - - 72, 17 - - - 71, 13 - - - 16 - - - 3, 3 - - - NoControl - - - 30 - Fill - - 25 - - - watermetersLabel - - - generalTabPage - - - 917, 358 - - - 148, 312 - - - 26 - - - 4, 34 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 15 - - - 19 - - - Purge - Begin - - - 6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - 28 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - generalTabPage - - - True - - - mainSplitContainer.Panel2 - - - 13 - - - 24 - - - mainSplitContainer.Panel1 - - - 121, 21 - - - 14 - - - generalTabPage - - - 917, 358 - - - 4 - - - mainSplitContainer.Panel2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 20, 16 - - - TBF.UiControls.SharedButtons, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null - - - 217, 20 - - - tabControl - - - 7 - - - 63, 13 - - - 917, 358 - - - 1 - - - generalTabPage - - - NoControl - - - generalTabPage - - - 0 - - - True - - - 121, 21 - - - 356, 163 - - - ProcedureDlg - - - 8 - - - Purge - End - - - tabControl - - - generalTabPage - - - generalTabPage - - - 20, 85 - - - Metrology II. - - - 148, 105 - - - parametersTabPage - - - historyTabPage - - - True - 3, 3 - - True - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - dataEntryComboBox - - - Notes - - - 150, 20 - - - 42, 13 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - 65, 13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - generalTabPage - - - 20, 177 - - - generalTabPage - - - Created by - - - createdByTextBox - - - fileWriter4ComboBox - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 8 - - - 4, 34 - - - processTabPage - - - 22 - - - 3, 3 - - - TBF.UiControls.ListViewEx, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null - - - mainSplitContainer.Panel1 - - - generalTabPage - - - 5 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 121, 21 - - - 291, 198 - - - 19 - - - 20, 225 - - - 9 - - - Data Entry - - - generalTabPage - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 2 - - - Date - - - generalTabPage - - - Fill - - - 5 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3, 3 - - - 121, 21 - - - 0 - - - mainSplitContainer - - - generalTabPage - - - 33 - - - lastChangedByTextBox - - - 121, 21 - - - 0 - - - 0 - - - 0 - - - 20, 202 - - - metrology2TabPage - - - 12 - - - sharedButtons - - - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill - - - CenterParent - - - 29 - - - 1034, 402 - - - generalTabPage - - - 2 - - - 522, 20 - - - 148, 220 - - - 923, 364 - - - tabControl - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3, 3, 3, 3 - - - processTabPage - - - TBF.UiControls.ListViewEx, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null - - - 3, 3, 3, 3 - - - 4 - - - processListViewEx - - - 4 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 1034, 402 - - - parametersListViewEx - - - 121, 20 - - - True - - - 291, 85 - - - 4, 34 - - - 0 - - - Procedure - - - descriptionTextBox - - - True - - - 121, 21 - - - 10 - - - generalTabPage - - - 0 - - - generalTabPage - - - 522, 20 - - - 5 - - - 6 - - - Last changed by - - - dataEntryLabel - - - NoControl - - - 4, 34 - - - 14 - - - 148, 335 - - - True - - - 1 - - - 28 - - - Protocol title - - - 1 - - - General - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 20, 39 - - - 58, 30 - - - fileWriter1ComboBox - - - Short description - - - fileWriter3ComboBox - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - NoControl - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Date - - - NoControl - - - TBF.UiControls.ListViewEx, TBF, Version=2.8.313.1, Culture=neutral, PublicKeyToken=null + + 917, 358 0 - - 15 + + historyListViewEx - - True + + TBF.UiControls.ListViewEx, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null - - 121, 21 + + historyTabPage - - 35, 13 + + 0 + + + 4, 34 + + + 3, 3, 3, 3 + + + 923, 364 + + + 1 + + + History of Changes + + + historyTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl + + + 1 + + + Fill + + + 3, 3 + + + 917, 358 + + + 0 + + + metrology1ListViewEx + + + TBF.UiControls.ListViewEx, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null + + + metrology1TabPage + + + 0 + + + 4, 34 + + + 3, 3, 3, 3 + + + 923, 364 + + + 2 + + + Metrology I. + + + metrology1TabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl + + + 2 + + + Fill + + + 3, 3 + + + 917, 358 + + + 0 + + + metrology2ListViewEx + + + TBF.UiControls.ListViewEx, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null + + + metrology2TabPage + + + 0 + + + 4, 34 + + + 3, 3, 3, 3 + + + 923, 364 + + + 3 + + + Metrology II. + + + metrology2TabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl + + + 3 + + + Fill + + + 3, 3 + + + 917, 358 + + + 0 + + + processListViewEx + + + TBF.UiControls.ListViewEx, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null + + + processTabPage + + + 0 + + + 4, 34 + + + 3, 3, 3, 3 923, 364 + + 4 + + + Process + + + processTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl + + + 4 + + + Fill + + + 0, 0 + + + 923, 364 + + + 0 + + + parametersListViewEx + + + TBF.UiControls.ListViewEx, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null + + + parametersTabPage + + + 0 + + + 4, 34 + 923, 364 + + 5 + + + Parameters + + + parametersTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + tabControl - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - True + + Fill - + + 58, 30 + + + 0, 0 + + + 931, 402 + + + 1 + + + tabControl + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mainSplitContainer.Panel1 + + 0 - - label14 + + mainSplitContainer.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mainSplitContainer + + + 0 + + + -1, 0 + + + 100, 400 + + + 0 + + + sharedButtons + + + TBF.UiControls.SharedButtons, TBF, Version=2.9.322.1, Culture=neutral, PublicKeyToken=null + + + mainSplitContainer.Panel2 + + + 0 + + + mainSplitContainer.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mainSplitContainer + + + 1 + + + 1034, 402 + + + 931 + + + 1 + + + mainSplitContainer + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 True + + 6, 13 + + + 1034, 402 + + + CenterParent + + + Procedure + + + ProcedureDlg + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.zh-CN.resx b/TestBenchFramework/ProcedureDlg.zh-CN.resx deleted file mode 100644 index 4984190b9..000000000 --- a/TestBenchFramework/ProcedureDlg.zh-CN.resx +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 79, 13 - - - 程序 - - - 输入数据 - - - 总体情况 - - - 变更历史记录 - - - 程序名 - - - 简短描述 - - - 创建者 - - - 日期 - - - 日期 - - - 最后修改者 - - - 记录 - - - 单个的 - - - 组合的 - - - 计量 I. - - - 计量 II. - - - 参数 - - - 进程 - - - 方案标题 - - - 打印结果 - - - 写入结果 - - - 清除 - 结束 - - - 清除 - 开始 - - - 测试仪表型号 - - \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs index 20d769f56..655e66581 100644 --- a/TestBenchFramework/Resources/Strings.Designer.cs +++ b/TestBenchFramework/Resources/Strings.Designer.cs @@ -609,24 +609,6 @@ namespace TBF.Resources { } } - /// - /// Looks up a localized string similar to Combined meters. - /// - internal static string Combined_meters { - get { - return ResourceManager.GetString("Combined_meters", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Combined. - /// - internal static string CombinedBtnText { - get { - return ResourceManager.GetString("CombinedBtnText", resourceCulture); - } - } - /// /// Looks up a localized string similar to Communication. /// @@ -645,6 +627,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Compound. + /// + internal static string Compound { + get { + return ResourceManager.GetString("Compound", resourceCulture); + } + } + /// /// Looks up a localized string similar to Compound meter {0}. /// @@ -654,6 +645,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Compound meters. + /// + internal static string Compound_meters { + get { + return ResourceManager.GetString("Compound_meters", resourceCulture); + } + } + /// /// Looks up a localized string similar to Configuration. /// @@ -771,6 +771,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Created by. + /// + internal static string Created_by { + get { + return ResourceManager.GetString("Created_by", resourceCulture); + } + } + /// /// Looks up a localized string similar to Data. /// @@ -780,6 +789,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Data entry. + /// + internal static string Data_entry { + get { + return ResourceManager.GetString("Data_entry", resourceCulture); + } + } + /// /// Looks up a localized string similar to Database Settings. /// @@ -1347,6 +1365,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to General. + /// + internal static string General { + get { + return ResourceManager.GetString("General", resourceCulture); + } + } + /// /// Looks up a localized string similar to Get mass of water in the tank. /// @@ -1383,6 +1410,33 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Heat meter. + /// + internal static string Heat_meter { + get { + return ResourceManager.GetString("Heat_meter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Heat meter sensors. + /// + internal static string Heat_meter_sensors { + get { + return ResourceManager.GetString("Heat_meter_sensors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to History of changes. + /// + internal static string History_of_changes { + get { + return ResourceManager.GetString("History_of_changes", resourceCulture); + } + } + /// /// Looks up a localized string similar to Horizontally. /// @@ -1500,6 +1554,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Last changed by. + /// + internal static string Last_changed_by { + get { + return ResourceManager.GetString("Last_changed_by", resourceCulture); + } + } + /// /// Looks up a localized string similar to Less. /// @@ -1725,6 +1788,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Meter types tested. + /// + internal static string Meter_types_tested { + get { + return ResourceManager.GetString("Meter_types_tested", resourceCulture); + } + } + /// /// Looks up a localized string similar to Sensors. /// @@ -1833,6 +1905,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to PHeat. + /// + internal static string New_heat_meters_path_name { + get { + return ResourceManager.GetString("New_heat_meters_path_name", resourceCulture); + } + } + /// /// Looks up a localized string similar to - Copy. /// @@ -1950,6 +2031,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Notes. + /// + internal static string Notes { + get { + return ResourceManager.GetString("Notes", resourceCulture); + } + } + /// /// Looks up a localized string similar to <nothing to configure>. /// @@ -2364,6 +2454,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Printing. + /// + internal static string Printing { + get { + return ResourceManager.GetString("Printing", resourceCulture); + } + } + /// /// Looks up a localized string similar to Procedure. /// @@ -2391,6 +2490,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Procedure name. + /// + internal static string Procedure_name { + get { + return ResourceManager.GetString("Procedure_name", resourceCulture); + } + } + /// /// Looks up a localized string similar to Procedures. /// @@ -2400,6 +2508,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Process. + /// + internal static string Process { + get { + return ResourceManager.GetString("Process", resourceCulture); + } + } + /// /// Looks up a localized string similar to Producer. /// @@ -2454,6 +2571,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Protocol title. + /// + internal static string Protocol_title { + get { + return ResourceManager.GetString("Protocol_title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Publish. /// @@ -2517,6 +2643,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Purge - Begin. + /// + internal static string Purge_Begin { + get { + return ResourceManager.GetString("Purge_Begin", resourceCulture); + } + } + /// /// Looks up a localized string similar to Fill the test bench with water?. /// @@ -2526,6 +2661,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Purge - End. + /// + internal static string Purge_End { + get { + return ResourceManager.GetString("Purge_End", resourceCulture); + } + } + /// /// Looks up a localized string similar to Purging. /// @@ -2913,6 +3057,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Saving results. + /// + internal static string Saving_results { + get { + return ResourceManager.GetString("Saving_results", resourceCulture); + } + } + /// /// Looks up a localized string similar to Screen. /// @@ -3048,6 +3201,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Short description. + /// + internal static string Short_description { + get { + return ResourceManager.GetString("Short_description", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show cycle end form. /// @@ -3237,6 +3399,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T cold. + /// + internal static string T_cold { + get { + return ResourceManager.GetString("T_cold", resourceCulture); + } + } + /// /// Looks up a localized string similar to T div.. /// @@ -3273,6 +3444,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T inlet. + /// + internal static string T_inlet { + get { + return ResourceManager.GetString("T_inlet", resourceCulture); + } + } + /// /// Looks up a localized string similar to T out. /// @@ -3291,6 +3471,24 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T outlet. + /// + internal static string T_outlet { + get { + return ResourceManager.GetString("T_outlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to T warm. + /// + internal static string T_warm { + get { + return ResourceManager.GetString("T_warm", resourceCulture); + } + } + /// /// Looks up a localized string similar to Target flow high [m3/h]:. /// diff --git a/TestBenchFramework/Resources/Strings.cs.resx b/TestBenchFramework/Resources/Strings.cs.resx index 1dfc1b4ed..171091e57 100644 --- a/TestBenchFramework/Resources/Strings.cs.resx +++ b/TestBenchFramework/Resources/Strings.cs.resx @@ -252,10 +252,10 @@ Studený - + Kombinovaná měřidla - + Kombinovaný @@ -1215,4 +1215,55 @@ Objednávka může mít maximálně {0} znaků + + Měřič tepla + + + Senzory měřičů tepla + + + Vytvořil + + + Vkládání údajů + + + Obecné + + + Historie změn + + + Poslední změna + + + Testované typy měřičů + + + Poznámky + + + Tisk výsledků + + + Jméno postupu + + + Proces + + + Název protokolu + + + Plnění + + + Vypuštění + + + Ukládání výsledků + + + Stručný popis + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.de.resx b/TestBenchFramework/Resources/Strings.de.resx index 0a676a9d1..4d48f8f82 100644 --- a/TestBenchFramework/Resources/Strings.de.resx +++ b/TestBenchFramework/Resources/Strings.de.resx @@ -741,9 +741,6 @@ Auswahl Prüfart - - - Prüfart @@ -843,10 +840,10 @@ Ergebnisse gehen verloren! Wollen sie fortfahren? - + Verbund - + Verbund Wasserzähler @@ -1281,4 +1278,67 @@ stabil + + Wärmezähler + + + Wärmezählersensoren + + + T kalt + + + T einlass + + + T auslauf + + + T warm + + + Errstellt von + + + Zählernummereingabe + + + Allgemein + + + Änderungen + + + letzte Änderung von + + + Wasserzellen + + + Bemerkung + + + Drucker + + + Prüfungsname + + + Prüfstrecke + + + Protokoll + + + Befüllen + + + Entwässern + + + Speichern auf Festplatte + + + Kurzbeschreibung + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.pl.resx b/TestBenchFramework/Resources/Strings.pl.resx index 5b3932699..532dee54e 100644 --- a/TestBenchFramework/Resources/Strings.pl.resx +++ b/TestBenchFramework/Resources/Strings.pl.resx @@ -225,10 +225,10 @@ Zamknięcie zaworu wejściowego, wyłączanie pompy - + Wodomierze sprzężone - + Sprzężone @@ -1050,4 +1050,10 @@ Wodomierz {0} + + Licznik ciepła + + + Ciepłomierza czujniki + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx index 4098cb513..07f31fa69 100644 --- a/TestBenchFramework/Resources/Strings.resx +++ b/TestBenchFramework/Resources/Strings.resx @@ -552,8 +552,8 @@ Target Q [m3/h] - - Combined meters + + Compound meters Detection threshold [%] @@ -883,8 +883,8 @@ Timeout - - Combined + + Compound Device @@ -1435,4 +1435,70 @@ stable + + Heat meter + + + Heat meter sensors + + + T cold + + + T inlet + + + T outlet + + + T warm + + + PHeat + + + Created by + + + Data entry + + + General + + + History of changes + + + Last changed by + + + Meter types tested + + + Notes + + + Printing + + + Procedure name + + + Process + + + Protocol title + + + Purge - Begin + + + Purge - End + + + Saving results + + + Short description + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.ro.resx b/TestBenchFramework/Resources/Strings.ro.resx index 798efdd0d..7db78da6e 100644 --- a/TestBenchFramework/Resources/Strings.ro.resx +++ b/TestBenchFramework/Resources/Strings.ro.resx @@ -189,10 +189,10 @@ rece - + Contor combinat - + Combinat diff --git a/TestBenchFramework/Resources/Strings.sk.resx b/TestBenchFramework/Resources/Strings.sk.resx index 720f0f61f..775680ec7 100644 --- a/TestBenchFramework/Resources/Strings.sk.resx +++ b/TestBenchFramework/Resources/Strings.sk.resx @@ -123,6 +123,12 @@ Zrušiť + + Združený + + + Združené vodomery + Jazyk diff --git a/TestBenchFramework/Resources/Strings.zh-CN.resx b/TestBenchFramework/Resources/Strings.zh-CN.resx index 99d9d8cc1..85611d2e7 100644 --- a/TestBenchFramework/Resources/Strings.zh-CN.resx +++ b/TestBenchFramework/Resources/Strings.zh-CN.resx @@ -249,10 +249,10 @@ - + 组合水表 - + 组合的 @@ -1170,4 +1170,49 @@ 水表 {0} + + 创建者 + + + 输入数据 + + + 总体情况 + + + 变更历史记录 + + + 最后修改者 + + + 测试仪表型号 + + + 记录 + + + 打印结果 + + + 程序名 + + + 进程 + + + 方案标题 + + + 清除 - 开始 + + + 清除 - 结束 + + + 写入结果 + + + 简短描述 + \ No newline at end of file diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs index a5898a0aa..3f8efb32e 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs @@ -203,7 +203,7 @@ namespace TBF.Screens void UpdateVisibility(MetersKind metersKind) { - bool visible = (metersKind == MetersKind.Single); + bool visible = (metersKind == MetersKind.Single || metersKind == MetersKind.HeatMeter); for (int i = 2 * Config.Data.CompoundWMsCount; i < textBoxesCount; i++) { @@ -249,7 +249,7 @@ namespace TBF.Screens scaleCmpntLabel.Text = "---"; - if (currentMetersKind == MetersKind.Single) + if (currentMetersKind == MetersKind.Single || currentMetersKind == MetersKind.HeatMeter) { watermeterPictureBox1.Visible = true; watermeterPictureBox2.Visible = true; @@ -332,7 +332,7 @@ namespace TBF.Screens error1Label.Text = "---"; passed1Label.Text = "---"; - if (currentMetersKind == MetersKind.Single) + if (currentMetersKind == MetersKind.Single || currentMetersKind == MetersKind.HeatMeter) { for (int i = 0; i < textBoxesCount; i++) { @@ -450,7 +450,7 @@ namespace TBF.Screens double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv); refErrorLabel.Text = refError.ToString("F3"); - if (currentMetersKind == MetersKind.Single) + if (currentMetersKind == MetersKind.Single || currentMetersKind == MetersKind.HeatMeter) { for (int i = 0; i < Math.Min(textBoxesCount, ProcessData.RegisterReaders.Length); i++) { diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index 1d777cee1..96ebeb319 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -341,6 +341,7 @@ + @@ -1415,6 +1416,9 @@ Component + + Component + Component @@ -1773,12 +1777,6 @@ PrintOrderDocument.cs - - ProcedureDlg.cs - - - ProcedureDlg.cs - ResXFileCodeGenerator Designer @@ -1865,9 +1863,6 @@ Designer PreferencesDlg.cs - - ProcedureDlg.cs - ProcedureDlg.cs diff --git a/TestBenchFramework/UiControls/PathsHeatMetersCtrl.cs b/TestBenchFramework/UiControls/PathsHeatMetersCtrl.cs new file mode 100644 index 000000000..3309a376b --- /dev/null +++ b/TestBenchFramework/UiControls/PathsHeatMetersCtrl.cs @@ -0,0 +1,177 @@ +/// +/// Copyright (c) 2016 Sensus Metering Systems +/// +using System.Windows.Forms; +using log4net; +using TBF.Resources; + +namespace TBF.UiControls +{ + public class PathsHeatMetersCtrl : BaseWithListViewEx, ITabWithListViewEx + { + static readonly ILog log = LogManager.GetLogger(typeof(PathsHeatMetersCtrl)); + + /// + /// Fixed ListViewEx columns + /// + enum Column + { + Name, + Twarm, + Tcold, + FixedColumnsCount, + } + readonly int fixedColumnsCount = (int)Column.FixedColumnsCount; + + PathsDlg parent; + Control parentControl; + Control[] editors; + + public PathsHeatMetersCtrl() + : base() + { + } + + public void Initialize(PathsDlg parent, Control parentControl) + { + this.parent = parent; + this.parentControl = parentControl; + +#if HEAT_METERS_SUPPORT + /// Load the paths + MyItems = parent.Session + .CreateQuery("FROM HeatMetersPath ORDER BY ItemNr") + .List(); + + SubItemClicked += new SubItemEventHandler(listViewEx_SubItemClicked); + SubItemEndEditing += new SubItemEndEditingEventHandler(listViewEx_SubItemEndEditing); + + /// ListViewEx columns + TBF.LocalSettings ls = Program.LocalSettings; + Columns.Add(Strings.Name, (ls.HeatMetersColumnCount > (int)Column.Name) ? ls.HeatMetersColumnWidths[(int)Column.Name] : 60 * parent.Dpi / PathsDlg.Dpi100pct); + Columns.Add(Strings.T_warm, (ls.HeatMetersColumnCount > (int)Column.Twarm) ? ls.HeatMetersColumnWidths[(int)Column.Twarm] : 50 * parent.Dpi / PathsDlg.Dpi100pct); + Columns.Add(Strings.T_cold, (ls.HeatMetersColumnCount > (int)Column.Tcold) ? ls.HeatMetersColumnWidths[(int)Column.Tcold] : 50 * parent.Dpi / PathsDlg.Dpi100pct); + + /// Temperatures, pressures + ComboBox tWarmCBox = new ComboBox(); + ComboBox tColdCBox = new ComboBox(); + foreach (var cmpnt in parent.TbfComponents) + { + if (cmpnt is BenchControl.GenericDevices.ITempMeter) + { + tWarmCBox.Items.Add(cmpnt.Cfg.Name); + tColdCBox.Items.Add(cmpnt.Cfg.Name); + } + } + + editors = new Control[fixedColumnsCount]; + /// + editors[(int)Column.Name] = new TextBox(); /// Name + editors[(int)Column.Twarm] = tWarmCBox; + editors[(int)Column.Tcold] = tColdCBox; + /// + for (int i = 0; i < editors.Length; i++) + { + editors[i].Visible = false; + parent.Controls.Add(editors[i]); + } + + base.RedrawAll(); +#endif + } + + void listViewEx_SubItemClicked(object sender, SubItemEventArgs e) + { + if (!Unlocked || e.SubItem >= editors.Length) return; + if ((e.Item.Tag is Config.Entities.IHasItemNr) && + ((e.Item.Tag as Config.Entities.IHasItemNr).ItemNr < FixedRowsCount) && + (e.SubItem < fixedColumnsCount)) + { + return; + } + StartEditing(editors[e.SubItem], e.Item, e.SubItem); + } + + void listViewEx_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e) + { + } + + public override void DrawOne(object myItem) + { + Config.Entities.HeatMetersPath entity = (Config.Entities.HeatMetersPath)myItem; + BenchControl.HeatMetersPath path = new BenchControl.HeatMetersPath(entity, parent.TbfComponents); + + ListViewItem lvi = new ListViewItem(entity.Name); + lvi.SubItems.Add(path.TempWarm != null ? path.TempWarm.Cfg.Name : "---"); + lvi.SubItems.Add(path.TempCold != null ? path.TempCold.Cfg.Name : "---"); + + lvi.Tag = entity; + + Items.Add(lvi); + } + + public override void UpdateOne(ListViewItem lvi, object myItem) + { + Config.Entities.HeatMetersPath entity = (Config.Entities.HeatMetersPath)myItem; + + entity.Name = lvi.Text; + + entity.TempWarm = lvi.SubItems[(int)Column.Twarm].Text; + entity.TempCold = lvi.SubItems[(int)Column.Tcold].Text; + } + + /// + /// Update the entities and save them to the database + /// + public new void OkBtnClicked() + { + base.OkBtnClicked(); + +#if HEAT_METERS_SUPPORT + /// Update the database + foreach (var entity in ToBeRemovedItems) + { + Config.FluentCommon.DeleteFromDb(parent.Session, entity); + } + foreach (var entity in MyItems) + { + Config.FluentCommon.SaveToDb(parent.Session, entity); + } + + /// Update the column widths + Program.LocalSettings.HeatMetersColumnWidths = new int[Columns.Count]; + for (int i = 0; i < Columns.Count; i++) + { + Program.LocalSettings.HeatMetersColumnWidths[i] = Columns[i].Width; + } + Program.LocalSettings.Save(); +#endif + } + + public void AddOne() + { + /// Find an unused test name + string newName; + for (int nameId = 1; true; nameId++) + { + newName = Strings.New_heat_meters_path_name + nameId.ToString(); + bool notUsed = true; + foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false; + if (notUsed) break; + } + + Config.Entities.HeatMetersPath entity = new Config.Entities.HeatMetersPath(newName, MyItems.Count); + + base.AddOne(entity); + } + + public new void RemoveSelected() + { + bool lastOneRemoved = base.RemoveSelected(); + if (lastOneRemoved && parent != null) + { + parent.UpdateButtonStates(SharedButtons.SelectedItemPos.None); + } + } + } +}