(1) MunichPrintDocument fixed for three single water meters: 3 pages printed. (2) Cycle end form fixed (end state). (3) DE

This commit is contained in:
Milan Hanajik
2015-12-09 16:12:06 +01:00
parent b2c944f9b1
commit 6e6edde77f
4 changed files with 82 additions and 37 deletions
@@ -24,6 +24,10 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
public GenericDevices.IBenchInfo BenchId;
public IList<GenericDevices.IWaterMeter> WaterMeters;
public IList<TestResult> Results;
Procedure procedure;
public IList<TestResult> unsortedResults;
public string Title;
public string Version { get { return printerCfg. ProcParams.Version; } }
public string Zaehlertyp { get { return printerCfg. ProcParams.Zaehlertyp; } }
@@ -51,12 +55,14 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
public IOperation PrintResultsOp(GenericDevices.IBenchInfo benchId,
IList<GenericDevices.IWaterMeter> waterMeters,
Procedure procedure,
IList<TestResult> results,
IList<TestResult> unsortedResults,
string title)
{
this.BenchId = benchId;
this.WaterMeters = waterMeters;
this.Results = results;
this.procedure = procedure;
this.Results = unsortedResults;
this.unsortedResults = unsortedResults;
this.Title = title;
return this;
}
@@ -64,9 +70,24 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
/// <summary>Start this operation</summary>
public void Start()
{
if (Results != null && Results.Count >= 1)
if (unsortedResults != null && unsortedResults.Count > 0)
{
new MunichPrintDocument(this, printerCfg.PageOrientation).Print();
if (procedure.MetersKind == MetersKind.Single)
{
/// Single
for (int wmNr = 0; wmNr < Config.Data.WMsCount; wmNr++)
{
new MunichPrintDocument(this, procedure, unsortedResults, wmNr, printerCfg.PageOrientation).Print();
}
}
else
{
/// Compound
for (int wmNr = 0; wmNr < Config.Data.CompoundWMsCount; wmNr++)
{
new MunichPrintDocument(this, procedure, unsortedResults, wmNr, printerCfg.PageOrientation).Print();
}
}
}
}