Commit 5526cea4 张东亮

1

1 个父辈 4630d900
......@@ -45,7 +45,7 @@ namespace ShelfPrinter
lblLabelName.Text = labelName;
txtIp.Text = printerName; //printerNames[0];
print.Printer(printerName, false);
timer1.Enabled = true;
}
Asa.PrintLabel.PrinterStatus printerStatus = Asa.PrintLabel.PrinterStatus.Idle;
......@@ -85,7 +85,8 @@ namespace ShelfPrinter
text.Add("sj", label_LZ.shijian);
text.Add("zb", label_LZ.slot);
pictureBox1.Image = print.Print(text);
}catch(Exception ex)
}
catch (Exception ex)
{
LogUtil.error("printLabel", ex);
}
......@@ -125,7 +126,7 @@ namespace ShelfPrinter
private void button2_Click(object sender, EventArgs e)
{
printLabel(new Label_LZ(textBox1.Text, textBox3.Text, textBox4.Text, textBox2.Text,textBox5.Text,textBox6.Text));
printLabel(new Label_LZ(textBox1.Text, textBox3.Text, textBox4.Text, textBox2.Text, textBox5.Text, textBox6.Text));
}
string[] cids = ConfigAppSettings.GetValue("cid", "01#02").Split('#');
object handleObj = new object();
......@@ -146,12 +147,24 @@ namespace ShelfPrinter
//foreach (var item in labels)
{
lblLabelInfo.Text = $"打印任务[{item}]:{labels.ToStr()}";
//printLabel(new Label_LZ(labels.pn, labels.side, labels.station, labels.line));
//while (printerStatus.Equals(Asa.PrintLabel.PrinterStatus.Printing)
// || printerStatus.Equals(Asa.PrintLabel.PrinterStatus.Print))
//{
// Thread.Sleep(300);
//}
var printLbl = new Label_LZ(labels.pn, labels.side, labels.station, labels.line);
try
{
print.PrintPreview(printview(printLbl));
}
catch
{
}
printLabel(printLbl);
DateTime dateTime = DateTime.Now;
while (printerStatus.Equals(Asa.PrintLabel.PrinterStatus.Printing)
|| printerStatus.Equals(Asa.PrintLabel.PrinterStatus.Print))
{
if ((DateTime.Now - dateTime).TotalSeconds > 8)
break;
Thread.Sleep(300);
}
LogUtil.info($"自动打印[{printerStatus.ToString()}]:{labels.ToStr()}");
while (true)
{
......
......@@ -33,18 +33,19 @@
//
// ucRobot1
//
this.ucRobot1.Location = new System.Drawing.Point(13, 13);
this.ucRobot1.Margin = new System.Windows.Forms.Padding(4);
this.ucRobot1.Location = new System.Drawing.Point(12, 11);
this.ucRobot1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.ucRobot1.Name = "ucRobot1";
this.ucRobot1.Size = new System.Drawing.Size(704, 408);
this.ucRobot1.Size = new System.Drawing.Size(626, 340);
this.ucRobot1.TabIndex = 0;
//
// FrmRobot
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(759, 463);
this.ClientSize = new System.Drawing.Size(675, 386);
this.Controls.Add(this.ucRobot1);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FrmRobot";
this.Text = "机器人调试";
this.Load += new System.EventHandler(this.FrmRobot_Load);
......
......@@ -26,5 +26,10 @@ namespace OnlineStore.XLRStore.inputForm
JAKABean jAKABean = StoreManager.XLRStore.inputEquip.RobotServer.GetJAKABean(ip);
StoreManager.XLRStore.inputEquip.RobotServer.AssociateControl(ucRobot1, jAKABean);
}
private void ucRobot1_Load(object sender, EventArgs e)
{
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!