Browse Source

精简代码

callm 6 years ago
parent
commit
7fd8620618
1 changed files with 0 additions and 74 deletions
  1. 0 74
      UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

+ 0 - 74
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -7,12 +7,8 @@ using System.Text;
 using System.Collections.Generic;
 using System.Linq;
 using System.Diagnostics;
-using LabelManager2;
 using UAS_LabelMachine.PublicMethod;
 using UAS_LabelMachine.Entity;
-using UAS_LabelMachine.PublicForm;
-using System.Threading;
-using System.IO;
 using System.Globalization;
 using System.Reflection;
 
@@ -31,18 +27,6 @@ namespace UAS_LabelMachine
         /// </summary>
         StringBuilder sql = new StringBuilder();
         /// <summary>
-        /// CodeSoft新建打印机引擎
-        /// </summary>
-        ApplicationClass lbl;
-        /// <summary>
-        /// Loading窗口
-        /// </summary>
-        SetLoadingWindow stw;
-        /// <summary>
-        /// 弹窗线程
-        /// </summary>
-        Thread thread;
-        /// <summary>
         /// 当前品牌
         /// </summary>
         string Brand;
@@ -56,10 +40,6 @@ namespace UAS_LabelMachine
         /// </summary>
         int CurrentRowIndex = 0;
         /// <summary>
-        /// 最大的出入口单号
-        /// </summary>
-        int MaxOutBoxCode = 1;
-        /// <summary>
         /// 正则表达式用于项目匹配
         /// </summary>
         Regex reg;
@@ -73,34 +53,9 @@ namespace UAS_LabelMachine
         //每个不同序号存在的
         object[] ItemData;
 
-        DataTable SingleLabelParam;
-        DataTable MidLabelParam;
-        DataTable OutLabelParam;
-
         Dictionary<string, string> CollectData;
-        //缓存单盘数据数据的DataTable
-        DataTable SingleBoxCacheData;
-        /// <summary>
-        /// 存放单盘的ID
-        /// </summary>
-        List<string> SingleID = new List<string>();
-        /// <summary>
-        /// 单盘的打印参数
-        /// </summary>
-        List<string> SingleBoxArgument = new List<string>();
-        /// <summary>
-        /// 中盒缓存数据
-        /// </summary>
-        DataTable MidBoxCacheData;
-        /// <summary>
-        /// 存放中盒的ID和盒号
-        /// </summary>
         Dictionary<string, string> MidIDAndOutboxcode = new Dictionary<string, string>();
         /// <summary>
-        /// 中盒的打印参数
-        /// </summary>
-        List<string> MidBoxArgument = new List<string>();
-        /// <summary>
         /// 全部采集
         /// </summary>
         bool AllCollect = false;
@@ -108,20 +63,12 @@ namespace UAS_LabelMachine
         /// 是否全选
         /// </summary>
         bool AllChecked = false;
-        /// <summary>
-        /// 是否获取过箱号
-        /// </summary>
-        bool GetPackingCode = false;
         /*用于存放采集项目的Grid信息*/
         Dictionary<string, Dictionary<string, string>> SiItem;
         int CloumnCount = 0;
         //使用二维数组进行排序
         ArrayList<ArrayList<string>> ScanData;
         ArrayList<string> GetData;
-        /// <summary>
-        /// 是否通过选择Combox来改变打开的文件
-        /// </summary>
-        bool ComBoxClickChangeLabelDoc = false;
 
         List<string> SingleParam = new List<string>();
 
@@ -166,9 +113,6 @@ namespace UAS_LabelMachine
             CloumnCount = LabelInf.Columns.Count;
             pi_inoutno.Focus();
             //将本地读取的打印机设置进Combox,并选中默认打印机
-
-            MidBoxCacheData = new DataTable();
-            SingleBoxCacheData = new DataTable();
             sg_code.FormName = Name;
             sg_code.SetValueField = new string[] { "sg_code" };
             sg_code.SelectField = "sg_code # 策略编号 ,sg_name # 策略名称,sg_brand # 品牌,sg_separator # 分隔符";
@@ -202,15 +146,6 @@ namespace UAS_LabelMachine
             Height = ScreenArea.Height;
             asc.controllInitializeSize(this);
             asc.controlAutoSize(this);
-            //实例化打印进程
-            try
-            {
-                lbl = new ApplicationClass();
-            }
-            catch (Exception)
-            {
-                MessageBox.Show("未安装CodeSoft软件或者版本不正确");
-            }
             RefreshDBConnect.Interval = 60000;
             RefreshDBConnect.Start();
         }
@@ -824,7 +759,6 @@ namespace UAS_LabelMachine
                     e.Cancel = true;
                 else
                 {
-                    lbl.Quit();
                     LogManager.DoLog("关闭程序");
                 }
             }
@@ -854,14 +788,7 @@ namespace UAS_LabelMachine
                     }
                     LoadGridData(sender, e);
                     //重新输入单号后清除缓存
-                    MidBoxArgument.Clear();
-                    MidBoxCacheData.Clear();
-                    BaseUtil.CleanDataTable(MidBoxCacheData);
-                    SingleBoxArgument.Clear();
-                    SingleBoxCacheData.Clear();
-                    BaseUtil.CleanDataTable(SingleBoxCacheData);
                     MidIDAndOutboxcode.Clear();
-                    SingleID.Clear();
                     //刷新采集进度
                     RefreshProcessData();
                     //设置当前的最大箱号
@@ -1125,7 +1052,6 @@ namespace UAS_LabelMachine
                 //注销的时候需要将拼接的连接字符串置空
                 DataHelper.DBConnectionString = null;
                 logout = true;
-                lbl.Quit();
                 this.Hide();
                 login.ShowDialog();
                 this.Close();