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
This commit is contained in:
Milan Hanajik
2016-07-06 15:59:28 +02:00
parent 7cbbb2270b
commit 0ac1fe2b4e
42 changed files with 3181 additions and 2871 deletions
@@ -38,7 +38,8 @@ namespace TBF.BenchControl
static IList<Config.Entities.BenchPath> benchPaths;
static IList<Config.Entities.OutputPath> outputPaths;
static IList<Config.Entities.MetersPath> metersPaths;
public static IList<Config.Entities.TransitionSequence> TransitionSequences;
static IList<Config.Entities.HeatMetersPath> heatMetersPaths;
public static IList<Config.Entities.TransitionSequence> TransitionSequences;
/// Public components
public static Elde.ControlBoardDev ControlBoard;
@@ -324,7 +325,10 @@ namespace TBF.BenchControl
benchPaths = session.CreateQuery("FROM BenchPath ORDER BY ItemNr").List<Config.Entities.BenchPath>();
outputPaths = session.CreateQuery("FROM OutputPath ORDER BY ItemNr").List<Config.Entities.OutputPath>();
metersPaths = session.CreateQuery("FROM MetersPath ORDER BY ItemNr").List<Config.Entities.MetersPath>();
TransitionSequences = session.CreateQuery("FROM TransitionSequence ORDER BY ItemNr").List<TransitionSequence>();
TransitionSequences = session.CreateQuery("FROM TransitionSequence ORDER BY ItemNr").List<TransitionSequence>();
#if HEAT_METERS_SUPPORT
heatMetersPaths = session.CreateQuery("FROM HeatMetersPath ORDER BY ItemNr").List<Config.Entities.HeatMetersPath>();
#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)
{