'Config', 'Results' projects added, includes iPerl opto logging bug-fixes, builds OK, cannot open DB, version 2.0.158.
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
@@ -34,8 +35,8 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
readonly Entities.Procedure procedure;
|
||||
readonly IList<Entities.TestResult> allResults;
|
||||
readonly Procedure procedure;
|
||||
readonly IList<TestResult> allResults;
|
||||
readonly string tester;
|
||||
readonly DateTime dateTime;
|
||||
readonly int batchMin;
|
||||
@@ -73,8 +74,8 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
/// </summary>
|
||||
/// <param name="procedure">Procedure belonging to the results</param>
|
||||
/// <param name="allResults">Results to be printed (multiple batches)</param>
|
||||
public MyPrintDocument(Entities.Procedure procedure,
|
||||
IList<Entities.TestResult> allResults,
|
||||
public MyPrintDocument(Procedure procedure,
|
||||
IList<TestResult> allResults,
|
||||
string tester)
|
||||
{
|
||||
this.procedure = procedure;
|
||||
@@ -96,7 +97,7 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
testNames = Utils.GetDecoratedTestNames(procedure, 1);
|
||||
testsPerMeter = testNames.Count;
|
||||
|
||||
maxNrRows = (batchMax - batchMin + 1) * Program.WMsCount;
|
||||
maxNrRows = (batchMax - batchMin + 1) * Config.Data.WMsCount;
|
||||
nrColumns = testsPerMeter * resultItems.Count + 2;
|
||||
|
||||
///
|
||||
@@ -107,19 +108,19 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
for (int i = batchMin; i <= batchMax; i++)
|
||||
{
|
||||
/// Collect all results belonging to one batch
|
||||
IList<Entities.TestResult> unsortedResults = new List<Entities.TestResult>();
|
||||
IList<TestResult> unsortedResults = new List<TestResult>();
|
||||
foreach (var tr in allResults) if (tr.BatchNr == i) unsortedResults.Add(tr);
|
||||
|
||||
if (unsortedResults.Count == 0) continue;
|
||||
|
||||
for (int wmNr = 0; wmNr < Program.WMsCount; wmNr++) /// wmNr is 0-based
|
||||
for (int wmNr = 0; wmNr < Config.Data.WMsCount; wmNr++) /// wmNr is 0-based
|
||||
{
|
||||
if (!unsortedResults[0].Meters[wmNr].Disabled)
|
||||
{
|
||||
dataToPrint[nrRows, 0] = (nrRows + 1).ToString();
|
||||
dataToPrint[nrRows, 1] = unsortedResults[0].Meters[wmNr].SerialNr;
|
||||
|
||||
IList<Entities.TestResult> results =
|
||||
IList<TestResult> results =
|
||||
Utils.GetSortedTestResults(procedure, unsortedResults, Utils.PartNr(wmNr + 1, false));
|
||||
|
||||
for (int j = 0; j < testsPerMeter; j++)
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
|
||||
namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
@@ -23,8 +24,8 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
/// Data to print
|
||||
/// </summary>
|
||||
GenericDevices.IBenchInfo benchId;
|
||||
Entities.Procedure procedure;
|
||||
IList<Entities.TestResult> unsortedResults;
|
||||
Procedure procedure;
|
||||
IList<TestResult> unsortedResults;
|
||||
|
||||
public Printer()
|
||||
{
|
||||
@@ -48,8 +49,8 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(GenericDevices.IBenchInfo benchId,
|
||||
IList<GenericDevices.IWaterMeter> waterMeters,
|
||||
Entities.Procedure procedure,
|
||||
IList<Entities.TestResult> unsortedResults,
|
||||
Procedure procedure,
|
||||
IList<TestResult> unsortedResults,
|
||||
string title)
|
||||
{
|
||||
if ((procedure == null) || (unsortedResults == null) || (unsortedResults.Count < 1))
|
||||
@@ -67,7 +68,7 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
new MyPrintDocument(procedure, unsortedResults, Entities.User.CurrentUser.Name).Print();
|
||||
new MyPrintDocument(procedure, unsortedResults, User.CurrentUser.Name).Print();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PrinterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(typeof(PrinterCfg), component, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user