diff --git a/DataStore/Settings.cs b/DataStore/Settings.cs index 1421cc9..70f4e87 100644 --- a/DataStore/Settings.cs +++ b/DataStore/Settings.cs @@ -70,6 +70,18 @@ public class PdfExportSettings public bool exportRunningSheets { get; set; } = true; public int rsNumGrouped { get; set; } = 25; public int rsPlzStartpoint { get; set; } = 2; + + public string rsKNrAbs { get; set; } = ""; + public string rsKNrEmp { get; set; } = ""; + public string rsZKZ { get; set; } = ""; + public string rsIntVer { get; set; } = ""; + public string rsLaufz { get; set; } = ""; + public string rsEinldat { get; set; } = ""; + public string rsAMANr { get; set; } = ""; + public string rsBundGew { get; set; } = ""; + public int rsPalNr { get; set; } = 1; + public int rsBundNrPal { get; set; } = 20; + } public class Global diff --git a/MainWindow.axaml b/MainWindow.axaml index b4829d8..d2216de 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -251,78 +251,126 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 384ece8..fe66f2d 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -936,6 +936,17 @@ public partial class MainWindow : Window NudExpMargColumnsPerPage.Value = options.columnsPerPage; NudExpMargFontSize.Value = (decimal)options.fontSize; NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize; + + TbExpRnsKNrAbs.Text = options.rsKNrAbs; + TbExpRnsKNrEmp.Text = options.rsKNrEmp; + TbExpRnsZKZ.Text = options.rsZKZ; + TbExpRnsIntVer.Text = options.rsIntVer; + TbExpRnsLaufz.Text = options.rsLaufz; + TbExpRnsEinldat.Text = options.rsEinldat; + TbExpRnsAMANr.Text = options.rsAMANr; + TbExpRnsBundGew.Text = options.rsBundGew; + NudExpRnsPalNr.Value = options.rsPalNr; + NudExpRnsBundNrPal.Value = options.rsBundNrPal; } catch (Exception ex) { @@ -959,7 +970,18 @@ public partial class MainWindow : Window rowsPerPage = ReadInt(TbExpMargRowsPerPage, 7), columnsPerPage = ReadInt(NudExpMargColumnsPerPage, 3), fontSize = ReadDouble(NudExpMargFontSize), - smallFontSize = ReadDouble(NudExpMargSmallFontSize) + smallFontSize = ReadDouble(NudExpMargSmallFontSize), + + rsKNrAbs = TbExpRnsKNrAbs.Text, + rsKNrEmp = TbExpRnsKNrEmp.Text, + rsZKZ = TbExpRnsZKZ.Text, + rsIntVer = TbExpRnsIntVer.Text, + rsLaufz = TbExpRnsLaufz.Text, + rsEinldat = TbExpRnsEinldat.Text, + rsAMANr = TbExpRnsAMANr.Text, + rsBundGew = TbExpRnsBundGew.Text, + rsPalNr = ReadInt(NudExpRnsPalNr, 1), + rsBundNrPal = ReadInt(NudExpRnsBundNrPal, 20) }; Settings.Save(); diff --git a/Tasks/PdfBuilder.cs b/Tasks/PdfBuilder.cs index 58bbb7a..d04f886 100644 --- a/Tasks/PdfBuilder.cs +++ b/Tasks/PdfBuilder.cs @@ -639,6 +639,8 @@ public class PdfBuilder string amount = result.Item5?.ToString() ?? "[Anzahl]"; string groupNo = result.Item2?.ToString() ?? "[PLZ]"; string fraction = result.Item1?.ToString() ?? "[Fraktion]"; + + var options = Settings._instance.pdfExport; int total_frac = 0; foreach (var item in grouped_nums) @@ -704,8 +706,8 @@ public class PdfBuilder // Values top row gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Kunden-Nr. Absender]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft); - gfx.DrawString("[ZKZ/Titel]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsKNrAbs, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsZKZ, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft); gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft); // Second row labels @@ -716,9 +718,9 @@ public class PdfBuilder // Second row values gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Kunden-Nr. Einlieferer]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Interne Vermerke]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Laufzeit]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsKNrEmp, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsIntVer, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsLaufz, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft); // Middle area gfx.DrawString(groupNo, fontBig, XBrushes.Black, @@ -767,23 +769,23 @@ public class PdfBuilder double valueX = x + leftBottomW * 0.55; double valueW = leftBottomW - (valueX - x) - 5; - gfx.DrawString("[Einlieferungsdatum]", fontText, XBrushes.Black, + gfx.DrawString(options.rsEinldat, fontText, XBrushes.Black, new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[AM-Auftragsnummer]", fontText, XBrushes.Black, + gfx.DrawString(options.rsAMANr, fontText, XBrushes.Black, new XRect(valueX, blY1 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Bundgewicht]", fontText, XBrushes.Black, + gfx.DrawString(options.rsBundGew, fontText, XBrushes.Black, new XRect(valueX, blY2 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black, + gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black, new XRect(valueX, blY3 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Bund-Nr./Bunde auf Palette]", fontText, XBrushes.Black, + gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black, new XRect(valueX, blY4 + 4, valueW, 14), XStringFormats.TopRight); @@ -978,6 +980,8 @@ public class PdfBuilder string groupNo = result.Item2?.ToString() ?? "[PLZ]"; string fraction = result.Item1?.ToString() ?? "[Fraktion]"; + var options = Settings._instance.pdfExport; + int total_frac = 0; foreach (var item in grouped_nums) { @@ -1042,8 +1046,8 @@ public class PdfBuilder // Values top row gfx.DrawString(sender, fontText, XBrushes.Black, new XRect(x + 5, y + 20, c1 - 10, r1 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Kunden-Nr. Absender]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft); - gfx.DrawString("[ZKZ/Titel]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsKNrAbs, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + 20, c2 - 10, r1 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsZKZ, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + 20, c3 - 10, r1 - 22), XStringFormats.TopLeft); gfx.DrawString(amount, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + 20, c4 - 10, r1 - 22), XStringFormats.TopLeft); // Second row labels @@ -1054,9 +1058,9 @@ public class PdfBuilder // Second row values gfx.DrawString(customerName, fontText, XBrushes.Black, new XRect(x + 5, y + r1 + 20, c1 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Kunden-Nr. Einlieferer]", fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Interne Vermerke]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft); - gfx.DrawString("[Laufzeit]", fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsKNrEmp, fontText, XBrushes.Black, new XRect(x + c1 + 5, y + r1 + 20, c2 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsIntVer, fontText, XBrushes.Black, new XRect(x + c1 + c2 + 5, y + r1 + 20, c3 - 10, r2 - 22), XStringFormats.TopLeft); + gfx.DrawString(options.rsLaufz, fontText, XBrushes.Black, new XRect(x + c1 + c2 + c3 + 5, y + r1 + 20, c4 - 10, r2 - 22), XStringFormats.TopLeft); // Middle area gfx.DrawString(groupNo, fontBig, XBrushes.Black, @@ -1105,23 +1109,23 @@ public class PdfBuilder double valueX = x + leftBottomW * 0.55; double valueW = leftBottomW - (valueX - x) - 5; - gfx.DrawString("[Einlieferungsdatum]", fontText, XBrushes.Black, + gfx.DrawString(options.rsEinldat, fontText, XBrushes.Black, new XRect(valueX, y + r1 + r2 + r3 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[AM-Auftragsnummer]", fontText, XBrushes.Black, + gfx.DrawString(options.rsAMANr, fontText, XBrushes.Black, new XRect(valueX, blY1 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Bundgewicht]", fontText, XBrushes.Black, + gfx.DrawString(options.rsBundGew, fontText, XBrushes.Black, new XRect(valueX, blY2 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black, + gfx.DrawString(options.rsPalNr.ToString(), fontText, XBrushes.Black, new XRect(valueX, blY3 + 4, valueW, 14), XStringFormats.TopRight); - gfx.DrawString("[Bund-Nr./Bunde auf Palette]", fontText, XBrushes.Black, + gfx.DrawString("[Paletten-Nr.]", fontText, XBrushes.Black, new XRect(valueX, blY4 + 4, valueW, 14), XStringFormats.TopRight);