InventreeBarcodeGenerator/InventreeBarcodeGenerator/Drawing.cs

24 lines
1.2 KiB
C#

using BlubbFish.Applications.Barcodes.Inventree.Helpers;
using BlubbFish.Applications.Barcodes.Inventree.Models;
namespace BlubbFish.Applications.Barcodes.Inventree {
internal class Drawing {
public static void GetLabel(Graphics label, Ecia part) {
if(part is not null) {
label.DrawImage(DMHelper.GetDataMatrix(part), 0, 0, 90, 90);
label.DrawString("Reference", new Font("Arial", 6, FontStyle.Regular), Brushes.Black, 100, 2);
label.DrawString(part.CustomerPO, new Font("Arial", 10, FontStyle.Bold), Brushes.Black, 100, 10);
label.DrawString("SKU", new Font("Arial", 6, FontStyle.Regular), Brushes.Black, 100, 25);
label.DrawString(part.SKU, new Font("Arial", 10, FontStyle.Bold), Brushes.Black, 100, 33);
label.DrawString("Quantity", new Font("Arial", 6, FontStyle.Regular), Brushes.Black, 100, 48);
label.DrawString(part.Quantity.ToString(), new Font("Arial", 10, FontStyle.Bold), Brushes.Black, 100, 56);
label.DrawString("Position", new Font("Arial", 6, FontStyle.Regular), Brushes.Black, 100, 71);
label.DrawString(part.CustomerPOLine, new Font("Arial", 10, FontStyle.Bold), Brushes.Black, 100, 79);
}
}
}
}