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
+2
View File
@@ -74,6 +74,7 @@
<Compile Include="Entities\Enums.cs" />
<Compile Include="Entities\FeedingPath.cs" />
<Compile Include="Entities\Group.cs" />
<Compile Include="Entities\HeatMetersPath.cs" />
<Compile Include="Entities\IHasItemNr.cs" />
<Compile Include="Entities\IHasValves.cs" />
<Compile Include="Entities\MeasurementCorrection.cs" />
@@ -99,6 +100,7 @@
<Compile Include="Mappings\ComponentTestMap.cs" />
<Compile Include="Mappings\FeedingPathMap.cs" />
<Compile Include="Mappings\GroupMap.cs" />
<Compile Include="Mappings\HeatMetersPathMap.cs" />
<Compile Include="Mappings\MeasurementCorrectionMap.cs" />
<Compile Include="Mappings\MetersPathMap.cs" />
<Compile Include="Mappings\MeterTestResultMap.cs" />
+1
View File
@@ -67,6 +67,7 @@ namespace Config.Entities
{
Single,
Combined,
HeatMeter,
}
public enum CompoundMeterId : byte
+39
View File
@@ -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;
}
}
}
+7 -1
View File
@@ -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;
+6 -1
View File
@@ -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)
+22
View File
@@ -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<HeatMetersPath>
{
public HeatMetersPathMap()
{
Id(x => x.Id);
Map(x => x.ItemNr);
Map(x => x.Name);
Map(x => x.TempWarm);
Map(x => x.TempCold);
}
}
#endif
}
+4 -1
View File
@@ -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);