Browse Source

代码优化

章政 7 years ago
parent
commit
1690667c28
1 changed files with 3 additions and 18 deletions
  1. 3 18
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

+ 3 - 18
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -28,10 +28,6 @@ namespace UAS_LabelMachine
 
         StringBuilder sql = new StringBuilder();
         /// <summary>
-        /// CodeSoft新建打印机引擎
-        /// </summary>
-        ApplicationClass lbl;
-        /// <summary>
         /// 单盘打印文件
         /// </summary>
         Report SingleReport = new Report();
@@ -151,15 +147,6 @@ namespace UAS_LabelMachine
             SingleLabelPrinter.Text = Properties.Settings.Default.SPrinter;
             asc.controllInitializeSize(this);
             asc.controlAutoSize(this);
-            //实例化打印进程
-            try
-            {
-                lbl = new ApplicationClass();
-            }
-            catch (Exception)
-            {
-                MessageBox.Show("未安装CodeSoft软件或者版本不正确", "提示");
-            }
             RefreshDBConnect.Interval = 60000;
             RefreshDBConnect.Start();
         }
@@ -442,7 +429,6 @@ namespace UAS_LabelMachine
                     e.Cancel = true;
                 else
                 {
-                    lbl.Quit();
                     LogManager.DoLog("关闭程序");
                 }
             }
@@ -1063,7 +1049,6 @@ namespace UAS_LabelMachine
                 //注销的时候需要将拼接的连接字符串置空
                 DataHelper.DBConnectionString = null;
                 logout = true;
-                lbl.Quit();
                 this.Hide();
                 login.ShowDialog();
                 this.Close();
@@ -1083,7 +1068,7 @@ namespace UAS_LabelMachine
             {
                 if (ComBoxClickChangeLabelDoc)
                 {
-
+                    SingleReport.Load(SingleLabelCombox.Text);
                 }
             }
             catch (Exception) { }
@@ -1100,7 +1085,7 @@ namespace UAS_LabelMachine
             {
                 if (ComBoxClickChangeLabelDoc)
                 {
-
+                    MidReport.Load(MidLabelCombox.Text);
                 }
             }
             catch (Exception) { }
@@ -1117,7 +1102,7 @@ namespace UAS_LabelMachine
             {
                 if (ComBoxClickChangeLabelDoc)
                 {
-
+                    OutReport.Load(OutBoxCombox.Text);
                 }
             }
             catch (Exception) { }