From 615b3409be93e7533e93fd1420a8ff30fb05612d Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 6 Mar 2018 18:37:43 +0100 Subject: [PATCH] OnePerMeterPrintDocument changes. --- Config/Entities/Enums.cs | 7 + Config/Properties/AssemblyInfo.cs | 4 +- .../OnePerMeter/OnePerMeterPrintDocument.cs | 270 ++++++++---------- Results/Output/Printers/PrintersCommon.cs | 225 +++++++++++++++ Results/Results.csproj | 3 + 5 files changed, 350 insertions(+), 159 deletions(-) create mode 100644 Results/Output/Printers/PrintersCommon.cs diff --git a/Config/Entities/Enums.cs b/Config/Entities/Enums.cs index 2e808642b..a016b6896 100644 --- a/Config/Entities/Enums.cs +++ b/Config/Entities/Enums.cs @@ -374,6 +374,13 @@ namespace Config.Entities Count } + public enum VertAlignment + { + [Description("Top")] Top, + [Description("Middle")] Middle, + [Description("Bottom")] Bottom, + } + public enum ImageRotation { [Description("0 deg")] None, diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index 081ffcf3c..5df025a8e 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.18.797.0")] -[assembly: AssemblyFileVersion("2.18.797.0")] +[assembly: AssemblyVersion("2.18.827.0")] +[assembly: AssemblyFileVersion("2.18.827.0")] diff --git a/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs b/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs index 336626428..a3cf29929 100644 --- a/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs +++ b/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs @@ -11,7 +11,7 @@ using Results.Resources; namespace Results.Output.Printers.OnePerMeter { - public class OnePerMeterPrintDocument : PrintDocument + public class OnePerMeterPrintDocument : PrintersCommon { const float GapBetweenTableColumns = 10; const float GapBetweenCommonColumns = 10; @@ -198,53 +198,92 @@ namespace Results.Output.Printers.OnePerMeter /// Write aligned columns for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++) { - PrintAt(e, leftMargin, commonTop + spacingOne * i, maxWidth, leftColumn[i], font, Alignment.Left); - PrintAt(e, leftMargin + maxWidth + GapBetweenCommonColumns, commonTop + spacingOne * i, 0, rightColumn[i], font, Alignment.Left); + PrintAt(e, leftColumn[i], font, leftMargin, commonTop + spacingOne * i, maxWidth, 0, Alignment.Left, VertAlignment.Top); + PrintAt(e, rightColumn[i], font, leftMargin + maxWidth + GapBetweenCommonColumns, commonTop + spacingOne * i, 0, 0, Alignment.Left, VertAlignment.Top); } } /// /// Body /// + IList tableRows; + IList horizAlignment; + IList vertAlignment; if (pageNr == 1) { - string[] tableHeader; - IList tableRows; - Alignment[] itemAlignment; - /// /// Prepare table content: tableHeader + tableRows + itemAlignment /// if (cfg.TestsAreRows) { - GetContentTestsAreRows(wm, testItems, out tableHeader, out tableRows, out itemAlignment); + GetContentTestsAreRows(wm, testItems, out tableRows, out horizAlignment, out vertAlignment); + DrawTable(e, (float)leftMargin, bodyTop, tableRows, horizAlignment, vertAlignment, + new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + TopHeadersCount = 1, + HorizLines = TableLines.All, + VertLines = TableLines.All + }); } else { - GetContentTestsAreColumns(wm, testItems, out tableHeader, out tableRows, out itemAlignment); + GetContentTestsAreColumns(wm, testItems, out tableRows, out horizAlignment, out vertAlignment); + DrawTable(e, (float)leftMargin, bodyTop, tableRows, horizAlignment, vertAlignment, + new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + LeftHeadersCount = 1, + HorizLines = TableLines.All, + VertLines = TableLines.All + }); } - - DrawTable(e, (float)leftMargin, bodyTop, tableHeader, tableRows, itemAlignment); } else { - string[] tableHeader; - IList tableRows; - Alignment[] itemAlignment; - /// /// Prepare table content: tableHeader + tableRows + itemAlignment /// if (cfg.TestsAreRows2) { - GetContentTestsAreRows(wm, testItems2, out tableHeader, out tableRows, out itemAlignment); + GetContentTestsAreRows(wm, testItems2, out tableRows, out horizAlignment, out vertAlignment); + DrawTable(e, (float)leftMargin, bodyTop, tableRows, horizAlignment, vertAlignment, + new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + TopHeadersCount = 1, + HorizLines = TableLines.All, + VertLines = TableLines.All + }); } else { - GetContentTestsAreColumns(wm, testItems2, out tableHeader, out tableRows, out itemAlignment); + GetContentTestsAreColumns(wm, testItems2, out tableRows, out horizAlignment, out vertAlignment); + DrawTable(e, (float)leftMargin, bodyTop, tableRows, horizAlignment, vertAlignment, + new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + LeftHeadersCount = 1, + HorizLines = TableLines.All, + VertLines = TableLines.All + }); } - - DrawTable(e, (float)leftMargin, (float)topMargin, tableHeader, tableRows, itemAlignment); } if (pageNr == nrPages) @@ -253,7 +292,7 @@ namespace Results.Output.Printers.OnePerMeter /// Footer on the last page /// float footerWidth = e.Graphics.MeasureString(footer, footerFont).Width; - PrintAt(e, leftMargin, topMargin + printHeight - 2 * spacingOne, 0, footer, footerFont, Alignment.Left); + PrintAt(e, footer, footerFont, leftMargin, topMargin + printHeight - 2 * spacingOne, 0, 0, Alignment.Left, VertAlignment.Top); } /// @@ -261,7 +300,7 @@ namespace Results.Output.Printers.OnePerMeter /// string pageNrText = string.Format("{0} {1}/{2}", Strings.Page, pageNr, nrPages); float pageNrWidth = e.Graphics.MeasureString(pageNrText, font).Width; - PrintAt(e, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - spacingOne, 0, pageNrText, font, Alignment.Left); + PrintAt(e, pageNrText, font, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - spacingOne, 0, 0, Alignment.Left, VertAlignment.Top); e.HasMorePages = !(pageNr == nrPages); @@ -269,75 +308,104 @@ namespace Results.Output.Printers.OnePerMeter } - void GetContentTestsAreRows(Results.Entities.WaterMeter wm, IList items, out string[] tableHeader, out IList tableRows, out Alignment[] itemAlignment) + void GetContentTestsAreRows(Results.Entities.WaterMeter wm, IList items, + out IList tableRows, out IList horizAlignments, out IList vertAlignments) { + /// Top row contains column captions + int tableColumnsCount = items.Count; tableRows = new List(); - tableHeader = new string[tableColumnsCount]; - itemAlignment = new Alignment[tableColumnsCount]; + horizAlignments = new List(); + vertAlignments = new List(); + + string[] tableHeader = new string[tableColumnsCount]; + Alignment[] horizAlignment = new Alignment[tableColumnsCount]; + VertAlignment[] vertAlignment = new VertAlignment[tableColumnsCount]; for (int i = 0; i < tableColumnsCount; i++) { tableHeader[i] = items[i].Caption; - itemAlignment[i] = items[i].Alignment; + horizAlignment[i] = Alignment.Center; + vertAlignment[i] = VertAlignment.Middle; } + tableRows.Add(tableHeader); + horizAlignments.Add(horizAlignment); + vertAlignments.Add(vertAlignment); - WMeterRsltItemSpec.TableRowNr = 0; + WMeterRsltItemSpec.TableRowNr = 1; foreach (var mtr in wm.MeterTestRslts) { if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) { string[] oneTableRow = new string[tableColumnsCount]; - WMeterRsltItemSpec.TableRowNr++; + horizAlignment = new Alignment[tableColumnsCount]; + vertAlignment = new VertAlignment[tableColumnsCount]; for (int i = 0; i < tableColumnsCount; i++) { WMeterRsltItemSpec.TableColumnNr = i + 1; oneTableRow[i] = items[i].Print(wm, mtr.Name()).Split(new char[] { '|' })[0]; + horizAlignment[i] = items[i].Alignment; + vertAlignment[i] = VertAlignment.Middle; } tableRows.Add(oneTableRow); + horizAlignments.Add(horizAlignment); + vertAlignments.Add(vertAlignment); + + WMeterRsltItemSpec.TableRowNr++; } } } - void GetContentTestsAreColumns(Results.Entities.WaterMeter wm, IList items, out string[] tableHeader, out IList tableRows, out Alignment[] itemAlignment) + void GetContentTestsAreColumns(Results.Entities.WaterMeter wm, IList items, + out IList tableRows, out IList horizAlignments, out IList vertAlignments) { - int tableColumnsCount = 1; + /// Left column contains row captions + + /// + /// Calculate columns count + /// + int tableColumnsCount = 1; /// Left column contains item caption foreach (var mtr in wm.MeterTestRslts) { if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) { - tableColumnsCount++; + tableColumnsCount++; /// One additional column for each test to be published } } + /// + /// Alignment of columns + /// tableRows = new List(); - tableHeader = new string[tableColumnsCount]; - itemAlignment = new Alignment[tableColumnsCount]; - - tableHeader[0] = string.Empty; - itemAlignment[0] = Alignment.Left; + horizAlignments = new List(); + vertAlignments = new List(); + int columnsCount = 1; foreach (var mtr in wm.MeterTestRslts) { if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) { - tableHeader[columnsCount] = mtr.Name(); - itemAlignment[columnsCount] = Alignment.Left; columnsCount++; } } - WMeterRsltItemSpec.TableRowNr = 0; + /// + /// Table content + /// + WMeterRsltItemSpec.TableRowNr = 1; for (int i = 0; i < items.Count; i++) { string[] oneTableRow = new string[tableColumnsCount]; - WMeterRsltItemSpec.TableRowNr++; + Alignment[] horizAlignment = new Alignment[tableColumnsCount]; + VertAlignment[] vertAlignment = new VertAlignment[tableColumnsCount]; oneTableRow[0] = items[i].Caption; + horizAlignment[0] = Alignment.Center; + vertAlignment[0] = VertAlignment.Middle; WMeterRsltItemSpec.TableColumnNr = 1; foreach (var mtr in wm.MeterTestRslts) @@ -347,130 +415,18 @@ namespace Results.Output.Printers.OnePerMeter /// Strip color information oneTableRow[WMeterRsltItemSpec.TableColumnNr] = items[i].Print(wm, mtr.Name()).Split(new char[] { '|' })[0]; + horizAlignment[WMeterRsltItemSpec.TableColumnNr] = items[i].Alignment; + vertAlignment[WMeterRsltItemSpec.TableColumnNr] = VertAlignment.Middle; + WMeterRsltItemSpec.TableColumnNr++; } } tableRows.Add(oneTableRow); - } - } + horizAlignments.Add(horizAlignment); + vertAlignments.Add(vertAlignment); - - float DrawTable(System.Drawing.Printing.PrintPageEventArgs e, float left, float top, string[] header, IList rows, Alignment[] alignment) - { - int tblColumnsCount = header.Length; - - float[] columnWidth = new float[tblColumnsCount]; - float[] columnPos = new float[tblColumnsCount + 1]; - columnPos[0] = left; - - /// - /// Measure table column widths and header height - /// - float headerHeight = 0; - for (int i = 0; i < tblColumnsCount; i++) - { - SizeF size = e.Graphics.MeasureString(header[i], headerFont); - columnWidth[i] = (int)(size.Width + 0.99f); - if (size.Height > headerHeight) headerHeight = (int)(size.Height + 0.99f); - - foreach (var tableRow in rows) - { - int width = (int)(e.Graphics.MeasureString(tableRow[i], font).Width + 0.99f); - if (width > columnWidth[i]) columnWidth[i] = width; - } - columnPos[i + 1] = columnPos[i] + columnWidth[i] + GapBetweenTableColumns; - } - - float tableLeftX = columnPos[0]; - float tableRightX = columnPos[tblColumnsCount] - GapBetweenTableColumns; - - /// Horizontal line - float horY = top + 1.5f * spacingOne4Header; - e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY)); - - /// - /// Draw table header - /// - for (int i = 0; i < tblColumnsCount; i++) - { - PrintAt(e, columnPos[i], - top + 1.7f * spacingOne4Header, - columnWidth[i], - header[i], - headerFont, - Alignment.Center); - } - /// Horizontal line - horY = top + 2.1f * spacingOne4Header + headerHeight; - e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY)); - - /// - /// Draw table body - /// - int rowsCount = 0; - foreach (var oneTableRow in rows) - { - for (int i = 0; i < tblColumnsCount; i++) - { - PrintAt(e, columnPos[i], - horY + 0.2f * spacingOne4Header + spacingOne * rowsCount, - columnWidth[i], - oneTableRow[i], - font, - alignment[i]); - } - rowsCount++; - } - - /// Horizontal line - horY = horY + spacingOne * rowsCount + (3 * spacingOne4Header / 10); - e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY)); - - return horY - top + spacingOne; - } - - - static Font lastFont = null; - static float lastSpacing = 0; - - SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e, string paragraph, Font font) - { - if (font != lastFont) - { - lastFont = font; - lastSpacing = e.Graphics.MeasureString("Abcgq", font).Height; - } - - string[] lines = paragraph.Split(new char[] { '~' }); - float width = 0; - foreach (var line in lines) - { - float lineWid = e.Graphics.MeasureString(line, font).Width; - if (lineWid > width) width = lineWid; - } - - return new SizeF(width, 0.8f * lines.Length * lastSpacing + 0.2f); - } - - - void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, float x, float y, float width, string paragraph, Font font, Alignment alignment) - { - SizeF size = Measure(e, paragraph, font); - - string[] lines = paragraph.Split(new char[] { '~' }); - foreach (var line in lines) - { - float xx; - switch (alignment) - { - default: - case Alignment.Left: xx = x; break; - case Alignment.Center: xx = x + (width - e.Graphics.MeasureString(line, font).Width) / 2; break; - case Alignment.Right: xx = x + width - e.Graphics.MeasureString(line, font).Width; break; - } - e.Graphics.DrawString(line, font, Brushes.Black, new PointF(xx, y)); - y += 0.8f * lastSpacing; + WMeterRsltItemSpec.TableRowNr++; } } } diff --git a/Results/Output/Printers/PrintersCommon.cs b/Results/Output/Printers/PrintersCommon.cs new file mode 100644 index 000000000..949cb01ad --- /dev/null +++ b/Results/Output/Printers/PrintersCommon.cs @@ -0,0 +1,225 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Printing; +using Config.Entities; + +namespace Results.Output.Printers +{ + public enum TableLines + { + None, + FirstAndLast, + FirstSecondAndLast, + All, + } + + public class TableStyle + { + public float MarginX; + public float MarginY; + public Font Font; + public Font HeaderFont; + public int TopHeadersCount; + public int LeftHeadersCount; + public float LineWidth; + public TableLines HorizLines; + public TableLines VertLines; + } + + public class PrintersCommon : PrintDocument + { + protected SizeF MeasureTable(System.Drawing.Printing.PrintPageEventArgs e, IList rows, TableStyle tableStyle) + { + SizeF retVal = new SizeF(0, 0); + + if (rows == null || rows.Count == 0) return retVal; + + int tblColumnsCount = rows[0].Length; + + float[] columnWidth = new float[tblColumnsCount]; + float[] rowHeight = new float[rows.Count]; + + /// + /// Measure table column widths and header height + /// + for (int colIx = 0; colIx < tblColumnsCount; colIx++) + { + for (int rowIx = 0; rowIx < rows.Count; rowIx++) + { + bool isHeader = (colIx < tableStyle.LeftHeadersCount) || (rowIx < tableStyle.TopHeadersCount); + SizeF size = Measure(e, rows[rowIx][colIx], isHeader ? tableStyle.HeaderFont : tableStyle.Font); + if (size.Width > columnWidth[colIx]) columnWidth[colIx] = size.Width; + if (size.Height > rowHeight[rowIx]) rowHeight[rowIx] = size.Height; + } + retVal.Width += columnWidth[colIx] + 2 * tableStyle.MarginX; + } + for (int rowIx = 0; rowIx < rows.Count; rowIx++) + { + retVal.Height += rowHeight[rowIx] + 2 * tableStyle.MarginY; + } + + return retVal; + } + + + protected float DrawTable(System.Drawing.Printing.PrintPageEventArgs e, float left, float top, IList rows, + IList horizAlignments, IList vertAlignments, TableStyle tableStyle) + { + if (rows == null || rows.Count == 0) return top; + + int tblColumnsCount = rows[0].Length; + float[] columnWidth = new float[tblColumnsCount]; + float[] columnPos = new float[tblColumnsCount + 1]; + float[] rowHeight = new float[rows.Count]; + float[] rowPos = new float[rows.Count + 1]; + + /// + /// Measure table column widths and header height + /// + columnPos[0] = left; + rowPos[0] = top; + for (int colIx = 0; colIx < tblColumnsCount; colIx++) + { + for (int rowIx = 0; rowIx < rows.Count; rowIx++) + { + bool isHeader = (colIx < tableStyle.LeftHeadersCount) || (rowIx < tableStyle.TopHeadersCount); + SizeF size = Measure(e, rows[rowIx][colIx], isHeader ? tableStyle.HeaderFont : tableStyle.Font); + if (size.Width > columnWidth[colIx]) columnWidth[colIx] = size.Width; + if (size.Height > rowHeight[rowIx]) rowHeight[rowIx] = size.Height; + } + columnPos[colIx + 1] = columnPos[colIx] + columnWidth[colIx] + 2 * tableStyle.MarginX + tableStyle.LineWidth; + } + for (int rowIx = 0; rowIx < rows.Count; rowIx++) + { + rowPos[rowIx + 1] = rowPos[rowIx] + rowHeight[rowIx] + 2 * tableStyle.MarginY + tableStyle.LineWidth; + } + + /// Horizontal lines + float tableLeftX = left; + float tableRightX = columnPos[tblColumnsCount] + tableStyle.LineWidth; + if (tableStyle.HorizLines != TableLines.None) + { + for (int rowIx = 0; rowIx <= rows.Count; rowIx++) + { + if (tableStyle.HorizLines == TableLines.All || rowIx == 0 || rowIx == rows.Count || (tableStyle.HorizLines == TableLines.FirstSecondAndLast && rowIx == 1)) + { + e.Graphics.DrawLine(new Pen(Color.Black, tableStyle.LineWidth), new PointF(tableLeftX, rowPos[rowIx] + tableStyle.LineWidth / 2), new PointF(tableRightX, rowPos[rowIx] + tableStyle.LineWidth / 2)); + } + } + } + + /// Vertical lines + float tableTopY = top; + float tableBottomY = rowPos[rows.Count] + tableStyle.LineWidth; + if (tableStyle.VertLines != TableLines.None) + { + for (int colIx = 0; colIx <= tblColumnsCount; colIx++) + { + if (tableStyle.VertLines == TableLines.All || colIx == 0 || colIx == rows.Count || (tableStyle.VertLines == TableLines.FirstSecondAndLast && colIx == 1)) + { + e.Graphics.DrawLine(new Pen(Color.Black, tableStyle.LineWidth), new PointF(columnPos[colIx] + tableStyle.LineWidth / 2, tableTopY), new PointF(columnPos[colIx] + tableStyle.LineWidth / 2, tableBottomY)); + } + } + } + + /// + /// Draw table body + /// + for (int rowIndex = 0; rowIndex < rows.Count; rowIndex++) + { + string[] oneTableRow = rows[rowIndex]; + Alignment[] horizAlignment = horizAlignments[(horizAlignments.Count > rowIndex) ? rowIndex : 0]; + VertAlignment[] vertAlignment = vertAlignments[(vertAlignments.Count > rowIndex) ? rowIndex : 0]; + for (int colIndex = 0; colIndex < tblColumnsCount; colIndex++) + { + bool isHeader = (colIndex < tableStyle.LeftHeadersCount) || (rowIndex < tableStyle.TopHeadersCount); + PrintAt(e, oneTableRow[colIndex], + isHeader ? tableStyle.HeaderFont : tableStyle.Font, + columnPos[colIndex] + tableStyle.MarginX + tableStyle.LineWidth, + rowPos[rowIndex] + tableStyle.MarginY, + columnWidth[colIndex], + rowHeight[rowIndex], + horizAlignment[colIndex], + vertAlignment[colIndex]); + } + } + + return tableBottomY; + } + + + static Font lastFont = null; + static float lastSpacing = 0; + + /// + /// Measure the size of a paragraph of text, lines are separated by '~'. + /// + /// PrintPageEventArgs + /// Text, lines are separated by '~' + /// Font + /// Size of the paragraph of text + protected SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e, string text, Font font) + { + if (font != lastFont) + { + lastFont = font; + lastSpacing = e.Graphics.MeasureString("Abcgq", font).Height; + } + + string[] lines = text.Split(new char[] { '~' }); + float width = 0; + foreach (var line in lines) + { + float lineWid = e.Graphics.MeasureString(line, font).Width; + if (lineWid > width) width = lineWid; + } + + return new SizeF(width, 0.8f * lines.Length * lastSpacing + 0.2f); + } + + /// + /// Print a paragraph of text, lines are separated by '~'. + /// + /// PrintPageEventArgs + /// Text, lines are separated by '~' + /// Font + /// Position x + /// Position y + /// Width (required when alignment=Alignment.Center or alignment=Aligmenr.Right + /// Height, 0 = no vertical centering + /// Horizontal alignment + /// Vertical alignment + protected void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, string text, Font font, + float x, float y, float width, float height, Alignment horizAlignment, VertAlignment vertAlignment) + { + SizeF size = Measure(e, text, font); + + string[] lines = text.Split(new char[] { '~' }); + + if (height <= size.Height) vertAlignment = VertAlignment.Top; + float y0; + switch (vertAlignment) + { + default: + case VertAlignment.Top: y0 = y; break; + case VertAlignment.Middle: y0 = y + (height - size.Height) / 2; break; + case VertAlignment.Bottom: y0 = y + (height - size.Height); break; + } + + foreach (var line in lines) + { + float x0; + switch (horizAlignment) + { + default: + case Alignment.Left: x0 = x; break; + case Alignment.Center: x0 = x + (width - e.Graphics.MeasureString(line, font).Width) / 2; break; + case Alignment.Right: x0 = x + width - e.Graphics.MeasureString(line, font).Width; break; + } + e.Graphics.DrawString(line, font, Brushes.Black, new PointF(x0, y0)); + y0 += 0.8f * lastSpacing; + } + } + } +} diff --git a/Results/Results.csproj b/Results/Results.csproj index cc89a2beb..c32d7bef0 100644 --- a/Results/Results.csproj +++ b/Results/Results.csproj @@ -104,6 +104,9 @@ Component + + Component + Component