diff --git a/Config/Entities/Enums.cs b/Config/Entities/Enums.cs index a016b6896..79fc63a7a 100644 --- a/Config/Entities/Enums.cs +++ b/Config/Entities/Enums.cs @@ -381,6 +381,15 @@ namespace Config.Entities [Description("Bottom")] Bottom, } + public enum TableForm + { + None, + Rows, + Columns, + ColumnsPL, + Count, + } + public enum ImageRotation { [Description("0 deg")] None, diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index 32310d4da..db70fdff4 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.857.0")] -[assembly: AssemblyFileVersion("2.18.857.0")] +[assembly: AssemblyVersion("2.18.866.0")] +[assembly: AssemblyFileVersion("2.18.866.0")] diff --git a/Results/Output/Printers/Enhanced/EnhancedPrintDocument.cs b/Results/Output/Printers/Enhanced/EnhancedPrintDocument.cs index 023b960c9..36bc686c8 100644 --- a/Results/Output/Printers/Enhanced/EnhancedPrintDocument.cs +++ b/Results/Output/Printers/Enhanced/EnhancedPrintDocument.cs @@ -183,7 +183,7 @@ namespace Results.Output.Printers.Enhanced commonHeight = commonItems.Count * SpacingOne; BodyTop = CommonTop + commonHeight + SpacingOne4Header; - Table table0 = GetTable_TestsAreRows(batch.WaterMeters[0], testItems, style); + Table table0 = Table.Create_TestsAreRows(batch.WaterMeters[0], testItems, style); SizeF tableSize = table0.Measure(e); int wmSectionHeight = (int)tableSize.Height + 3 * SpacingOne4Header; @@ -276,7 +276,7 @@ namespace Results.Output.Printers.Enhanced string.Format(" {0} = {1}", Strings.sn, wm.SerialNr)); } - Table table = GetTable_TestsAreRows(wm, testItems, style); + Table table = Table.Create_TestsAreRows(wm, testItems, style); return table.Draw(e, leftMargin, top + SpacingOneAndHalf4Header); } @@ -313,50 +313,5 @@ namespace Results.Output.Printers.Enhanced RectangleF printArea = new RectangleF(x, y, 2000, SpacingOne4Footer); e.Graphics.DrawString(text, this.footerFont, Brushes.Black, printArea); } - - - Table GetTable_TestsAreRows(Results.Entities.WaterMeter wm, IList items, TableStyle style) - { - /// Top row contains column captions - - Table table = new Table(items.Count); - table.Style = style; - - string[] tableHeader = new string[table.ColumnsCount]; - Alignment[] horizAlignment = new Alignment[table.ColumnsCount]; - VertAlignment[] vertAlignment = new VertAlignment[table.ColumnsCount]; - for (int i = 0; i < table.ColumnsCount; i++) - { - tableHeader[i] = items[i].Caption; - horizAlignment[i] = Alignment.Center; - vertAlignment[i] = VertAlignment.Middle; - } - table.AddRow(tableHeader, horizAlignment, vertAlignment); - - WMeterRsltItemSpec.TableRowNr = 1; - foreach (var mtr in wm.MeterTestRslts) - { - if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) - { - string[] oneTableRow = new string[table.ColumnsCount]; - horizAlignment = new Alignment[table.ColumnsCount]; - vertAlignment = new VertAlignment[table.ColumnsCount]; - - for (int i = 0; i < table.ColumnsCount; 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; - } - - table.AddRow(oneTableRow, horizAlignment, vertAlignment); - - WMeterRsltItemSpec.TableRowNr++; - } - } - - return table; - } } } diff --git a/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs b/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs index c63853f79..e7db18cac 100644 --- a/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs +++ b/Results/Output/Printers/OnePerMeter/OnePerMeterPrintDocument.cs @@ -29,11 +29,10 @@ namespace Results.Output.Printers.OnePerMeter readonly int spacingOne; readonly int spacingOne4Header; - float commonTop; /// = TitleY + 60 - float bodyTop; /// = HdrTop + 160 + float commonTop; /// = TitleY + 60 + float bodyTop; /// = HdrTop + 160 /// float titleHeight; - float commonHeight; /// /// Property variable for the Font the user wishes to use @@ -54,9 +53,14 @@ namespace Results.Output.Printers.OnePerMeter /// Items to print /// string header; - IList commonItems; + IList commonItems1; + IList commonItems2; + IList commonItems3; IList testItems; IList testItems2; + IList belowItems1; + IList belowItems2; + IList belowItems3; string footer; int nrPages; @@ -78,9 +82,14 @@ namespace Results.Output.Printers.OnePerMeter leftMargin = cfg.LeftMargin; header = string.IsNullOrEmpty(cfg.Header) ? string.Empty : cfg.Header.Replace("~", Environment.NewLine); - commonItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems); - testItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.TestItems); /// TestID info will be overwritten later on + commonItems1 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems1); + commonItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems2); + commonItems3 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems3); + testItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.TestItems); /// TestID info will be overwritten later on testItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.TestItems2); /// TestID info will be overwritten later on + belowItems1 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems1); + belowItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems2); + belowItems3 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems3); footer = string.IsNullOrEmpty(cfg.Footer) ? string.Empty : cfg.Footer.Replace("~", Environment.NewLine); /// Initialize fonts @@ -168,66 +177,152 @@ namespace Results.Output.Printers.OnePerMeter e.Graphics.DrawString(header, titleFont, Brushes.Black, printArea); titleHeight = System.Windows.Forms.TextRenderer.MeasureText(header, titleFont).Height; - commonTop = TitleY + titleHeight + spacingOne4Header; + commonTop = TitleY + titleHeight; + + ///---------------- + /// Common items + ///---------------- + commonTop += spacingOne4Header; /// Space above common part + float leftMarginCommon1 = leftMargin + printWidth * 0.01f * cfg.ColW0Pct; + float leftMarginCommon2 = leftMargin + printWidth * 0.01f * (cfg.ColW0Pct + cfg.ColW1Pct); + float leftMarginCommon3 = leftMargin + printWidth * 0.01f * (cfg.ColW0Pct + cfg.ColW1Pct + cfg.ColW2Pct); - - /// - /// Common items - /// - Table table = new Table(2); - table.Style = new TableStyle { Font = font, MarginX = 5, MarginY = 3 }; Alignment[] horizAlgn = new Alignment[] { Alignment.Left, Alignment.Left }; VertAlignment[] vertAlgn = new VertAlignment[] { VertAlignment.Top, VertAlignment.Top }; - /// - foreach (var v in commonItems) - { + TableStyle commonTableStyle = new TableStyle { Font = font, MarginX = 5, MarginY = 3 }; + + Table table = new Table(2) { Style = commonTableStyle }; + foreach (var v in commonItems1) + { string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; table.AddRow(row, horizAlgn, vertAlgn); - } + } + float bodyTop1 = table.Draw(e, leftMarginCommon1, commonTop); - bodyTop = table.Draw(e, (float)leftMargin, commonTop) + spacingOne4Header; + + table = new Table(2) { Style = commonTableStyle }; + foreach (var v in commonItems2) + { + string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; + table.AddRow(row, horizAlgn, vertAlgn); + } + float bodyTop2 = table.Draw(e, leftMarginCommon2, commonTop); + + + table = new Table(2) { Style = commonTableStyle }; + foreach (var v in commonItems3) + { + string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; + table.AddRow(row, horizAlgn, vertAlgn); + } + float bodyTop3 = table.Draw(e, leftMarginCommon3, commonTop); + + float bodyTop12 = (bodyTop1 > bodyTop2) ? bodyTop1 : bodyTop2; + bodyTop = (bodyTop12 > bodyTop3) ? bodyTop12 : bodyTop3; /// Max. of all three bodyTop-s + bodyTop += spacingOne4Header; /// Space between the common part and the table } + /// /// Draw table /// - if (cfg.TestsAreRows) + float belowTop; + TableStyle style; + switch (cfg.Form) { - TableStyle style = new TableStyle - { - Font = font, - HeaderFont = headerFont, - MarginX = 5, - MarginY = 3, - LineWidth = 1, - TopHeadersCount = 1, - HorizLines = TableLines.All, - VertLines = TableLines.FirstSecondAndLast - }; + default: + case TableForm.Rows: - GetTable_TestsAreRows(wm, (pageNr == 1) ? testItems : testItems2, style).Draw(e, (float)leftMargin, bodyTop); - } - else - { - TableStyle style = new TableStyle - { - Font = font, - HeaderFont = headerFont, - MarginX = 5, - MarginY = 3, - LineWidth = 1, - LeftHeadersCount = 1, - HorizLines = TableLines.FirstSecondAndLast, - VertLines = TableLines.All - }; + style = new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + TopHeadersCount = 1, + HorizLines = TableLines.All, + VertLines = TableLines.FirstSecondAndLast + }; + belowTop = Table.Create_TestsAreRows(wm, (pageNr == 1) ? testItems : testItems2, style).Draw(e, (float)leftMargin, bodyTop); + break; - GetTable_TestsAreColumns(wm, (pageNr == 1) ? testItems : testItems2, style).Draw(e, (float)leftMargin, bodyTop); + case TableForm.Columns: + + style = new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + LeftHeadersCount = 1, + HorizLines = TableLines.FirstSecondAndLast, + VertLines = TableLines.All + }; + belowTop = Table.Create_TestsAreColumns(wm, (pageNr == 1) ? testItems : testItems2, style).Draw(e, (float)leftMargin, bodyTop); + break; + + case TableForm.ColumnsPL: + + style = new TableStyle + { + Font = font, + HeaderFont = headerFont, + MarginX = 5, + MarginY = 3, + LineWidth = 1, + TopHeadersCount = 1, + HorizLines = TableLines.FirstSecondAndLast, + VertLines = TableLines.All + }; + belowTop = Table.Create_TestsAreColumnsPL(wm, (pageNr == 1) ? testItems : testItems2, style).Draw(e, (float)leftMargin, bodyTop); + break; } if (pageNr == nrPages) { - /// + ///---------------- + /// Common items + ///---------------- + belowTop += spacingOne4Header; /// Space between the table and the bottom common part + float leftMarginBelow1 = leftMargin + printWidth * 0.01f * cfg.BelowW0Pct; + float leftMarginBelow2 = leftMargin + printWidth * 0.01f * (cfg.BelowW0Pct + cfg.BelowW1Pct); + float leftMarginBelow3 = leftMargin + printWidth * 0.01f * (cfg.BelowW0Pct + cfg.BelowW1Pct + cfg.BelowW2Pct); + + Alignment[] horizAlgn = new Alignment[] { Alignment.Left, Alignment.Left }; + VertAlignment[] vertAlgn = new VertAlignment[] { VertAlignment.Top, VertAlignment.Top }; + TableStyle commonTableStyle = new TableStyle { Font = font, MarginX = 5, MarginY = 3 }; + + Table table = new Table(2) { Style = commonTableStyle }; + foreach (var v in belowItems1) + { + string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; + table.AddRow(row, horizAlgn, vertAlgn); + } + table.Draw(e, leftMarginBelow1, belowTop); + + + table = new Table(2) { Style = commonTableStyle }; + foreach (var v in belowItems2) + { + string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; + table.AddRow(row, horizAlgn, vertAlgn); + } + table.Draw(e, leftMarginBelow2, belowTop); + + + table = new Table(2) { Style = commonTableStyle }; + foreach (var v in belowItems3) + { + string[] row = new string[] { v.Caption, (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty }; + table.AddRow(row, horizAlgn, vertAlgn); + } + table.Draw(e, leftMarginBelow3, belowTop); + + + /// /// Footer on the last page /// float footerWidth = e.Graphics.MeasureString(footer, footerFont).Width; @@ -245,107 +340,5 @@ namespace Results.Output.Printers.OnePerMeter pageNr++; } - - - Table GetTable_TestsAreRows(Results.Entities.WaterMeter wm, IList items, TableStyle style) - { - /// Top row contains column captions - - Table table = new Table(items.Count); - table.Style = style; - - string[] tableHeader = new string[table.ColumnsCount]; - Alignment[] horizAlignment = new Alignment[table.ColumnsCount]; - VertAlignment[] vertAlignment = new VertAlignment[table.ColumnsCount]; - for (int i = 0; i < table.ColumnsCount; i++) - { - tableHeader[i] = items[i].Caption; - horizAlignment[i] = Alignment.Center; - vertAlignment[i] = VertAlignment.Middle; - } - table.AddRow(tableHeader, horizAlignment, vertAlignment); - - WMeterRsltItemSpec.TableRowNr = 1; - foreach (var mtr in wm.MeterTestRslts) - { - if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) - { - string[] oneTableRow = new string[table.ColumnsCount]; - horizAlignment = new Alignment[table.ColumnsCount]; - vertAlignment = new VertAlignment[table.ColumnsCount]; - - for (int i = 0; i < table.ColumnsCount; 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; - } - - table.AddRow(oneTableRow, horizAlignment, vertAlignment); - - WMeterRsltItemSpec.TableRowNr++; - } - } - - return table; - } - - - Table GetTable_TestsAreColumns(Results.Entities.WaterMeter wm, IList items, TableStyle style) - { - /// Left column contains row captions - - /// - /// Calculate columns count - /// - int columnsCount = 1; /// Left column contains item caption - foreach (var mtr in wm.MeterTestRslts) - { - if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) - { - columnsCount++; /// One additional column for each test to be published - } - } - - Table table = new Table(columnsCount); - table.Style = style; - - /// - /// Table content - /// - WMeterRsltItemSpec.TableRowNr = 1; - for (int i = 0; i < items.Count; i++) - { - string[] oneTableRow = new string[columnsCount]; - Alignment[] horizAlignment = new Alignment[columnsCount]; - VertAlignment[] vertAlignment = new VertAlignment[columnsCount]; - - oneTableRow[0] = items[i].Caption; - horizAlignment[0] = Alignment.Center; - vertAlignment[0] = VertAlignment.Middle; - - WMeterRsltItemSpec.TableColumnNr = 1; - foreach (var mtr in wm.MeterTestRslts) - { - if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) - { - /// 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++; - } - } - - table.AddRow(oneTableRow, horizAlignment, vertAlignment); - - WMeterRsltItemSpec.TableRowNr++; - } - - return table; - } } } diff --git a/Results/Output/Printers/OnePerMeter/OnePerMeterPrinterCfg.cs b/Results/Output/Printers/OnePerMeter/OnePerMeterPrinterCfg.cs index fdf0c9bc3..94700e6a7 100644 --- a/Results/Output/Printers/OnePerMeter/OnePerMeterPrinterCfg.cs +++ b/Results/Output/Printers/OnePerMeter/OnePerMeterPrinterCfg.cs @@ -27,10 +27,23 @@ namespace Results.Output.Printers.OnePerMeter public bool SupressPrinting; /// Bypass printing when true public System.Globalization.CultureInfo CultureInfo; public string Header; /// =Title - public string[] CommonItems; - public string[] TestItems; + public int ColW0Pct; + public int ColW1Pct; + public int ColW2Pct; + public string[] CommonItems1; + public string[] CommonItems2; + public string[] CommonItems3; + public Config.Entities.TableForm Form; + public string[] TestItems; + public Config.Entities.TableForm Form2; public string[] TestItems2; - public string Footer; + public int BelowW0Pct; + public int BelowW1Pct; + public int BelowW2Pct; + public string[] BelowItems1; + public string[] BelowItems2; + public string[] BelowItems3; + public string Footer; public bool TestsAreRows; public string ImgFullPathName; public int ImgLeft; diff --git a/Results/Output/Printers/Table.cs b/Results/Output/Printers/Table.cs index d9a730a90..ae74c2db7 100644 --- a/Results/Output/Printers/Table.cs +++ b/Results/Output/Printers/Table.cs @@ -198,5 +198,169 @@ namespace Results.Output.Printers return tableBottomY; } + + + public static Table Create_TestsAreRows(Results.Entities.WaterMeter wm, IList items, TableStyle style) + { + /// Top row contains column captions + + Table table = new Table(items.Count); + table.Style = style; + + string[] tableHeader = new string[table.ColumnsCount]; + Alignment[] horizAlignment = new Alignment[table.ColumnsCount]; + VertAlignment[] vertAlignment = new VertAlignment[table.ColumnsCount]; + for (int i = 0; i < table.ColumnsCount; i++) + { + tableHeader[i] = items[i].Caption; + horizAlignment[i] = Alignment.Center; + vertAlignment[i] = VertAlignment.Middle; + } + table.AddRow(tableHeader, horizAlignment, vertAlignment); + + WMeterRsltItemSpec.TableRowNr = 1; + foreach (var mtr in wm.MeterTestRslts) + { + if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) + { + string[] oneTableRow = new string[table.ColumnsCount]; + horizAlignment = new Alignment[table.ColumnsCount]; + vertAlignment = new VertAlignment[table.ColumnsCount]; + + for (int i = 0; i < table.ColumnsCount; 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; + } + + table.AddRow(oneTableRow, horizAlignment, vertAlignment); + + WMeterRsltItemSpec.TableRowNr++; + } + } + + return table; + } + + + public static Table Create_TestsAreColumns(Results.Entities.WaterMeter wm, IList items, TableStyle style) + { + /// Left column contains row captions + + /// + /// Calculate columns count + /// + int columnsCount = 1; /// Left column contains item caption + foreach (var mtr in wm.MeterTestRslts) + { + if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) + { + columnsCount++; /// One additional column for each test to be published + } + } + + Table table = new Table(columnsCount); + table.Style = style; + + /// + /// Table content + /// + WMeterRsltItemSpec.TableRowNr = 1; + for (int i = 0; i < items.Count; i++) + { + string[] oneTableRow = new string[columnsCount]; + Alignment[] horizAlignment = new Alignment[columnsCount]; + VertAlignment[] vertAlignment = new VertAlignment[columnsCount]; + + oneTableRow[0] = items[i].Caption; + horizAlignment[0] = Alignment.Center; + vertAlignment[0] = VertAlignment.Middle; + + WMeterRsltItemSpec.TableColumnNr = 1; + foreach (var mtr in wm.MeterTestRslts) + { + if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) + { + /// 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++; + } + } + + table.AddRow(oneTableRow, horizAlignment, vertAlignment); + + WMeterRsltItemSpec.TableRowNr++; + } + + return table; + } + + + public static Table Create_TestsAreColumnsPL(Results.Entities.WaterMeter wm, IList items, TableStyle style) + { + /// Left column contains row captions + + /// + /// Calculate columns count + /// + int columnsCount = 2; /// Left two columns contain item caption and units + foreach (var mtr in wm.MeterTestRslts) + { + if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) + { + columnsCount++; /// One additional column for each test to be published + } + } + + Table table = new Table(columnsCount); + table.Style = style; + + /// + /// Table content + /// + WMeterRsltItemSpec.TableRowNr = 1; + for (int i = 0; i < items.Count; i++) + { + string[] oneTableRow = new string[columnsCount]; + Alignment[] horizAlignment = new Alignment[columnsCount]; + VertAlignment[] vertAlignment = new VertAlignment[columnsCount]; + + oneTableRow[0] = items[i].Caption; + horizAlignment[0] = Alignment.Center; + vertAlignment[0] = VertAlignment.Middle; + + oneTableRow[1] = (i == 0) ? "Jednostka" : items[i].Units.ToDescription(); + horizAlignment[1] = Alignment.Center; + vertAlignment[1] = VertAlignment.Middle; + + WMeterRsltItemSpec.TableColumnNr = 1; + foreach (var mtr in wm.MeterTestRslts) + { + if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) + { + int colIx = WMeterRsltItemSpec.TableColumnNr + 1; + + /// Strip color information + oneTableRow[colIx] = items[i].Print(wm, mtr.Name()).Split(new char[] { '|' })[0]; + horizAlignment[colIx] = items[i].Alignment; + vertAlignment[colIx] = VertAlignment.Middle; + + WMeterRsltItemSpec.TableColumnNr++; + } + } + + table.AddRow(oneTableRow, horizAlignment, vertAlignment); + + WMeterRsltItemSpec.TableRowNr++; + } + + return table; + } } } diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index b5bdec5d4..82019eb49 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/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.864.0")] -[assembly: AssemblyFileVersion("2.18.864.0")] +[assembly: AssemblyVersion("2.18.866.0")] +[assembly: AssemblyFileVersion("2.18.866.0")] diff --git a/Results/Resources/Strings.Designer.cs b/Results/Resources/Strings.Designer.cs index e3e7f7be6..ebd6310e0 100644 --- a/Results/Resources/Strings.Designer.cs +++ b/Results/Resources/Strings.Designer.cs @@ -1644,6 +1644,15 @@ namespace Results.Resources { } } + /// + /// Looks up a localized string similar to Unit. + /// + internal static string Unit { + get { + return ResourceManager.GetString("Unit", resourceCulture); + } + } + /// /// Looks up a localized string similar to Units. /// diff --git a/Results/Resources/Strings.cs.resx b/Results/Resources/Strings.cs.resx index 0866b2bb9..f352bf2e4 100644 --- a/Results/Resources/Strings.cs.resx +++ b/Results/Resources/Strings.cs.resx @@ -210,4 +210,7 @@ do + + Jednotka + \ No newline at end of file diff --git a/Results/Resources/Strings.pl.resx b/Results/Resources/Strings.pl.resx index bdf479bc0..2077251b7 100644 --- a/Results/Resources/Strings.pl.resx +++ b/Results/Resources/Strings.pl.resx @@ -438,4 +438,7 @@ do + + Jednostka + \ No newline at end of file diff --git a/Results/Resources/Strings.resx b/Results/Resources/Strings.resx index d79d374e7..de09acd5a 100644 --- a/Results/Resources/Strings.resx +++ b/Results/Resources/Strings.resx @@ -720,4 +720,7 @@ Temperature in the line at start of the test – first 4 measurements after the start + + Unit + \ No newline at end of file diff --git a/TBF/BenchControl/Output/Printers/OnePerMeter/Printer.cs b/TBF/BenchControl/Output/Printers/OnePerMeter/Printer.cs index 6fa672088..616ba1760 100644 --- a/TBF/BenchControl/Output/Printers/OnePerMeter/Printer.cs +++ b/TBF/BenchControl/Output/Printers/OnePerMeter/Printer.cs @@ -45,7 +45,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter void ApplyConfig() { header = string.IsNullOrEmpty(printerCfg.Header) ? string.Empty : printerCfg.Header.Replace("~", Environment.NewLine); - commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems); + commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.CommonItems1); testItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.SelectedItems); /// TestID info will be overwritten later on footer = string.IsNullOrEmpty(printerCfg.Footer) ? string.Empty : printerCfg.Footer.Replace("~", Environment.NewLine); } @@ -94,9 +94,21 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter printerCfg.SupressPrinting = newCfg.SupressPrinting; printerCfg.Culture = newCfg.Culture; printerCfg.Header = newCfg.Header; - printerCfg.CommonItems = newCfg.CommonItems; - printerCfg.SelectedItems = newCfg.SelectedItems; + printerCfg.ColW0Pct = newCfg.ColW0Pct; + printerCfg.ColW1Pct = newCfg.ColW1Pct; + printerCfg.ColW2Pct = newCfg.ColW2Pct; + printerCfg.CommonItems1 = newCfg.CommonItems1; + printerCfg.CommonItems2 = newCfg.CommonItems2; + printerCfg.CommonItems3 = newCfg.CommonItems3; + printerCfg.Form = newCfg.Form; + printerCfg.SelectedItems = newCfg.SelectedItems; printerCfg.SelectedItems2 = newCfg.SelectedItems2; + printerCfg.BelowW0Pct = newCfg.BelowW0Pct; + printerCfg.BelowW1Pct = newCfg.BelowW1Pct; + printerCfg.BelowW2Pct = newCfg.BelowW2Pct; + printerCfg.BelowItems1 = newCfg.BelowItems1; + printerCfg.BelowItems2 = newCfg.BelowItems2; + printerCfg.BelowItems3 = newCfg.BelowItems3; printerCfg.Footer = newCfg.Footer; printerCfg.TestsAreRows = newCfg.TestsAreRows; printerCfg.DocName = newCfg.DocName; @@ -197,9 +209,21 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter SupressPrinting = printerCfg.SupressPrinting, CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()), Header = printerCfg.Header, - CommonItems = printerCfg.CommonItems, - TestItems = printerCfg.SelectedItems, + ColW0Pct = printerCfg.ColW0Pct, + ColW1Pct = printerCfg.ColW1Pct, + ColW2Pct = printerCfg.ColW2Pct, + CommonItems1 = printerCfg.CommonItems1, + CommonItems2 = printerCfg.CommonItems2, + CommonItems3 = printerCfg.CommonItems3, + Form = printerCfg.Form, + TestItems = printerCfg.SelectedItems, TestItems2 = printerCfg.SelectedItems2, + BelowW0Pct = printerCfg.BelowW0Pct, + BelowW1Pct = printerCfg.BelowW1Pct, + BelowW2Pct = printerCfg.BelowW2Pct, + BelowItems1 = printerCfg.BelowItems1, + BelowItems2 = printerCfg.BelowItems2, + BelowItems3 = printerCfg.BelowItems3, Footer = printerCfg.Footer, TestsAreRows = printerCfg.TestsAreRows, ImgFullPathName = (wm.ArchivePath != null) ? System.IO.Path.Combine(wm.ArchivePath, printerCfg.ImgName) : null, diff --git a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfg.cs b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfg.cs index 58201933d..d2fab3d10 100644 --- a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfg.cs +++ b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfg.cs @@ -38,9 +38,25 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter public bool SupressPrinting; /// Bypass printing when true public Culture Culture; public string Header; /// =Title - public string[] CommonItems; - public string[] SelectedItems; + + public int ColW0Pct; + public string[] CommonItems1; + public int ColW1Pct; + public string[] CommonItems2; + public int ColW2Pct; + public string[] CommonItems3; + + public TableForm Form; + public string[] SelectedItems; public string[] SelectedItems2; + + public int BelowW0Pct; + public string[] BelowItems1; + public int BelowW1Pct; + public string[] BelowItems2; + public int BelowW2Pct; + public string[] BelowItems3; + public string Footer; public bool TestsAreRows; /// true = Tests are rows public string DocName; diff --git a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.Designer.cs b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.Designer.cs index 053b16b11..a3362bfff 100644 --- a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.Designer.cs +++ b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.Designer.cs @@ -43,7 +43,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter this.bottomMarginTextBox = new System.Windows.Forms.TextBox(); this.cultureComboBox = new System.Windows.Forms.ComboBox(); this.cultureLabel = new System.Windows.Forms.Label(); - this.commonItemsButton = new System.Windows.Forms.Button(); this.footerButton = new System.Windows.Forms.Button(); this.headerButton = new System.Windows.Forms.Button(); this.testItemsButton = new System.Windows.Forms.Button(); @@ -64,7 +63,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter this.bodyBoldCheckBox = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.testsAreRowsCheckBox = new System.Windows.Forms.CheckBox(); this.testItems2Button = new System.Windows.Forms.Button(); this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox(); this.templateTextBox = new System.Windows.Forms.TextBox(); @@ -83,16 +81,34 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter this.imageWidthTextBox = new System.Windows.Forms.TextBox(); this.imageHeightTextBox = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.colW0TextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.colW2TextBox = new System.Windows.Forms.TextBox(); + this.colW1TextBox = new System.Windows.Forms.TextBox(); + this.commonItems3Button = new System.Windows.Forms.Button(); + this.commonItems2Button = new System.Windows.Forms.Button(); + this.commonItems1Button = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.belowW0TextBox = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.belowW2TextBox = new System.Windows.Forms.TextBox(); + this.belowW1TextBox = new System.Windows.Forms.TextBox(); + this.belowItems3Button = new System.Windows.Forms.Button(); + this.belowItems2Button = new System.Windows.Forms.Button(); + this.belowItems1Button = new System.Windows.Forms.Button(); + this.table1FormComboBox = new System.Windows.Forms.ComboBox(); this.SuspendLayout(); // // nameTextBox // this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(142, 24); + this.nameTextBox.Location = new System.Drawing.Point(142, 22); this.nameTextBox.Name = "nameTextBox"; this.nameTextBox.Size = new System.Drawing.Size(146, 20); this.nameTextBox.TabIndex = 2; @@ -100,7 +116,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // nameLabel // this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(16, 27); + this.nameLabel.Location = new System.Drawing.Point(16, 25); this.nameLabel.Name = "nameLabel"; this.nameLabel.Size = new System.Drawing.Size(35, 13); this.nameLabel.TabIndex = 1; @@ -109,7 +125,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // classNameLabel // this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(139, 7); + this.classNameLabel.Location = new System.Drawing.Point(139, 5); this.classNameLabel.Name = "classNameLabel"; this.classNameLabel.Size = new System.Drawing.Size(83, 13); this.classNameLabel.TabIndex = 0; @@ -119,7 +135,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.supressPrintingCheckBox.AutoSize = true; this.supressPrintingCheckBox.Enabled = false; - this.supressPrintingCheckBox.Location = new System.Drawing.Point(192, 227); + this.supressPrintingCheckBox.Location = new System.Drawing.Point(334, 26); this.supressPrintingCheckBox.Name = "supressPrintingCheckBox"; this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17); this.supressPrintingCheckBox.TabIndex = 33; @@ -129,7 +145,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // orientationLabel // this.orientationLabel.AutoSize = true; - this.orientationLabel.Location = new System.Drawing.Point(16, 69); + this.orientationLabel.Location = new System.Drawing.Point(16, 67); this.orientationLabel.Name = "orientationLabel"; this.orientationLabel.Size = new System.Drawing.Size(84, 13); this.orientationLabel.TabIndex = 5; @@ -139,7 +155,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.orientationComboBox.Enabled = false; this.orientationComboBox.FormattingEnabled = true; - this.orientationComboBox.Location = new System.Drawing.Point(142, 66); + this.orientationComboBox.Location = new System.Drawing.Point(142, 64); this.orientationComboBox.Name = "orientationComboBox"; this.orientationComboBox.Size = new System.Drawing.Size(146, 21); this.orientationComboBox.TabIndex = 6; @@ -147,7 +163,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // topMarginTextBox // this.topMarginTextBox.Enabled = false; - this.topMarginTextBox.Location = new System.Drawing.Point(142, 88); + this.topMarginTextBox.Location = new System.Drawing.Point(142, 86); this.topMarginTextBox.Name = "topMarginTextBox"; this.topMarginTextBox.Size = new System.Drawing.Size(44, 20); this.topMarginTextBox.TabIndex = 8; @@ -155,7 +171,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // topMarginLabel // this.topMarginLabel.AutoSize = true; - this.topMarginLabel.Location = new System.Drawing.Point(16, 90); + this.topMarginLabel.Location = new System.Drawing.Point(16, 88); this.topMarginLabel.Name = "topMarginLabel"; this.topMarginLabel.Size = new System.Drawing.Size(116, 13); this.topMarginLabel.TabIndex = 7; @@ -164,7 +180,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // leftMarginTextBox // this.leftMarginTextBox.Enabled = false; - this.leftMarginTextBox.Location = new System.Drawing.Point(244, 88); + this.leftMarginTextBox.Location = new System.Drawing.Point(244, 86); this.leftMarginTextBox.Name = "leftMarginTextBox"; this.leftMarginTextBox.Size = new System.Drawing.Size(44, 20); this.leftMarginTextBox.TabIndex = 10; @@ -172,7 +188,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // bottomMarginTextBox // this.bottomMarginTextBox.Enabled = false; - this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 88); + this.bottomMarginTextBox.Location = new System.Drawing.Point(193, 86); this.bottomMarginTextBox.Name = "bottomMarginTextBox"; this.bottomMarginTextBox.Size = new System.Drawing.Size(44, 20); this.bottomMarginTextBox.TabIndex = 9; @@ -181,7 +197,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.cultureComboBox.Enabled = false; this.cultureComboBox.FormattingEnabled = true; - this.cultureComboBox.Location = new System.Drawing.Point(142, 194); + this.cultureComboBox.Location = new System.Drawing.Point(142, 192); this.cultureComboBox.Name = "cultureComboBox"; this.cultureComboBox.Size = new System.Drawing.Size(110, 21); this.cultureComboBox.TabIndex = 32; @@ -189,29 +205,18 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // cultureLabel // this.cultureLabel.AutoSize = true; - this.cultureLabel.Location = new System.Drawing.Point(16, 199); + this.cultureLabel.Location = new System.Drawing.Point(16, 197); this.cultureLabel.Name = "cultureLabel"; this.cultureLabel.Size = new System.Drawing.Size(42, 13); this.cultureLabel.TabIndex = 31; this.cultureLabel.Text = "Cullture"; // - // commonItemsButton - // - this.commonItemsButton.Enabled = false; - this.commonItemsButton.Location = new System.Drawing.Point(19, 238); - this.commonItemsButton.Name = "commonItemsButton"; - this.commonItemsButton.Size = new System.Drawing.Size(167, 23); - this.commonItemsButton.TabIndex = 38; - this.commonItemsButton.Text = "Common items"; - this.commonItemsButton.UseVisualStyleBackColor = true; - this.commonItemsButton.Click += new System.EventHandler(this.commonItemsButton_Click); - // // footerButton // this.footerButton.Enabled = false; - this.footerButton.Location = new System.Drawing.Point(19, 304); + this.footerButton.Location = new System.Drawing.Point(287, 303); this.footerButton.Name = "footerButton"; - this.footerButton.Size = new System.Drawing.Size(167, 23); + this.footerButton.Size = new System.Drawing.Size(100, 23); this.footerButton.TabIndex = 41; this.footerButton.Text = "Footer"; this.footerButton.UseVisualStyleBackColor = true; @@ -220,9 +225,9 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // headerButton // this.headerButton.Enabled = false; - this.headerButton.Location = new System.Drawing.Point(19, 216); + this.headerButton.Location = new System.Drawing.Point(287, 193); this.headerButton.Name = "headerButton"; - this.headerButton.Size = new System.Drawing.Size(167, 23); + this.headerButton.Size = new System.Drawing.Size(100, 23); this.headerButton.TabIndex = 37; this.headerButton.Text = "Title"; this.headerButton.UseVisualStyleBackColor = true; @@ -231,18 +236,18 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // testItemsButton // this.testItemsButton.Enabled = false; - this.testItemsButton.Location = new System.Drawing.Point(19, 260); + this.testItemsButton.Location = new System.Drawing.Point(287, 237); this.testItemsButton.Name = "testItemsButton"; - this.testItemsButton.Size = new System.Drawing.Size(167, 23); + this.testItemsButton.Size = new System.Drawing.Size(100, 23); this.testItemsButton.TabIndex = 39; - this.testItemsButton.Text = "Test items - 1st table"; + this.testItemsButton.Text = "1st table"; this.testItemsButton.UseVisualStyleBackColor = true; this.testItemsButton.Click += new System.EventHandler(this.testItemsButton_Click); // // headerFontLabel // this.headerFontLabel.AutoSize = true; - this.headerFontLabel.Location = new System.Drawing.Point(16, 133); + this.headerFontLabel.Location = new System.Drawing.Point(16, 131); this.headerFontLabel.Name = "headerFontLabel"; this.headerFontLabel.Size = new System.Drawing.Size(112, 13); this.headerFontLabel.TabIndex = 16; @@ -251,7 +256,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // titleFontLabel // this.titleFontLabel.AutoSize = true; - this.titleFontLabel.Location = new System.Drawing.Point(16, 112); + this.titleFontLabel.Location = new System.Drawing.Point(16, 110); this.titleFontLabel.Name = "titleFontLabel"; this.titleFontLabel.Size = new System.Drawing.Size(97, 13); this.titleFontLabel.TabIndex = 11; @@ -261,7 +266,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.titleFontFamilyComboBox.Enabled = false; this.titleFontFamilyComboBox.FormattingEnabled = true; - this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 109); + this.titleFontFamilyComboBox.Location = new System.Drawing.Point(142, 107); this.titleFontFamilyComboBox.Name = "titleFontFamilyComboBox"; this.titleFontFamilyComboBox.Size = new System.Drawing.Size(110, 21); this.titleFontFamilyComboBox.TabIndex = 12; @@ -270,7 +275,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.headerFontFamilyComboBox.Enabled = false; this.headerFontFamilyComboBox.FormattingEnabled = true; - this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 130); + this.headerFontFamilyComboBox.Location = new System.Drawing.Point(142, 128); this.headerFontFamilyComboBox.Name = "headerFontFamilyComboBox"; this.headerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21); this.headerFontFamilyComboBox.TabIndex = 17; @@ -279,7 +284,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.bodyFontFamilyComboBox.Enabled = false; this.bodyFontFamilyComboBox.FormattingEnabled = true; - this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 151); + this.bodyFontFamilyComboBox.Location = new System.Drawing.Point(142, 149); this.bodyFontFamilyComboBox.Name = "bodyFontFamilyComboBox"; this.bodyFontFamilyComboBox.Size = new System.Drawing.Size(110, 21); this.bodyFontFamilyComboBox.TabIndex = 22; @@ -287,7 +292,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // bodyFontLabel // this.bodyFontLabel.AutoSize = true; - this.bodyFontLabel.Location = new System.Drawing.Point(16, 154); + this.bodyFontLabel.Location = new System.Drawing.Point(16, 152); this.bodyFontLabel.Name = "bodyFontLabel"; this.bodyFontLabel.Size = new System.Drawing.Size(101, 13); this.bodyFontLabel.TabIndex = 21; @@ -296,7 +301,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // titleFontSizeTextBox // this.titleFontSizeTextBox.Enabled = false; - this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 109); + this.titleFontSizeTextBox.Location = new System.Drawing.Point(258, 107); this.titleFontSizeTextBox.Name = "titleFontSizeTextBox"; this.titleFontSizeTextBox.Size = new System.Drawing.Size(30, 20); this.titleFontSizeTextBox.TabIndex = 13; @@ -304,7 +309,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // headerFontSizeTextBox // this.headerFontSizeTextBox.Enabled = false; - this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 130); + this.headerFontSizeTextBox.Location = new System.Drawing.Point(258, 128); this.headerFontSizeTextBox.Name = "headerFontSizeTextBox"; this.headerFontSizeTextBox.Size = new System.Drawing.Size(30, 20); this.headerFontSizeTextBox.TabIndex = 18; @@ -312,16 +317,16 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // bodyFontSizeTextBox // this.bodyFontSizeTextBox.Enabled = false; - this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 151); + this.bodyFontSizeTextBox.Location = new System.Drawing.Point(258, 149); this.bodyFontSizeTextBox.Name = "bodyFontSizeTextBox"; - this.bodyFontSizeTextBox.Size = new System.Drawing.Size(29, 20); + this.bodyFontSizeTextBox.Size = new System.Drawing.Size(30, 20); this.bodyFontSizeTextBox.TabIndex = 23; // // titleBoldCheckBox // this.titleBoldCheckBox.AutoSize = true; this.titleBoldCheckBox.Enabled = false; - this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 112); + this.titleBoldCheckBox.Location = new System.Drawing.Point(306, 110); this.titleBoldCheckBox.Name = "titleBoldCheckBox"; this.titleBoldCheckBox.Size = new System.Drawing.Size(15, 14); this.titleBoldCheckBox.TabIndex = 14; @@ -331,7 +336,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.titleItalicCheckBox.AutoSize = true; this.titleItalicCheckBox.Enabled = false; - this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 112); + this.titleItalicCheckBox.Location = new System.Drawing.Point(334, 110); this.titleItalicCheckBox.Name = "titleItalicCheckBox"; this.titleItalicCheckBox.Size = new System.Drawing.Size(15, 14); this.titleItalicCheckBox.TabIndex = 15; @@ -341,7 +346,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.headerItalicCheckBox.AutoSize = true; this.headerItalicCheckBox.Enabled = false; - this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 133); + this.headerItalicCheckBox.Location = new System.Drawing.Point(334, 131); this.headerItalicCheckBox.Name = "headerItalicCheckBox"; this.headerItalicCheckBox.Size = new System.Drawing.Size(15, 14); this.headerItalicCheckBox.TabIndex = 20; @@ -351,7 +356,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.headerBoldCheckBox.AutoSize = true; this.headerBoldCheckBox.Enabled = false; - this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 133); + this.headerBoldCheckBox.Location = new System.Drawing.Point(306, 131); this.headerBoldCheckBox.Name = "headerBoldCheckBox"; this.headerBoldCheckBox.Size = new System.Drawing.Size(15, 14); this.headerBoldCheckBox.TabIndex = 19; @@ -361,7 +366,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.bodyItalicCheckBox.AutoSize = true; this.bodyItalicCheckBox.Enabled = false; - this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 154); + this.bodyItalicCheckBox.Location = new System.Drawing.Point(334, 152); this.bodyItalicCheckBox.Name = "bodyItalicCheckBox"; this.bodyItalicCheckBox.Size = new System.Drawing.Size(15, 14); this.bodyItalicCheckBox.TabIndex = 25; @@ -371,7 +376,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.bodyBoldCheckBox.AutoSize = true; this.bodyBoldCheckBox.Enabled = false; - this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 154); + this.bodyBoldCheckBox.Location = new System.Drawing.Point(306, 152); this.bodyBoldCheckBox.Name = "bodyBoldCheckBox"; this.bodyBoldCheckBox.Size = new System.Drawing.Size(15, 14); this.bodyBoldCheckBox.TabIndex = 24; @@ -381,7 +386,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label1.Location = new System.Drawing.Point(296, 96); + this.label1.Location = new System.Drawing.Point(296, 94); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(32, 13); this.label1.TabIndex = 37; @@ -391,31 +396,20 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label2.Location = new System.Drawing.Point(330, 96); + this.label2.Location = new System.Drawing.Point(330, 94); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(24, 13); this.label2.TabIndex = 38; this.label2.Text = "Ital."; // - // testsAreRowsCheckBox - // - this.testsAreRowsCheckBox.AutoSize = true; - this.testsAreRowsCheckBox.Enabled = false; - this.testsAreRowsCheckBox.Location = new System.Drawing.Point(192, 263); - this.testsAreRowsCheckBox.Name = "testsAreRowsCheckBox"; - this.testsAreRowsCheckBox.Size = new System.Drawing.Size(95, 17); - this.testsAreRowsCheckBox.TabIndex = 35; - this.testsAreRowsCheckBox.Text = "Tests are rows"; - this.testsAreRowsCheckBox.UseVisualStyleBackColor = true; - // // testItems2Button // this.testItems2Button.Enabled = false; - this.testItems2Button.Location = new System.Drawing.Point(19, 282); + this.testItems2Button.Location = new System.Drawing.Point(287, 259); this.testItems2Button.Name = "testItems2Button"; - this.testItems2Button.Size = new System.Drawing.Size(167, 23); + this.testItems2Button.Size = new System.Drawing.Size(100, 23); this.testItems2Button.TabIndex = 40; - this.testItems2Button.Text = "Test items - 2nd table"; + this.testItems2Button.Text = "2nd table"; this.testItems2Button.UseVisualStyleBackColor = true; this.testItems2Button.Click += new System.EventHandler(this.testItems2Button_Click); // @@ -423,7 +417,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.goodOnlyCheckBox.AutoSize = true; this.goodOnlyCheckBox.Enabled = false; - this.goodOnlyCheckBox.Location = new System.Drawing.Point(192, 245); + this.goodOnlyCheckBox.Location = new System.Drawing.Point(334, 44); this.goodOnlyCheckBox.Name = "goodOnlyCheckBox"; this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17); this.goodOnlyCheckBox.TabIndex = 34; @@ -433,7 +427,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // templateTextBox // this.templateTextBox.Enabled = false; - this.templateTextBox.Location = new System.Drawing.Point(142, 45); + this.templateTextBox.Location = new System.Drawing.Point(142, 43); this.templateTextBox.Name = "templateTextBox"; this.templateTextBox.Size = new System.Drawing.Size(146, 20); this.templateTextBox.TabIndex = 4; @@ -441,7 +435,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // templateLabel // this.templateLabel.AutoSize = true; - this.templateLabel.Location = new System.Drawing.Point(16, 48); + this.templateLabel.Location = new System.Drawing.Point(16, 46); this.templateLabel.Name = "templateLabel"; this.templateLabel.Size = new System.Drawing.Size(51, 13); this.templateLabel.TabIndex = 3; @@ -450,25 +444,25 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // docNameLabel // this.docNameLabel.AutoSize = true; - this.docNameLabel.Location = new System.Drawing.Point(58, 331); + this.docNameLabel.Location = new System.Drawing.Point(16, 331); this.docNameLabel.Name = "docNameLabel"; - this.docNameLabel.Size = new System.Drawing.Size(243, 13); + this.docNameLabel.Size = new System.Drawing.Size(246, 13); this.docNameLabel.TabIndex = 42; - this.docNameLabel.Text = "Doc.name (0=start 1-end, 2=batch, 3=wm, 4=s/n):"; + this.docNameLabel.Text = "Doc.name (0=start 1-end, 2=batch, 3=wm, 4=s/n) :"; // // docNameTextBox // this.docNameTextBox.Enabled = false; - this.docNameTextBox.Location = new System.Drawing.Point(302, 328); + this.docNameTextBox.Location = new System.Drawing.Point(261, 328); this.docNameTextBox.Name = "docNameTextBox"; - this.docNameTextBox.Size = new System.Drawing.Size(126, 20); + this.docNameTextBox.Size = new System.Drawing.Size(135, 20); this.docNameTextBox.TabIndex = 43; // // footerItalicCheckBox // this.footerItalicCheckBox.AutoSize = true; this.footerItalicCheckBox.Enabled = false; - this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 175); + this.footerItalicCheckBox.Location = new System.Drawing.Point(334, 173); this.footerItalicCheckBox.Name = "footerItalicCheckBox"; this.footerItalicCheckBox.Size = new System.Drawing.Size(15, 14); this.footerItalicCheckBox.TabIndex = 30; @@ -478,7 +472,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // this.footerBoldCheckBox.AutoSize = true; this.footerBoldCheckBox.Enabled = false; - this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 175); + this.footerBoldCheckBox.Location = new System.Drawing.Point(306, 173); this.footerBoldCheckBox.Name = "footerBoldCheckBox"; this.footerBoldCheckBox.Size = new System.Drawing.Size(15, 14); this.footerBoldCheckBox.TabIndex = 29; @@ -487,16 +481,16 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // footerFontSizeTextBox // this.footerFontSizeTextBox.Enabled = false; - this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 172); + this.footerFontSizeTextBox.Location = new System.Drawing.Point(258, 170); this.footerFontSizeTextBox.Name = "footerFontSizeTextBox"; - this.footerFontSizeTextBox.Size = new System.Drawing.Size(29, 20); + this.footerFontSizeTextBox.Size = new System.Drawing.Size(30, 20); this.footerFontSizeTextBox.TabIndex = 28; // // footerFontFamilyComboBox // this.footerFontFamilyComboBox.Enabled = false; this.footerFontFamilyComboBox.FormattingEnabled = true; - this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 172); + this.footerFontFamilyComboBox.Location = new System.Drawing.Point(142, 170); this.footerFontFamilyComboBox.Name = "footerFontFamilyComboBox"; this.footerFontFamilyComboBox.Size = new System.Drawing.Size(110, 21); this.footerFontFamilyComboBox.TabIndex = 27; @@ -504,7 +498,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // footerFontLabel // this.footerFontLabel.AutoSize = true; - this.footerFontLabel.Location = new System.Drawing.Point(16, 175); + this.footerFontLabel.Location = new System.Drawing.Point(16, 173); this.footerFontLabel.Name = "footerFontLabel"; this.footerFontLabel.Size = new System.Drawing.Size(107, 13); this.footerFontLabel.TabIndex = 26; @@ -513,105 +507,291 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter // imageNameTextBox // this.imageNameTextBox.Enabled = false; - this.imageNameTextBox.Location = new System.Drawing.Point(302, 306); + this.imageNameTextBox.Location = new System.Drawing.Point(143, 304); this.imageNameTextBox.Name = "imageNameTextBox"; - this.imageNameTextBox.Size = new System.Drawing.Size(126, 20); + this.imageNameTextBox.Size = new System.Drawing.Size(135, 20); this.imageNameTextBox.TabIndex = 44; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(217, 309); + this.label3.Location = new System.Drawing.Point(57, 307); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(84, 13); + this.label3.Size = new System.Drawing.Size(87, 13); this.label3.TabIndex = 45; - this.label3.Text = "Image file name:"; + this.label3.Text = "Image file name :"; // // imageLeftTextBox // this.imageLeftTextBox.Enabled = false; - this.imageLeftTextBox.Location = new System.Drawing.Point(388, 218); + this.imageLeftTextBox.Location = new System.Drawing.Point(143, 282); this.imageLeftTextBox.Name = "imageLeftTextBox"; - this.imageLeftTextBox.Size = new System.Drawing.Size(40, 20); + this.imageLeftTextBox.Size = new System.Drawing.Size(33, 20); this.imageLeftTextBox.TabIndex = 46; // // imageTopTextBox // this.imageTopTextBox.Enabled = false; - this.imageTopTextBox.Location = new System.Drawing.Point(388, 240); + this.imageTopTextBox.Location = new System.Drawing.Point(179, 282); this.imageTopTextBox.Name = "imageTopTextBox"; - this.imageTopTextBox.Size = new System.Drawing.Size(40, 20); + this.imageTopTextBox.Size = new System.Drawing.Size(31, 20); this.imageTopTextBox.TabIndex = 47; // // imageWidthTextBox // this.imageWidthTextBox.Enabled = false; - this.imageWidthTextBox.Location = new System.Drawing.Point(388, 262); + this.imageWidthTextBox.Location = new System.Drawing.Point(213, 282); this.imageWidthTextBox.Name = "imageWidthTextBox"; - this.imageWidthTextBox.Size = new System.Drawing.Size(40, 20); + this.imageWidthTextBox.Size = new System.Drawing.Size(31, 20); this.imageWidthTextBox.TabIndex = 48; // // imageHeightTextBox // this.imageHeightTextBox.Enabled = false; - this.imageHeightTextBox.Location = new System.Drawing.Point(388, 284); + this.imageHeightTextBox.Location = new System.Drawing.Point(247, 282); this.imageHeightTextBox.Name = "imageHeightTextBox"; - this.imageHeightTextBox.Size = new System.Drawing.Size(40, 20); + this.imageHeightTextBox.Size = new System.Drawing.Size(31, 20); this.imageHeightTextBox.TabIndex = 49; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(311, 222); + this.label4.Location = new System.Drawing.Point(41, 285); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(53, 13); + this.label4.Size = new System.Drawing.Size(103, 13); this.label4.TabIndex = 50; - this.label4.Text = "Image left"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(311, 244); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(54, 13); - this.label5.TabIndex = 52; - this.label5.Text = "Image top"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(311, 266); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(64, 13); - this.label6.TabIndex = 54; - this.label6.Text = "Image width"; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(311, 288); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(68, 13); - this.label7.TabIndex = 56; - this.label7.Text = "Image height"; + this.label4.Text = "Image left/top/w/h :"; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(277, 202); + this.label8.Location = new System.Drawing.Point(109, 266); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(172, 13); this.label8.TabIndex = 57; this.label8.Text = "Image coordinates are in 0.254 mm"; // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(172, 219); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(15, 13); + this.label6.TabIndex = 67; + this.label6.Text = "%"; + // + // colW0TextBox + // + this.colW0TextBox.Enabled = false; + this.colW0TextBox.Location = new System.Drawing.Point(142, 216); + this.colW0TextBox.Name = "colW0TextBox"; + this.colW0TextBox.Size = new System.Drawing.Size(30, 20); + this.colW0TextBox.TabIndex = 66; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(16, 219); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(97, 13); + this.label5.TabIndex = 58; + this.label5.Text = "Column widths in %"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(264, 219); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(15, 13); + this.label7.TabIndex = 62; + this.label7.Text = "%"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(218, 219); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(15, 13); + this.label9.TabIndex = 60; + this.label9.Text = "%"; + // + // colW2TextBox + // + this.colW2TextBox.Enabled = false; + this.colW2TextBox.Location = new System.Drawing.Point(234, 216); + this.colW2TextBox.Name = "colW2TextBox"; + this.colW2TextBox.Size = new System.Drawing.Size(30, 20); + this.colW2TextBox.TabIndex = 61; + // + // colW1TextBox + // + this.colW1TextBox.Enabled = false; + this.colW1TextBox.Location = new System.Drawing.Point(188, 216); + this.colW1TextBox.Name = "colW1TextBox"; + this.colW1TextBox.Size = new System.Drawing.Size(30, 20); + this.colW1TextBox.TabIndex = 59; + // + // commonItems3Button + // + this.commonItems3Button.Enabled = false; + this.commonItems3Button.Location = new System.Drawing.Point(393, 215); + this.commonItems3Button.Name = "commonItems3Button"; + this.commonItems3Button.Size = new System.Drawing.Size(47, 23); + this.commonItems3Button.TabIndex = 65; + this.commonItems3Button.Text = "Col. 3"; + this.commonItems3Button.UseVisualStyleBackColor = true; + this.commonItems3Button.Click += new System.EventHandler(this.commonItems3Button_Click); + // + // commonItems2Button + // + this.commonItems2Button.Enabled = false; + this.commonItems2Button.Location = new System.Drawing.Point(340, 215); + this.commonItems2Button.Name = "commonItems2Button"; + this.commonItems2Button.Size = new System.Drawing.Size(47, 23); + this.commonItems2Button.TabIndex = 64; + this.commonItems2Button.Text = "Col. 2"; + this.commonItems2Button.UseVisualStyleBackColor = true; + this.commonItems2Button.Click += new System.EventHandler(this.commonItems2Button_Click); + // + // commonItems1Button + // + this.commonItems1Button.Enabled = false; + this.commonItems1Button.Location = new System.Drawing.Point(287, 215); + this.commonItems1Button.Name = "commonItems1Button"; + this.commonItems1Button.Size = new System.Drawing.Size(47, 23); + this.commonItems1Button.TabIndex = 63; + this.commonItems1Button.Text = "Col. 1"; + this.commonItems1Button.UseVisualStyleBackColor = true; + this.commonItems1Button.Click += new System.EventHandler(this.commonItems1Button_Click); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(172, 244); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(15, 13); + this.label10.TabIndex = 74; + this.label10.Text = "%"; + // + // belowW0TextBox + // + this.belowW0TextBox.Enabled = false; + this.belowW0TextBox.Location = new System.Drawing.Point(142, 241); + this.belowW0TextBox.Name = "belowW0TextBox"; + this.belowW0TextBox.Size = new System.Drawing.Size(30, 20); + this.belowW0TextBox.TabIndex = 73; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(16, 244); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(97, 13); + this.label11.TabIndex = 68; + this.label11.Text = "Column widths in %"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(264, 244); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(15, 13); + this.label12.TabIndex = 72; + this.label12.Text = "%"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(218, 244); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(15, 13); + this.label13.TabIndex = 70; + this.label13.Text = "%"; + // + // belowW2TextBox + // + this.belowW2TextBox.Enabled = false; + this.belowW2TextBox.Location = new System.Drawing.Point(234, 241); + this.belowW2TextBox.Name = "belowW2TextBox"; + this.belowW2TextBox.Size = new System.Drawing.Size(30, 20); + this.belowW2TextBox.TabIndex = 71; + // + // belowW1TextBox + // + this.belowW1TextBox.Enabled = false; + this.belowW1TextBox.Location = new System.Drawing.Point(188, 241); + this.belowW1TextBox.Name = "belowW1TextBox"; + this.belowW1TextBox.Size = new System.Drawing.Size(30, 20); + this.belowW1TextBox.TabIndex = 69; + // + // belowItems3Button + // + this.belowItems3Button.Enabled = false; + this.belowItems3Button.Location = new System.Drawing.Point(393, 281); + this.belowItems3Button.Name = "belowItems3Button"; + this.belowItems3Button.Size = new System.Drawing.Size(47, 23); + this.belowItems3Button.TabIndex = 77; + this.belowItems3Button.Text = "Col. 3"; + this.belowItems3Button.UseVisualStyleBackColor = true; + this.belowItems3Button.Click += new System.EventHandler(this.belowItems3Button_Click); + // + // belowItems2Button + // + this.belowItems2Button.Enabled = false; + this.belowItems2Button.Location = new System.Drawing.Point(340, 281); + this.belowItems2Button.Name = "belowItems2Button"; + this.belowItems2Button.Size = new System.Drawing.Size(47, 23); + this.belowItems2Button.TabIndex = 76; + this.belowItems2Button.Text = "Col. 2"; + this.belowItems2Button.UseVisualStyleBackColor = true; + this.belowItems2Button.Click += new System.EventHandler(this.belowItems2Button_Click); + // + // belowItems1Button + // + this.belowItems1Button.Enabled = false; + this.belowItems1Button.Location = new System.Drawing.Point(287, 281); + this.belowItems1Button.Name = "belowItems1Button"; + this.belowItems1Button.Size = new System.Drawing.Size(47, 23); + this.belowItems1Button.TabIndex = 75; + this.belowItems1Button.Text = "Col. 1"; + this.belowItems1Button.UseVisualStyleBackColor = true; + this.belowItems1Button.Click += new System.EventHandler(this.belowItems1Button_Click); + // + // table1FormComboBox + // + this.table1FormComboBox.Enabled = false; + this.table1FormComboBox.FormattingEnabled = true; + this.table1FormComboBox.Location = new System.Drawing.Point(388, 249); + this.table1FormComboBox.Name = "table1FormComboBox"; + this.table1FormComboBox.Size = new System.Drawing.Size(64, 21); + this.table1FormComboBox.TabIndex = 78; + // // PrinterCfgCtrl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.label8); - this.Controls.Add(this.label7); + this.Controls.Add(this.table1FormComboBox); + this.Controls.Add(this.belowItems3Button); + this.Controls.Add(this.belowItems2Button); + this.Controls.Add(this.belowItems1Button); + this.Controls.Add(this.label10); + this.Controls.Add(this.belowW0TextBox); + this.Controls.Add(this.label11); + this.Controls.Add(this.label12); + this.Controls.Add(this.label13); + this.Controls.Add(this.belowW2TextBox); + this.Controls.Add(this.belowW1TextBox); this.Controls.Add(this.label6); + this.Controls.Add(this.colW0TextBox); this.Controls.Add(this.label5); + this.Controls.Add(this.label7); + this.Controls.Add(this.label9); + this.Controls.Add(this.colW2TextBox); + this.Controls.Add(this.colW1TextBox); + this.Controls.Add(this.commonItems3Button); + this.Controls.Add(this.commonItems2Button); + this.Controls.Add(this.commonItems1Button); + this.Controls.Add(this.label8); this.Controls.Add(this.label4); this.Controls.Add(this.imageHeightTextBox); this.Controls.Add(this.imageWidthTextBox); @@ -630,7 +810,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter this.Controls.Add(this.templateLabel); this.Controls.Add(this.goodOnlyCheckBox); this.Controls.Add(this.testItems2Button); - this.Controls.Add(this.testsAreRowsCheckBox); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.bodyItalicCheckBox); @@ -648,7 +827,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter this.Controls.Add(this.titleFontFamilyComboBox); this.Controls.Add(this.cultureComboBox); this.Controls.Add(this.cultureLabel); - this.Controls.Add(this.commonItemsButton); this.Controls.Add(this.footerButton); this.Controls.Add(this.headerButton); this.Controls.Add(this.testItemsButton); @@ -685,8 +863,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter private System.Windows.Forms.TextBox leftMarginTextBox; private System.Windows.Forms.TextBox bottomMarginTextBox; private System.Windows.Forms.ComboBox cultureComboBox; - private System.Windows.Forms.Label cultureLabel; - private System.Windows.Forms.Button commonItemsButton; + private System.Windows.Forms.Label cultureLabel; private System.Windows.Forms.Button footerButton; private System.Windows.Forms.Button headerButton; private System.Windows.Forms.Button testItemsButton; @@ -706,8 +883,7 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter private System.Windows.Forms.CheckBox bodyItalicCheckBox; private System.Windows.Forms.CheckBox bodyBoldCheckBox; private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.CheckBox testsAreRowsCheckBox; + private System.Windows.Forms.Label label2; private System.Windows.Forms.Button testItems2Button; private System.Windows.Forms.CheckBox goodOnlyCheckBox; private System.Windows.Forms.TextBox templateTextBox; @@ -726,9 +902,27 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter private System.Windows.Forms.TextBox imageWidthTextBox; private System.Windows.Forms.TextBox imageHeightTextBox; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox colW0TextBox; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox colW2TextBox; + private System.Windows.Forms.TextBox colW1TextBox; + private System.Windows.Forms.Button commonItems3Button; + private System.Windows.Forms.Button commonItems2Button; + private System.Windows.Forms.Button commonItems1Button; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox belowW0TextBox; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox belowW2TextBox; + private System.Windows.Forms.TextBox belowW1TextBox; + private System.Windows.Forms.Button belowItems3Button; + private System.Windows.Forms.Button belowItems2Button; + private System.Windows.Forms.Button belowItems1Button; + private System.Windows.Forms.ComboBox table1FormComboBox; } } diff --git a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.cs b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.cs index c4ccb3f23..5d5666527 100644 --- a/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.cs +++ b/TBF/BenchControl/Output/Printers/OnePerMeter/PrinterCfgCtrl.cs @@ -31,9 +31,14 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter } string header; - string[] commonItems; - string[] testItems; + string[] commonItems1; + string[] commonItems2; + string[] commonItems3; + string[] testItems; string[] testItems2; + string[] belowItems1; + string[] belowItems2; + string[] belowItems3; string footer; public PrinterCfgCtrl() @@ -51,16 +56,26 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter bodyFontFamilyComboBox.Items.Add(ff.Name); footerFontFamilyComboBox.Items.Add(ff.Name); } + + for (TableForm f = 0; f < TableForm.Count; f++) + { + table1FormComboBox.Items.Add(f.ToString()); + } } - private void PrinterCfgCtrl_Load(object sender, EventArgs e) + private void PrinterCfgCtrl_Load(object sender, EventArgs e) { for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString()); header = config.Header; - commonItems = config.CommonItems; - testItems = config.SelectedItems; + commonItems1 = config.CommonItems1; + commonItems2 = config.CommonItems2; + commonItems3 = config.CommonItems3; + testItems = config.SelectedItems; testItems2 = config.SelectedItems2; + belowItems1 = config.BelowItems1; + belowItems2 = config.BelowItems2; + belowItems3 = config.BelowItems3; footer = config.Footer; Redraw(); @@ -72,8 +87,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter templateLabel.Text = "Template"; cultureLabel.Text = "Culture"; headerButton.Text = Strings.Header; - commonItemsButton.Text = "Common items"; - testItemsButton.Text = "Test items"; footerButton.Text = Strings.Footer; } @@ -81,13 +94,6 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter { } - PageOrientation GetOrientation(string str) - { - if (str.Equals(PageOrientation.Landscape.ToString())) return PageOrientation.Landscape; - if (str.Equals(PageOrientation.Portrait.ToString())) return PageOrientation.Portrait; - return (PageOrientation)(-1); - } - void Redraw() { if (config == null) return; /// Control was not loaded, settings were not changed @@ -119,9 +125,16 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter footerBoldCheckBox.Checked = ((config.FooterFntSty & (int)System.Drawing.FontStyle.Bold) != 0); footerItalicCheckBox.Checked = ((config.FooterFntSty & (int)System.Drawing.FontStyle.Italic) != 0); + colW0TextBox.Text = config.ColW0Pct.ToString(); + colW1TextBox.Text = config.ColW1Pct.ToString(); + colW2TextBox.Text = config.ColW2Pct.ToString(); + + belowW0TextBox.Text = config.BelowW0Pct.ToString(); + belowW1TextBox.Text = config.BelowW1Pct.ToString(); + belowW2TextBox.Text = config.BelowW2Pct.ToString(); + supressPrintingCheckBox.Checked = config.SupressPrinting; goodOnlyCheckBox.Checked = config.GoodOnly; - testsAreRowsCheckBox.Checked = config.TestsAreRows; cultureComboBox.Text = config.Culture.ToString(); @@ -131,6 +144,8 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter imageTopTextBox.Text = config.ImgTop.ToString(); imageWidthTextBox.Text = config.ImgWid.ToString(); imageHeightTextBox.Text = config.ImgHgh.ToString(); + + table1FormComboBox.Text = config.Form.ToString(); } public void Unlock() @@ -161,11 +176,22 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter goodOnlyCheckBox.Enabled = true; cultureComboBox.Enabled = true; headerButton.Enabled = true; - commonItemsButton.Enabled = true; - testItemsButton.Enabled = true; + colW0TextBox.Enabled = true; + colW1TextBox.Enabled = true; + colW2TextBox.Enabled = true; + commonItems1Button.Enabled = true; + commonItems2Button.Enabled = true; + commonItems3Button.Enabled = true; + table1FormComboBox.Enabled = true; + testItemsButton.Enabled = true; testItems2Button.Enabled = true; + belowW0TextBox.Enabled = true; + belowW1TextBox.Enabled = true; + belowW2TextBox.Enabled = true; + belowItems1Button.Enabled = true; + belowItems2Button.Enabled = true; + belowItems3Button.Enabled = true; footerButton.Enabled = true; - testsAreRowsCheckBox.Enabled = true; docNameTextBox.Enabled = true; imageNameTextBox.Enabled = true; imageLeftTextBox.Enabled = true; @@ -184,8 +210,8 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter flags |= CfgUpdateFlags.Error; } - int dummy; - if (!int.TryParse(topMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 500) + int dummy, dummy2, dummy3; + if (!int.TryParse(topMarginTextBox.Text, out dummy) || dummy < 0 || dummy > 500) { message += Environment.NewLine + "'Top margin' should be between 0 and 500"; flags |= CfgUpdateFlags.Error; @@ -233,6 +259,51 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter message += Environment.NewLine + "Invalid culture"; } + + if (!int.TryParse(colW0TextBox.Text, out dummy) || dummy < 0 || dummy > 100) + { + message += Environment.NewLine + "Column width 0 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (!int.TryParse(colW1TextBox.Text, out dummy2) || dummy2 < 0 || dummy2 > 100) + { + message += Environment.NewLine + "Column width 1 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (!int.TryParse(colW2TextBox.Text, out dummy3) || dummy3 < 0 || dummy3 > 100) + { + message += Environment.NewLine + "Column width 2 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (dummy + dummy2 + dummy3 > 100) + { + message += Environment.NewLine + "Sum of above column widths should be <= 100"; + flags |= CfgUpdateFlags.Error; + } + + + if (!int.TryParse(belowW0TextBox.Text, out dummy) || dummy < 0 || dummy > 100) + { + message += Environment.NewLine + "Column width 0 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (!int.TryParse(belowW1TextBox.Text, out dummy2) || dummy2 < 0 || dummy2 > 100) + { + message += Environment.NewLine + "Column width 1 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (!int.TryParse(belowW2TextBox.Text, out dummy3) || dummy3 < 0 || dummy3 > 100) + { + message += Environment.NewLine + "Column width 2 should be between 0 and 100"; + flags |= CfgUpdateFlags.Error; + } + if (dummy + dummy2 + dummy3 > 100) + { + message += Environment.NewLine + "Sum of below column widths should be <= 100"; + flags |= CfgUpdateFlags.Error; + } + + if (!int.TryParse(imageLeftTextBox.Text, out dummy) || dummy < 0 || dummy > 1100) { message += Environment.NewLine + "Image left' should be between 0 and 1100"; @@ -257,6 +328,12 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter flags |= CfgUpdateFlags.Error; } + if (!table1FormComboBox.Items.Contains(table1FormComboBox.Text)) + { + message += Environment.NewLine + "Invalid 'Table form'"; + flags |= CfgUpdateFlags.Error; + } + return flags; } @@ -316,12 +393,23 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - flags |= UpdateDifferent(ref config.TestsAreRows, testsAreRowsCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - flags |= UpdateDifferent(ref config.CommonItems, commonItems, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.ColW0Pct, colW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.ColW1Pct, colW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.ColW2Pct, colW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW0Pct, belowW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW1Pct, belowW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW2Pct, belowW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + + flags |= UpdateDifferent(ref config.Header, header, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.CommonItems1, commonItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.CommonItems2, commonItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.CommonItems3, commonItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.SelectedItems, testItems, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.SelectedItems2, testItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - flags |= UpdateDifferent(ref config.Header, header, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowItems1, belowItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowItems2, belowItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowItems3, belowItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.Footer, footer, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); for (Culture i = 0; i < Culture.Count; i++) @@ -334,6 +422,15 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter } } + for (TableForm f = 0; f < TableForm.Count; f++) + { + if (f.ToString().Equals(table1FormComboBox.Text)) + { + config.Form = f; + flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + } + } + flags |= UpdateDifferent(ref config.DocName, docNameTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.ImgName, imageNameTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.ImgLeft, imageLeftTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); @@ -358,20 +455,49 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter } } - private void commonItemsButton_Click(object sender, EventArgs e) + + private void commonItems1Button_Click(object sender, EventArgs e) { Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() { MetersKind = config.MetersKind, - SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems), + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems1), }; if (dlg.ShowDialog() == DialogResult.OK) { - commonItems = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + commonItems1 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); } } + private void commonItems2Button_Click(object sender, EventArgs e) + { + Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() + { + MetersKind = config.MetersKind, + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems2), + }; + + if (dlg.ShowDialog() == DialogResult.OK) + { + commonItems2 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + } + } + + private void commonItems3Button_Click(object sender, EventArgs e) + { + Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() + { + MetersKind = config.MetersKind, + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(commonItems3), + }; + + if (dlg.ShowDialog() == DialogResult.OK) + { + commonItems3 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + } + } + private void testItemsButton_Click(object sender, EventArgs e) { Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg(true) @@ -400,6 +526,48 @@ namespace TBF.BenchControl.Output.Printers.OnePerMeter } } + private void belowItems1Button_Click(object sender, EventArgs e) + { + Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() + { + MetersKind = config.MetersKind, + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems1), + }; + + if (dlg.ShowDialog() == DialogResult.OK) + { + belowItems1 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + } + } + + private void belowItems2Button_Click(object sender, EventArgs e) + { + Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() + { + MetersKind = config.MetersKind, + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems2), + }; + + if (dlg.ShowDialog() == DialogResult.OK) + { + belowItems2 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + } + } + + private void belowItems3Button_Click(object sender, EventArgs e) + { + Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg() + { + MetersKind = config.MetersKind, + SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(belowItems3), + }; + + if (dlg.ShowDialog() == DialogResult.OK) + { + belowItems3 = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems); + } + } + private void footerButton_Click(object sender, EventArgs e) { HeaderFooterDlg dlg = new HeaderFooterDlg(false, string.IsNullOrEmpty(footer) ? string.Empty : footer.Replace("~", Environment.NewLine)); diff --git a/TBF/BenchControl/Output/Printers/Zapiska/PrinterCfgCtrl.cs b/TBF/BenchControl/Output/Printers/Zapiska/PrinterCfgCtrl.cs index 7da498b90..b569ec77d 100644 --- a/TBF/BenchControl/Output/Printers/Zapiska/PrinterCfgCtrl.cs +++ b/TBF/BenchControl/Output/Printers/Zapiska/PrinterCfgCtrl.cs @@ -345,55 +345,25 @@ namespace TBF.BenchControl.Output.Printers.Zapiska flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - tmp = int.Parse(colW0TextBox.Text); - if (config.ColW0Pct != tmp) - { - config.ColW0Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } - tmp = int.Parse(colW1TextBox.Text); - if (config.ColW1Pct != tmp) - { - config.ColW1Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } - tmp = int.Parse(colW2TextBox.Text); - if (config.ColW2Pct != tmp) - { - config.ColW2Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } - tmp = int.Parse(belowW0TextBox.Text); - if (config.BelowW0Pct != tmp) - { - config.BelowW0Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } - tmp = int.Parse(belowW1TextBox.Text); - if (config.BelowW1Pct != tmp) - { - config.BelowW1Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } - tmp = int.Parse(belowW2TextBox.Text); - if (config.BelowW2Pct != tmp) - { - config.BelowW2Pct = tmp; - flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - } + flags |= UpdateDifferent(ref config.ColW0Pct, colW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.ColW1Pct, colW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.ColW2Pct, colW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW0Pct, belowW0TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW1Pct, belowW1TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowW2Pct, belowW2TextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.Header, header, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); flags |= UpdateDifferent(ref config.Footer, footer, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - if (config.CommonItems1 != commonItems1) { config.CommonItems1 = commonItems1; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } - if (config.CommonItems2 != commonItems2) { config.CommonItems2 = commonItems2; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } - if (config.CommonItems3 != commonItems3) { config.CommonItems3 = commonItems3; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } + flags |= UpdateDifferent(ref config.CommonItems1, commonItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.CommonItems2, commonItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.CommonItems3, commonItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - if (config.SelectedItems != testItems) { config.SelectedItems = testItems; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } + flags |= UpdateDifferent(ref config.SelectedItems, testItems, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); - if (config.BelowItems1 != belowItems1) { config.BelowItems1 = belowItems1; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } - if (config.BelowItems2 != belowItems2) { config.BelowItems2 = belowItems2; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } - if (config.BelowItems3 != belowItems3) { config.BelowItems3 = belowItems3; flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); } + flags |= UpdateDifferent(ref config.BelowItems1, belowItems1, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowItems2, belowItems2, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); + flags |= UpdateDifferent(ref config.BelowItems3, belowItems3, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange); for (Culture i = 0; i < Culture.Count; i++) { diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index e439bb286..dbb544377 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.864.0")] -[assembly: AssemblyFileVersion("2.18.864.0")] +[assembly: AssemblyVersion("2.18.866.0")] +[assembly: AssemblyFileVersion("2.18.866.0")]