|
|
@ -40,11 +40,11 @@ namespace BBWY.Client.Helpers |
|
|
|
//SetBarStander(barCode, ref args, font);
|
|
|
|
break; |
|
|
|
case BarcodeLabelModel.精简模板: |
|
|
|
font = new Font("宋体", 10, System.Drawing.FontStyle.Regular); |
|
|
|
//SetBar(barCode, ref args, font, 15);
|
|
|
|
//font = new Font("宋体", 10, System.Drawing.FontStyle.Regular);
|
|
|
|
////SetBar(barCode, ref args, font, 15);
|
|
|
|
|
|
|
|
SetBarSimplify(barCode, ref args, font); |
|
|
|
break; |
|
|
|
//SetBarSimplify(barCode, ref args, font);
|
|
|
|
//break;
|
|
|
|
case BarcodeLabelModel.无型号模板: |
|
|
|
font = new Font("宋体", 10, System.Drawing.FontStyle.Regular); |
|
|
|
SetBar(barCode, ref args, font, 7); |
|
|
@ -61,26 +61,26 @@ namespace BBWY.Client.Helpers |
|
|
|
string barcodeSku = $"POP{barCode.SkuId}"; |
|
|
|
Barcode barcode = new Barcode(); |
|
|
|
System.Drawing.Image img = barcode.Encode(TYPE.CODE128, barcodeSku, 500, 40); |
|
|
|
SizeF size = args.Graphics.MeasureString("品牌", font); |
|
|
|
SizeF size = args.Graphics.MeasureString("品名", font); |
|
|
|
var sizeHeight = size.Height;//字体高度
|
|
|
|
topHeigth += 10; |
|
|
|
|
|
|
|
switch (barCode.LabelModel) |
|
|
|
{ |
|
|
|
case BarcodeLabelModel.无型号模板: |
|
|
|
case BarcodeLabelModel.标准模板: |
|
|
|
args.Graphics.DrawString($"品牌: {barCode.Brand}", font, System.Drawing.Brushes.Black, new PointF(10, topHeigth)); |
|
|
|
topHeigth += (heightSpace + sizeHeight); |
|
|
|
break; |
|
|
|
case BarcodeLabelModel.精简模板: |
|
|
|
break; |
|
|
|
} |
|
|
|
//switch (barCode.LabelModel)
|
|
|
|
//{
|
|
|
|
// case BarcodeLabelModel.无型号模板:
|
|
|
|
// case BarcodeLabelModel.标准模板:
|
|
|
|
// args.Graphics.DrawString($"品牌: {barCode.Brand}", font, System.Drawing.Brushes.Black, new PointF(10, topHeigth));
|
|
|
|
// topHeigth += (heightSpace + sizeHeight);
|
|
|
|
// break;
|
|
|
|
// case BarcodeLabelModel.精简模板:
|
|
|
|
// break;
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//args.Graphics.DrawString($"品名: {barCode.BrandName}", font, System.Drawing.Brushes.Black, new PointF(10, topHeigth));
|
|
|
|
//topHeigth += (heightSpace + sizeHeight);
|
|
|
|
args.Graphics.DrawString($"品名: {barCode.BrandName}", font, System.Drawing.Brushes.Black, new PointF(10, topHeigth)); |
|
|
|
topHeigth += (heightSpace + sizeHeight); |
|
|
|
|
|
|
|
|
|
|
|
switch (barCode.LabelModel) |
|
|
|