Munich : Printer clean-up and fixes, ver. 2.12.483
This commit is contained in:
@@ -247,6 +247,15 @@ namespace Config.Entities
|
|||||||
|
|
||||||
public enum ItemCategory
|
public enum ItemCategory
|
||||||
{
|
{
|
||||||
|
#if LANG_DE
|
||||||
|
[Description("Allgemein")] Other,
|
||||||
|
[Description("Prüfstanddaten")] BenchData,
|
||||||
|
[Description("Prüfstandergebnisse")] BenchResult,
|
||||||
|
[Description("Prüfpunktdaten")] TestData,
|
||||||
|
[Description("Prüfpunktergebnisse")] TestResult,
|
||||||
|
[Description("Wasserzelledaten")] MeterData,
|
||||||
|
[Description("Wasserzelleergebnisse")] MeterResult,
|
||||||
|
#else
|
||||||
[Description("Other")] Other,
|
[Description("Other")] Other,
|
||||||
[Description("Bench data")] BenchData,
|
[Description("Bench data")] BenchData,
|
||||||
[Description("Bench result")] BenchResult,
|
[Description("Bench result")] BenchResult,
|
||||||
@@ -254,6 +263,7 @@ namespace Config.Entities
|
|||||||
[Description("Test result")] TestResult,
|
[Description("Test result")] TestResult,
|
||||||
[Description("Meter data")] MeterData,
|
[Description("Meter data")] MeterData,
|
||||||
[Description("Meter result")] MeterResult,
|
[Description("Meter result")] MeterResult,
|
||||||
|
#endif
|
||||||
Count,
|
Count,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -111,10 +111,11 @@ namespace Results.Output.Printers.Munich
|
|||||||
/// <remarks>This provides the print logic for our document</remarks>
|
/// <remarks>This provides the print logic for our document</remarks>
|
||||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||||
{
|
{
|
||||||
// Run base code
|
/// Run base code
|
||||||
base.OnPrintPage(e);
|
base.OnPrintPage(e);
|
||||||
|
|
||||||
e.Graphics.DrawImageUnscaled(Results.Properties.Resources.Headpic, 0, 0);
|
/// Draw 2550 x 3507 'headpic' scaled to A4 at 100 DPI
|
||||||
|
e.Graphics.DrawImage(Results.Properties.Resources.Headpic, new Rectangle(0, 0, 827, 1137));
|
||||||
|
|
||||||
/// Set print area size and margins (in dots using 80 dpi)
|
/// Set print area size and margins (in dots using 80 dpi)
|
||||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||||
@@ -240,7 +241,7 @@ namespace Results.Output.Printers.Munich
|
|||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientHumiAve().ToString("F0") + " %");
|
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientHumiAve().ToString("F0") + " %");
|
||||||
lineNr++;
|
lineNr++;
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientPressAve().ToString("F0") + " mbar");
|
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbientPressAve()).ToString("F0") + " mbar");
|
||||||
|
|
||||||
lineNr++;
|
lineNr++;
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||||
|
|||||||
@@ -1,389 +0,0 @@
|
|||||||
///
|
|
||||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
||||||
///
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Printing;
|
|
||||||
using Config.Entities;
|
|
||||||
using TBF.BenchControl;
|
|
||||||
|
|
||||||
namespace TBF.BenchControl.ResultsPrinters.Munich
|
|
||||||
{
|
|
||||||
public class MunichPrintDocument : PrintDocument
|
|
||||||
{
|
|
||||||
const string FontFamilyName = "Arial"; //"Times New Roman";
|
|
||||||
|
|
||||||
const int SpacingOne = 18;
|
|
||||||
const int SpacingOneAndHalf = (3 * SpacingOne) / 2;
|
|
||||||
const int TitleX = 240;
|
|
||||||
const int TitleY = 180; /// Depends on the size of the header
|
|
||||||
const int FirstLineNr = 14; /// Depends on the size of the header
|
|
||||||
const int Tab1 = 80; /// Positions of columns above the table
|
|
||||||
const int Tab2 = 240;
|
|
||||||
const int Tab3 = 430;
|
|
||||||
const int Tab4 = 590;
|
|
||||||
const int BorderW = 1; /// Table border line width
|
|
||||||
const int MarginTop = 7; /// Margins of the text from table lines
|
|
||||||
const int MarginLeft = 4; /// Margins of the text from table lines
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Data to print
|
|
||||||
///
|
|
||||||
readonly string docVersion;
|
|
||||||
readonly Results.Entities.WaterMeter wm;
|
|
||||||
string zaehlertyp;
|
|
||||||
string pruefvorlage;
|
|
||||||
|
|
||||||
readonly IList<Results.Entities.MeterTestRslt> results;
|
|
||||||
readonly int resultsCount;
|
|
||||||
readonly bool compound; /// true when MetersKind is MetersKind.Combined
|
|
||||||
|
|
||||||
readonly int secondTableOffset; /// Calculated in the constructor
|
|
||||||
|
|
||||||
/// Top coordinate of the table
|
|
||||||
int top;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Property variable for the Font the user wishes to use
|
|
||||||
/// </summary>
|
|
||||||
Font font;
|
|
||||||
Font boldFont;
|
|
||||||
Font fontTitle;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="textToPrint">Text to be printed</param>
|
|
||||||
public MunichPrintDocument(string docVersion,
|
|
||||||
Results.Entities.WaterMeter wm,
|
|
||||||
PageOrientation pageOrientation)
|
|
||||||
{
|
|
||||||
this.docVersion = docVersion;
|
|
||||||
this.wm = wm;
|
|
||||||
compound = wm.Compound();
|
|
||||||
|
|
||||||
string[] info = wm.ProductName().Split(new char[] { ';' });
|
|
||||||
if (info.Length >= 2)
|
|
||||||
{
|
|
||||||
pruefvorlage = info[0];
|
|
||||||
zaehlertyp = info[1];
|
|
||||||
}
|
|
||||||
else if (info.Length == 1)
|
|
||||||
{
|
|
||||||
pruefvorlage = info[0];
|
|
||||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pruefvorlage = wm.ProcedureName();
|
|
||||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
|
||||||
}
|
|
||||||
|
|
||||||
results = wm.MeterTestRslts;
|
|
||||||
this.resultsCount = compound ? (results.Count / 3) : results.Count;
|
|
||||||
|
|
||||||
int resultsCount = wm.MeterTestRslts.Count;
|
|
||||||
if (compound) resultsCount /= 3;
|
|
||||||
|
|
||||||
secondTableOffset = (resultsCount + 2) * SpacingOneAndHalf;
|
|
||||||
|
|
||||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Override the default onbeginPrint method of the PrintDocument Object.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name=e></param>
|
|
||||||
/// <remarks></remarks>
|
|
||||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnBeginPrint(e);
|
|
||||||
|
|
||||||
if (font == null) { font = new Font(FontFamilyName, 10, FontStyle.Regular); }
|
|
||||||
if (boldFont == null) { boldFont = new Font(FontFamilyName, 10, FontStyle.Bold); }
|
|
||||||
if (fontTitle == null) { fontTitle = new Font(FontFamilyName, 24, FontStyle.Bold); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Override the default OnPrintPage method of the PrintDocument.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name=e></param>
|
|
||||||
/// <remarks>This provides the print logic for our document</remarks>
|
|
||||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
|
||||||
{
|
|
||||||
// Run base code
|
|
||||||
base.OnPrintPage(e);
|
|
||||||
|
|
||||||
e.Graphics.DrawImageUnscaled(Properties.Resources.Headpic, 0, 0);
|
|
||||||
|
|
||||||
/// Set print area size and margins (in dots using 80 dpi)
|
|
||||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
|
||||||
int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
|
||||||
int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
|
||||||
int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
|
||||||
|
|
||||||
/// Check if the user selected to print in Landscape mode
|
|
||||||
/// if they did then we need to swap height/width parameters
|
|
||||||
if (base.DefaultPageSettings.Landscape)
|
|
||||||
{
|
|
||||||
int tmp = printHeight;
|
|
||||||
printHeight = printWidth;
|
|
||||||
printWidth = tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
int x = leftMargin;
|
|
||||||
int y = topMargin;
|
|
||||||
|
|
||||||
/// Use the StringFormat class for the text layout of our document
|
|
||||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
|
||||||
|
|
||||||
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
|
|
||||||
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
|
|
||||||
|
|
||||||
int lineNr = FirstLineNr;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
|
|
||||||
lineNr++;
|
|
||||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
|
|
||||||
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
|
|
||||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
|
|
||||||
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
|
|
||||||
lineNr += 2;
|
|
||||||
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
|
|
||||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
|
|
||||||
lineNr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
|
|
||||||
}
|
|
||||||
lineNr++;
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
|
|
||||||
}
|
|
||||||
lineNr++;
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qn :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Qn :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
|
|
||||||
}
|
|
||||||
lineNr++;
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
|
|
||||||
}
|
|
||||||
lineNr++;
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
|
|
||||||
}
|
|
||||||
lineNr++;
|
|
||||||
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
|
|
||||||
|
|
||||||
lineNr += 2;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
|
|
||||||
}
|
|
||||||
|
|
||||||
lineNr += 2;
|
|
||||||
top = SpacingOne * lineNr;
|
|
||||||
|
|
||||||
PrintTable(e);
|
|
||||||
DrawTable(e);
|
|
||||||
|
|
||||||
lineNr += (secondTableOffset * 2) / SpacingOne;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Temperatur");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientTempAve().ToString("F1") + " \x00b0C");
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Feuchtigkeit");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientHumiAve().ToString("F0") + " %");
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
|
||||||
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbientPressAve()).ToString("F0") + " mbar");
|
|
||||||
|
|
||||||
lineNr++;
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
|
||||||
lineNr ++;
|
|
||||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Datum");
|
|
||||||
PrintAt(e, Tab4, lineNr * SpacingOne, "Unterschrift");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Print table texts.
|
|
||||||
/// </summary>
|
|
||||||
void PrintTable(System.Drawing.Printing.PrintPageEventArgs e)
|
|
||||||
{
|
|
||||||
PrintAt(e, FromTest(-1, -1), "Prüflauf");
|
|
||||||
PrintAt(e, FromTest(-1, 0), "Q [l/h]");
|
|
||||||
PrintAt(e, FromTest(-1, 1), "Prüf-Vol.[l]");
|
|
||||||
PrintAt(e, FromTest(-1, 2), compound ? "HZ-Vol.[l]" : "Z-Vol.[l]");
|
|
||||||
PrintAt(e, FromTest(-1, 3), compound ? "NZ-Vol.[l]" : "-");
|
|
||||||
PrintAt(e, FromTest(-1, 4), "Fehler [%]");
|
|
||||||
PrintAt(e, FromTest(-1, 5), "Ergebnis");
|
|
||||||
|
|
||||||
PrintAt(e, FromTest(-1, 6), "Q [l/h]");
|
|
||||||
PrintAt(e, FromTest(-1, 7), "Temperatur");
|
|
||||||
PrintAt(e, FromTest(-1, 8), "Dichte");
|
|
||||||
PrintAt(e, FromTest(-1, 9), "Prüfzeit");
|
|
||||||
PrintAt(e, FromTest(-1, 10), "Druck Eing.");
|
|
||||||
PrintAt(e, FromTest(-1, 11), "Druck Ausg.");
|
|
||||||
|
|
||||||
int rowCnt = 0;
|
|
||||||
foreach (var mtr in wm.MeterTestRslts)
|
|
||||||
{
|
|
||||||
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
|
|
||||||
{
|
|
||||||
Point p = FromTest(rowCnt, -1);
|
|
||||||
PrintAt(e, p.X, p.Y, mtr.Name());
|
|
||||||
PrintAt(e, p.X, p.Y + (resultsCount + 2) * SpacingOneAndHalf, mtr.Name());
|
|
||||||
|
|
||||||
PrintAt(e, FromTest(rowCnt, 0), mtr.TestRslt.FlowMass.ToString("F1"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 1), mtr.TestRslt.VolumeCTV.ToString("F2"));
|
|
||||||
if (compound)
|
|
||||||
{
|
|
||||||
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
|
|
||||||
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
|
|
||||||
|
|
||||||
PrintAt(e, FromTest(rowCnt, 2), mainMtr.VolumeMeter.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 3), auxMtr.VolumeMeter.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PrintAt(e, FromTest(rowCnt, 2), mtr.VolumeMeter.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 3), "-");
|
|
||||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
|
||||||
}
|
|
||||||
PrintAt(e, FromTest(rowCnt, 6), mtr.TestRslt.FlowMass.ToString("F1"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempDownMean.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 8), mtr.TestRslt.DensityDiv.ToString("F2"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 9), mtr.TestTime.ToString("F1"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 10), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"));
|
|
||||||
PrintAt(e, FromTest(rowCnt, 11), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3"));
|
|
||||||
|
|
||||||
rowCnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Draw table lines.
|
|
||||||
/// </summary>
|
|
||||||
void DrawTable(System.Drawing.Printing.PrintPageEventArgs e)
|
|
||||||
{
|
|
||||||
int mid = top + SpacingOneAndHalf;
|
|
||||||
int bot = top + (resultsCount + 1) * SpacingOneAndHalf;
|
|
||||||
|
|
||||||
int top2 = top + secondTableOffset;
|
|
||||||
int mid2 = mid + secondTableOffset;
|
|
||||||
int bot2 = bot + secondTableOffset;
|
|
||||||
|
|
||||||
// Horizontal lines
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top), new Point(747, top));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid), new Point(747, mid));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot), new Point(747, bot));
|
|
||||||
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top2), new Point(747, top2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid2), new Point(747, mid2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot2), new Point(747, bot2));
|
|
||||||
|
|
||||||
// Vertical lines
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top), new Point( 80, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top), new Point(267, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top), new Point(347, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top), new Point(427, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top), new Point(507, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top), new Point(587, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top), new Point(667, bot));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top), new Point(747, bot));
|
|
||||||
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top2), new Point( 80, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top2), new Point(267, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top2), new Point(347, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top2), new Point(427, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top2), new Point(507, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top2), new Point(587, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top2), new Point(667, bot2));
|
|
||||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top2), new Point(747, bot2));
|
|
||||||
}
|
|
||||||
|
|
||||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
|
||||||
{
|
|
||||||
PrintAt(e, p.X, p.Y, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
|
||||||
{
|
|
||||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
|
||||||
e.Graphics.DrawString(text, this.font, Brushes.Black, printArea);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
|
||||||
{
|
|
||||||
PrintBoldAt(e, p.X, p.Y, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
|
||||||
{
|
|
||||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
|
||||||
e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea);
|
|
||||||
}
|
|
||||||
|
|
||||||
Point FromTest(int testNr, int parNr)
|
|
||||||
{
|
|
||||||
const int NrParamsInOneTableRow = 6;
|
|
||||||
|
|
||||||
int x = 267 + (parNr % NrParamsInOneTableRow) * 80 + MarginLeft;
|
|
||||||
int y = top + SpacingOneAndHalf + MarginTop + testNr * SpacingOneAndHalf
|
|
||||||
+ ((parNr >= NrParamsInOneTableRow) ? secondTableOffset : 0);
|
|
||||||
|
|
||||||
if (parNr < 0) x = 80 + MarginLeft; /// When parNr == -1 return the left column x coordinate
|
|
||||||
|
|
||||||
return new Point(x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -54,7 +54,7 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
|||||||
{
|
{
|
||||||
foreach (var wm in batch.WaterMeters)
|
foreach (var wm in batch.WaterMeters)
|
||||||
{
|
{
|
||||||
new MunichPrintDocument(printerCfg.Version, wm, printerCfg.PageOrientation).Print();
|
new Results.Output.Printers.Munich.MunichPrintDocument(printerCfg.Version, wm, printerCfg.PageOrientation).Print();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ namespace TBF.Forms
|
|||||||
}
|
}
|
||||||
foreach (var wm in b.WaterMeters)
|
foreach (var wm in b.WaterMeters)
|
||||||
{
|
{
|
||||||
new TBF.BenchControl.ResultsPrinters.Munich.MunichPrintDocument(docVersion, wm, Config.Entities.PageOrientation.Portrait).Print();
|
new Results.Output.Printers.Munich.MunichPrintDocument(docVersion, wm, Config.Entities.PageOrientation.Portrait).Print();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.12.482.1")]
|
[assembly: AssemblyVersion("2.12.483.1")]
|
||||||
[assembly: AssemblyFileVersion("2.12.482.1")]
|
[assembly: AssemblyFileVersion("2.12.483.1")]
|
||||||
|
|||||||
-10
@@ -60,16 +60,6 @@ namespace TBF.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Headpic {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Headpic", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -130,9 +130,6 @@
|
|||||||
<data name="TestPassedImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="TestPassedImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\TestPassedImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\TestPassedImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Headpic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\Headpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="TestFailedImage2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="TestFailedImage2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\TestFailedImage2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\TestFailedImage2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
@@ -1165,9 +1165,6 @@
|
|||||||
<Compile Include="BenchControl\ResultsPrinters\Basic\BasicPrintDocument.cs">
|
<Compile Include="BenchControl\ResultsPrinters\Basic\BasicPrintDocument.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BenchControl\ResultsPrinters\Munich\MunichPrintDocument.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="BenchControl\ResultsPrinters\Munich\Printer.cs" />
|
<Compile Include="BenchControl\ResultsPrinters\Munich\Printer.cs" />
|
||||||
<Compile Include="BenchControl\ResultsPrinters\Munich\PrinterCfg.cs" />
|
<Compile Include="BenchControl\ResultsPrinters\Munich\PrinterCfg.cs" />
|
||||||
<Compile Include="BenchControl\ResultsPrinters\Munich\PrinterCfgCtrl.cs">
|
<Compile Include="BenchControl\ResultsPrinters\Munich\PrinterCfgCtrl.cs">
|
||||||
@@ -2378,7 +2375,6 @@
|
|||||||
<None Include="Resources\TestFailedImage.png" />
|
<None Include="Resources\TestFailedImage.png" />
|
||||||
<None Include="Resources\TestPassedImage.png" />
|
<None Include="Resources\TestPassedImage.png" />
|
||||||
<None Include="Resources\TestNotDoneImage.png" />
|
<None Include="Resources\TestNotDoneImage.png" />
|
||||||
<None Include="Resources\Headpic.png" />
|
|
||||||
<None Include="Resources\TestPassedImage2.png" />
|
<None Include="Resources\TestPassedImage2.png" />
|
||||||
<None Include="Resources\TestFailedImage2.png" />
|
<None Include="Resources\TestFailedImage2.png" />
|
||||||
<Content Include="SampleConfig\config.xml">
|
<Content Include="SampleConfig\config.xml">
|
||||||
|
|||||||
Reference in New Issue
Block a user