|
|
@@ -106,8 +106,9 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- lbl = new ApplicationClass();
|
|
|
- BaseUtil.WriteLbl();
|
|
|
+ //lbl = new ApplicationClass();
|
|
|
+ //BaseUtil.WriteLbl();
|
|
|
+ engine = new BarTender.Application();
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -337,7 +338,7 @@ namespace UAS_MES_NEW.Make
|
|
|
//关闭窗口的时候停止进程读取串口数据
|
|
|
private void 彩盒称重_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
{
|
|
|
- BaseUtil.ClosePrint(lbl);
|
|
|
+ //BaseUtil.ClosePrint(lbl);
|
|
|
StopWeight.PerformClick();
|
|
|
InitPrint.Abort();
|
|
|
if (serialPort1.IsOpen)
|
|
|
@@ -357,7 +358,7 @@ namespace UAS_MES_NEW.Make
|
|
|
if (PrintLabel.Items.Count != 0)
|
|
|
{
|
|
|
string oErrorMessage;
|
|
|
- if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
|
|
|
+ if (!Print.SinglePrint(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
|
|
|
{
|
|
|
OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
|
|
|
}
|