Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8745286860 | ||
|
|
321d22eb60 | ||
|
|
e8c159831e |
+4
-1
@@ -994,6 +994,7 @@ public partial class MainWindow : Window
|
|||||||
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
||||||
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
||||||
CbExpRnsPvSt.IsChecked = options.rsPvSt;
|
CbExpRnsPvSt.IsChecked = options.rsPvSt;
|
||||||
|
CbExpRnsEnable.IsChecked = options.exportRunningSheets;
|
||||||
|
|
||||||
TbExpRnsKNrAbs.Text = options.rsKNrAbs;
|
TbExpRnsKNrAbs.Text = options.rsKNrAbs;
|
||||||
TbExpRnsKNrEmp.Text = options.rsKNrEmp;
|
TbExpRnsKNrEmp.Text = options.rsKNrEmp;
|
||||||
@@ -1040,8 +1041,10 @@ public partial class MainWindow : Window
|
|||||||
rsBundGew = TbExpRnsBundGew.Text,
|
rsBundGew = TbExpRnsBundGew.Text,
|
||||||
rsPalNr = ReadInt(NudExpRnsPalNr, 1),
|
rsPalNr = ReadInt(NudExpRnsPalNr, 1),
|
||||||
rsBundNrPal = ReadInt(NudExpRnsBundNrPal, 20),
|
rsBundNrPal = ReadInt(NudExpRnsBundNrPal, 20),
|
||||||
|
rsNumGrouped = ReadInt(NudExpRnsPlzcount, 25),
|
||||||
|
|
||||||
rsPvSt = CbExpRnsPvSt.IsChecked.Value
|
rsPvSt = CbExpRnsPvSt.IsChecked.Value,
|
||||||
|
exportRunningSheets = CbExpRnsEnable.IsChecked.Value
|
||||||
};
|
};
|
||||||
|
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
|
|||||||
+60
-52
@@ -197,7 +197,7 @@ public class PdfBuilder
|
|||||||
{
|
{
|
||||||
if (addresses == null || addresses.Count == 0)
|
if (addresses == null || addresses.Count == 0)
|
||||||
throw new ArgumentException("Addresses array cannot be null or empty");
|
throw new ArgumentException("Addresses array cannot be null or empty");
|
||||||
|
|
||||||
var document = new PdfDocument();
|
var document = new PdfDocument();
|
||||||
|
|
||||||
var addressIndex = 0;
|
var addressIndex = 0;
|
||||||
@@ -712,12 +712,14 @@ public class PdfBuilder
|
|||||||
var fontBig = new XFont("Arial", 30, XFontStyleEx.Bold);
|
var fontBig = new XFont("Arial", 30, XFontStyleEx.Bold);
|
||||||
|
|
||||||
int firstIndex = pageIndex * 2;
|
int firstIndex = pageIndex * 2;
|
||||||
int palletNumber =
|
int? palletNumber = null;
|
||||||
Settings._instance.pdfExport.rsPalNr +
|
int? bundleOnPallet = null;
|
||||||
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
if (Settings._instance.pdfExport.rsBundNrPal > 0)
|
||||||
|
{
|
||||||
int bundleOnPallet =
|
palletNumber = Settings._instance.pdfExport.rsPalNr +
|
||||||
(firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||||
|
bundleOnPallet = (firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
DrawGermanyRunningSheet(
|
DrawGermanyRunningSheet(
|
||||||
gfx,
|
gfx,
|
||||||
@@ -738,12 +740,14 @@ public class PdfBuilder
|
|||||||
|
|
||||||
int secondIndex = firstIndex + 1;
|
int secondIndex = firstIndex + 1;
|
||||||
|
|
||||||
int palletNumber2 =
|
int? palletNumber2 = null;
|
||||||
Settings._instance.pdfExport.rsPalNr +
|
int? bundleOnPallet2 = null;
|
||||||
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
if (Settings._instance.pdfExport.rsBundNrPal > 0)
|
||||||
|
{
|
||||||
int bundleOnPallet2 =
|
palletNumber2 = Settings._instance.pdfExport.rsPalNr +
|
||||||
(secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||||
|
bundleOnPallet2 = (secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (firstIndex + 1 < grouped_nums.Count)
|
if (firstIndex + 1 < grouped_nums.Count)
|
||||||
{
|
{
|
||||||
@@ -769,7 +773,7 @@ public class PdfBuilder
|
|||||||
document.Save(path);
|
document.Save(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawGermanyRunningSheet(XGraphics gfx, double x, double y, double w, double h, KasAddressList list, dynamic result, List<(int,string,string,string,int)> grouped_nums, XFont fontLabel, XFont fontText, XFont fontBig, int pal_nr, int bundleOnPallet, int totalBundleNumber)
|
private void DrawGermanyRunningSheet(XGraphics gfx, double x, double y, double w, double h, KasAddressList list, dynamic result, List<(int,string,string,string,int)> grouped_nums, XFont fontLabel, XFont fontText, XFont fontBig, int? pal_nr, int? bundleOnPallet, int totalBundleNumber)
|
||||||
{
|
{
|
||||||
double line = 1.0;
|
double line = 1.0;
|
||||||
|
|
||||||
@@ -917,20 +921,20 @@ public class PdfBuilder
|
|||||||
new XRect(valueX, blY1 + 4, valueW, 14),
|
new XRect(valueX, blY1 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
if (options.rsBundNrPal == null) goto nopal;
|
if (options.rsBundNrPal > 0)
|
||||||
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
|
{
|
||||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
gfx.DrawString(pal_nr?.ToString() ?? string.Empty, fontText, XBrushes.Black,
|
||||||
XStringFormats.TopRight);
|
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||||
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
|
gfx.DrawString(
|
||||||
gfx.DrawString(
|
$"{bundleOnPallet}/{options.rsBundNrPal}",
|
||||||
$"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}",
|
fontText,
|
||||||
fontText,
|
XBrushes.Black,
|
||||||
XBrushes.Black,
|
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
XStringFormats.TopRight);
|
||||||
XStringFormats.TopRight);
|
}
|
||||||
|
|
||||||
nopal:
|
|
||||||
gfx.DrawString(
|
gfx.DrawString(
|
||||||
$"{totalBundleNumber}/{grouped_nums.Count}",
|
$"{totalBundleNumber}/{grouped_nums.Count}",
|
||||||
fontText,
|
fontText,
|
||||||
@@ -987,12 +991,14 @@ public class PdfBuilder
|
|||||||
|
|
||||||
int firstIndex = pageIndex * 2;
|
int firstIndex = pageIndex * 2;
|
||||||
|
|
||||||
int palletNumber =
|
int? palletNumber = null;
|
||||||
Settings._instance.pdfExport.rsPalNr +
|
int? bundleOnPallet = null;
|
||||||
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
if (Settings._instance.pdfExport.rsBundNrPal > 0)
|
||||||
|
{
|
||||||
int bundleOnPallet =
|
palletNumber = Settings._instance.pdfExport.rsPalNr +
|
||||||
(firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
(firstIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||||
|
bundleOnPallet = (firstIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1017,12 +1023,14 @@ public class PdfBuilder
|
|||||||
{
|
{
|
||||||
int secondIndex = firstIndex + 1;
|
int secondIndex = firstIndex + 1;
|
||||||
|
|
||||||
int palletNumber2 =
|
int? palletNumber2 = null;
|
||||||
Settings._instance.pdfExport.rsPalNr +
|
int? bundleOnPallet2 = null;
|
||||||
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
if (Settings._instance.pdfExport.rsBundNrPal > 0)
|
||||||
|
{
|
||||||
int bundleOnPallet2 =
|
palletNumber2 = Settings._instance.pdfExport.rsPalNr +
|
||||||
(secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
(secondIndex / Settings._instance.pdfExport.rsBundNrPal);
|
||||||
|
bundleOnPallet2 = (secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
DrawInternationalRunningSheet(
|
DrawInternationalRunningSheet(
|
||||||
gfx,
|
gfx,
|
||||||
@@ -1045,7 +1053,7 @@ public class PdfBuilder
|
|||||||
|
|
||||||
document.Save(path);
|
document.Save(path);
|
||||||
}
|
}
|
||||||
private void DrawInternationalRunningSheet(XGraphics gfx, double x, double y, double w, double h, KasAddressList list, dynamic result, List<(int,string,string,string,int)> grouped_nums, XFont fontLabel, XFont fontText, XFont fontBig, int pal_nr, int bundleOnPallet, int totalBundleNumber, string category = "ECONOMY Non-EU")
|
private void DrawInternationalRunningSheet(XGraphics gfx, double x, double y, double w, double h, KasAddressList list, dynamic result, List<(int,string,string,string,int)> grouped_nums, XFont fontLabel, XFont fontText, XFont fontBig, int? pal_nr, int? bundleOnPallet, int totalBundleNumber, string category = "ECONOMY Non-EU")
|
||||||
{
|
{
|
||||||
double line = 1.0;
|
double line = 1.0;
|
||||||
|
|
||||||
@@ -1197,20 +1205,20 @@ public class PdfBuilder
|
|||||||
new XRect(valueX, blY2 + 4, valueW, 14),
|
new XRect(valueX, blY2 + 4, valueW, 14),
|
||||||
XStringFormats.TopRight);
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
if (options.rsBundNrPal == 0) goto nopal;
|
if (options.rsBundNrPal > 0)
|
||||||
gfx.DrawString(pal_nr.ToString(), fontText, XBrushes.Black,
|
{
|
||||||
new XRect(valueX, blY3 + 4, valueW, 14),
|
gfx.DrawString(pal_nr?.ToString() ?? string.Empty, fontText, XBrushes.Black,
|
||||||
XStringFormats.TopRight);
|
new XRect(valueX, blY3 + 4, valueW, 14),
|
||||||
|
XStringFormats.TopRight);
|
||||||
|
|
||||||
|
gfx.DrawString(
|
||||||
|
$"{bundleOnPallet}/{options.rsBundNrPal}",
|
||||||
|
fontText,
|
||||||
|
XBrushes.Black,
|
||||||
|
new XRect(valueX, blY4 + 4, valueW, 14),
|
||||||
|
XStringFormats.TopRight);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gfx.DrawString(
|
|
||||||
$"{bundleOnPallet}/{Settings._instance.pdfExport.rsBundNrPal}",
|
|
||||||
fontText,
|
|
||||||
XBrushes.Black,
|
|
||||||
new XRect(valueX, blY4 + 4, valueW, 14),
|
|
||||||
XStringFormats.TopRight);
|
|
||||||
|
|
||||||
nopal:
|
|
||||||
gfx.DrawString(
|
gfx.DrawString(
|
||||||
$"{totalBundleNumber}/{grouped_nums.Count}",
|
$"{totalBundleNumber}/{grouped_nums.Count}",
|
||||||
fontText,
|
fontText,
|
||||||
|
|||||||
Reference in New Issue
Block a user