|
|
@@ -24,9 +24,6 @@ namespace UAS_LabelMachine
|
|
|
//用于拼接条件查询
|
|
|
StringBuilder condition = new StringBuilder();
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
- /*CodeSoft新建打印机引擎*/
|
|
|
- ApplicationClass lbl;
|
|
|
- Document doc;
|
|
|
/*BarTender新建打印机引擎*/
|
|
|
//private Engine engine = null;
|
|
|
//private LabelFormatDocument format ;
|
|
|
@@ -78,7 +75,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
la_code.FormName = Name;
|
|
|
la_code.SetValueField = new string[] { "la_code" };
|
|
|
- la_code.TableName = "label";
|
|
|
+ la_code.TableName = "(select * from label order by la_id)";
|
|
|
la_code.SelectField = "la_code # 模板编号,la_name # 模板名称";
|
|
|
NetURL.Text = Settings.Default.ShareUrl;
|
|
|
}
|
|
|
@@ -97,7 +94,6 @@ namespace UAS_LabelMachine
|
|
|
LoadData();
|
|
|
Width = Width + 1;
|
|
|
asc.controllInitializeSize(this);
|
|
|
- lbl = new ApplicationClass();
|
|
|
Width = Width + 1;
|
|
|
}
|
|
|
|
|
|
@@ -105,10 +101,6 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (LabelDataGridView.Columns[e.ColumnIndex].HeaderText == "预览")
|
|
|
{
|
|
|
- if (lbl.Documents.Count > 0)
|
|
|
- {
|
|
|
- lbl.ActiveDocument.Close();
|
|
|
- }
|
|
|
//获取路径和标签名称
|
|
|
LabelPath = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelurl"].Value.ToString();
|
|
|
LabelCode = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelcode"].Value.ToString();
|
|
|
@@ -123,18 +115,6 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
time = System.DateTime.Now;
|
|
|
}
|
|
|
- if (CodeSoft.Checked)
|
|
|
- {
|
|
|
- string LabelName = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelname"].Value.ToString();
|
|
|
- doc = lbl.Documents.Open(BaseUtil.GetLabelUrl(LabelPath, LabelName,time));
|
|
|
- Bitmap bit = new Bitmap(doc.CopyImageToFile());
|
|
|
- pictureBox1.Image = bit;
|
|
|
- //如果文件已不存在则进行提示
|
|
|
- if (doc == null)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
if (LabelDataGridView.Columns[e.ColumnIndex].HeaderText == "编辑")
|
|
|
{
|
|
|
@@ -296,8 +276,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (LabelCode != "")
|
|
|
{
|
|
|
- doc.Printer.SwitchTo(PrinterList.Text);
|
|
|
- doc.PrintDocument();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -305,8 +284,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- lbl.Documents.CloseAll();
|
|
|
- lbl.Application.Quit();
|
|
|
+
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|