All printers modified for new Results, other fixes and changes.
This commit is contained in:
@@ -18,28 +18,21 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
|
||||
readonly PrinterCfg printerCfg;
|
||||
|
||||
/// <summary>
|
||||
/// Data to print
|
||||
/// </summary>
|
||||
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; } }
|
||||
public string Pruefvorlage { get { return printerCfg. ProcParams.Pruefvorlage; } }
|
||||
public string Eichjahr { get { return printerCfg. ProcParams.Eichjahr; } }
|
||||
|
||||
public bool SupressPrinting { get { return false; } }
|
||||
|
||||
|
||||
public Printer()
|
||||
{
|
||||
}
|
||||
/// <summary> Data to print </summary>
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
public string Title;
|
||||
public string Version { get { return printerCfg.ProcParams.Version; } }
|
||||
public string Zaehlertyp { get { return printerCfg.ProcParams.Zaehlertyp; } }
|
||||
public string Pruefvorlage { get { return printerCfg.ProcParams.Pruefvorlage; } }
|
||||
public string Eichjahr { get { return printerCfg.ProcParams.Eichjahr; } }
|
||||
|
||||
|
||||
public Printer() { }
|
||||
|
||||
|
||||
public Printer(PrinterCfg cfg)
|
||||
: base(cfg)
|
||||
@@ -48,21 +41,14 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>Events: ResultsPrinted</summary>
|
||||
/// <param name="benchId">Procedure to print the results of</param>
|
||||
/// <param name="results">Results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(GenericDevices.IBenchInfo benchId,
|
||||
IList<GenericDevices.IWaterMeter> waterMeters,
|
||||
Procedure procedure,
|
||||
IList<TestResult> unsortedResults,
|
||||
string title)
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch, string title)
|
||||
{
|
||||
this.BenchId = benchId;
|
||||
this.WaterMeters = waterMeters;
|
||||
this.procedure = procedure;
|
||||
this.Results = unsortedResults;
|
||||
this.unsortedResults = unsortedResults;
|
||||
this.batch = batch;
|
||||
this.Title = title;
|
||||
return this;
|
||||
}
|
||||
@@ -70,24 +56,9 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (unsortedResults != null && unsortedResults.Count > 0)
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
new MunichPrintDocument(this, wm, printerCfg.PageOrientation).Print();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user