Prechádzať zdrojové kódy

EDID抄写功能完成。

sat23 3 rokov pred
rodič
commit
1d169a807c

+ 121 - 136
SCBC Factory Tools/Business/CommonMethod.cs

@@ -55,20 +55,21 @@ namespace MOKA_Factory_Tools
                     {
                     {
                         if (Convert.ToBoolean(mo["IPEnabled"]))
                         if (Convert.ToBoolean(mo["IPEnabled"]))
                         {
                         {
-                            if(j<2)
+                            if (j < 2)
                             {
                             {
                                 mac = mo["MacAddress"].ToString() + "&" + mac;
                                 mac = mo["MacAddress"].ToString() + "&" + mac;
-                                j++;                           }
-                            
+                                j++;
+                            }
+
                         }
                         }
                         else
                         else
                         {
                         {
-                            if(i<1)
+                            if (i < 1)
                             {
                             {
                                 mac += mo["MacAddress"].ToString() + "&";
                                 mac += mo["MacAddress"].ToString() + "&";
                                 i++;
                                 i++;
-                            }                            
-                        }                       
+                            }
+                        }
                     }
                     }
                 }
                 }
             }
             }
@@ -88,7 +89,7 @@ namespace MOKA_Factory_Tools
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="mid"></param>
         /// <param name="mid"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool GetMidInfo(string url, string order, string pcmac, string iptvip, string version, SQLiteConnection sqliteConn,out MidList mid)
+        public static bool GetMidInfo(string url, string order, string pcmac, string iptvip, string version, SQLiteConnection sqliteConn, out MidList mid)
         {
         {
             mid = new MidList();
             mid = new MidList();
             OrderInput orderInput1 = new OrderInput { bid = order, mac = pcmac, version = "", clientType = "" };//"74-27-EA-6E-DA-9F"
             OrderInput orderInput1 = new OrderInput { bid = order, mac = pcmac, version = "", clientType = "" };//"74-27-EA-6E-DA-9F"
@@ -98,12 +99,12 @@ namespace MOKA_Factory_Tools
             {
             {
                 URL = url,//URL这里都是测试URl   必需项
                 URL = url,//URL这里都是测试URl   必需项
                 Encoding = Encoding.UTF8,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
                 Encoding = Encoding.UTF8,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
-                                //Encoding = Encoding.Default,
+                                         //Encoding = Encoding.Default,
                 Method = "post",//URL     可选项 默认为Get
                 Method = "post",//URL     可选项 默认为Get
                 Postdata = jsonorder,
                 Postdata = jsonorder,
-                PostEncoding= Encoding.UTF8,
+                PostEncoding = Encoding.UTF8,
                 KeepAlive = false
                 KeepAlive = false
-            };            
+            };
             item.ContentType = "application/json;charset=utf-8";
             item.ContentType = "application/json;charset=utf-8";
             System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
             System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
             stopwatch.Start();
             stopwatch.Start();
@@ -135,24 +136,24 @@ namespace MOKA_Factory_Tools
                 mid.clienttype = jObject["clientType"].Value<string>();
                 mid.clienttype = jObject["clientType"].Value<string>();
                 mid.host = jObject["host"].Value<string>();
                 mid.host = jObject["host"].Value<string>();
                 mid.whiteType = jObject["whiteType"].Value<string>();
                 mid.whiteType = jObject["whiteType"].Value<string>();
-                object a=jObject["rokuCustomer"];
-                if (jObject["rokuCustomer"].ToString().Length>0)
+                object a = jObject["rokuCustomer"];
+                if (jObject["rokuCustomer"].ToString().Length > 0)
                     mid.rokuCustomer = new RokuCustomer()
                     mid.rokuCustomer = new RokuCustomer()
                     {
                     {
                         id = JSON_SeleteNode(jObject["rokuCustomer"], "id").Trim(),
                         id = JSON_SeleteNode(jObject["rokuCustomer"], "id").Trim(),
-                        ordernum= JSON_SeleteNode(jObject["rokuCustomer"], "ordernum").Trim(),
+                        ordernum = JSON_SeleteNode(jObject["rokuCustomer"], "ordernum").Trim(),
                         brand = JSON_SeleteNode(jObject["rokuCustomer"], "brand").Trim(),
                         brand = JSON_SeleteNode(jObject["rokuCustomer"], "brand").Trim(),
                         region = JSON_SeleteNode(jObject["rokuCustomer"], "region").Trim(),
                         region = JSON_SeleteNode(jObject["rokuCustomer"], "region").Trim(),
                         oemmodel = JSON_SeleteNode(jObject["rokuCustomer"], "oemmodel").Trim(),
                         oemmodel = JSON_SeleteNode(jObject["rokuCustomer"], "oemmodel").Trim(),
                         supporturl = JSON_SeleteNode(jObject["rokuCustomer"], "supporturl").Trim(),
                         supporturl = JSON_SeleteNode(jObject["rokuCustomer"], "supporturl").Trim(),
                         supportphone = JSON_SeleteNode(jObject["rokuCustomer"], "supportphone").Trim(),
                         supportphone = JSON_SeleteNode(jObject["rokuCustomer"], "supportphone").Trim(),
                         productiondate = JSON_SeleteNode(jObject["rokuCustomer"], "productiondate").Trim(),
                         productiondate = JSON_SeleteNode(jObject["rokuCustomer"], "productiondate").Trim(),
-                        remotetype= JSON_SeleteNode(jObject["rokuCustomer"], "remotetype").Trim(),
+                        remotetype = JSON_SeleteNode(jObject["rokuCustomer"], "remotetype").Trim(),
                         updatetime = JSON_SeleteNode(jObject["rokuCustomer"], "updatetime").Trim(),
                         updatetime = JSON_SeleteNode(jObject["rokuCustomer"], "updatetime").Trim(),
                         createtime = JSON_SeleteNode(jObject["rokuCustomer"], "createtime").Trim(),
                         createtime = JSON_SeleteNode(jObject["rokuCustomer"], "createtime").Trim(),
                         isdelete = JSON_SeleteNode(jObject["rokuCustomer"], "isdelete").Trim()
                         isdelete = JSON_SeleteNode(jObject["rokuCustomer"], "isdelete").Trim()
                     };
                     };
-                              
+
                 mid.keytype = new Dictionary<string, string>();
                 mid.keytype = new Dictionary<string, string>();
                 foreach (var ss in jObject["obj"])  //查找某个字段与值
                 foreach (var ss in jObject["obj"])  //查找某个字段与值
                 {
                 {
@@ -166,7 +167,7 @@ namespace MOKA_Factory_Tools
                     return false;
                     return false;
             }
             }
             catch (Exception ex)
             catch (Exception ex)
-            {               
+            {
                 Log.WriteErrorLog("\r\nFail to parse MID info," + ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
                 Log.WriteErrorLog("\r\nFail to parse MID info," + ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
                 ReportErrormsg("Fail to parse MID info", ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder, sqliteConn);
                 ReportErrormsg("Fail to parse MID info", ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder, sqliteConn);
                 MessageBox.Show("Fail to parse MID info\r\n " + ex.Message);
                 MessageBox.Show("Fail to parse MID info\r\n " + ex.Message);
@@ -183,7 +184,7 @@ namespace MOKA_Factory_Tools
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="midAddress"></param>
         /// <param name="midAddress"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool GetMidAddress(MidList midInfo, string order, SQLiteConnection sqliteConn,out MidAddress midAddress)
+        public static bool GetMidAddress(MidList midInfo, string order, SQLiteConnection sqliteConn, out MidAddress midAddress)
         {
         {
             midAddress = new MidAddress();
             midAddress = new MidAddress();
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
@@ -193,7 +194,7 @@ namespace MOKA_Factory_Tools
                 Encoding = null,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
                 Encoding = null,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
                                 //Encoding = Encoding.Default,
                                 //Encoding = Encoding.Default,
                 Method = "post",//URL     可选项 默认为Get
                 Method = "post",//URL     可选项 默认为Get
-                Postdata = ("orderNumber=" + order +"&mac=" + HttpUtility.UrlEncode(TestMode.MAC)),
+                Postdata = ("orderNumber=" + order + "&mac=" + HttpUtility.UrlEncode(TestMode.MAC)),
                 KeepAlive = false
                 KeepAlive = false
             };
             };
             item.ContentType = "application/x-www-form-urlencoded";
             item.ContentType = "application/x-www-form-urlencoded";
@@ -201,7 +202,7 @@ namespace MOKA_Factory_Tools
             string ParseText = result.Html;
             string ParseText = result.Html;
             if (result.StatusCode == System.Net.HttpStatusCode.OK)
             if (result.StatusCode == System.Net.HttpStatusCode.OK)
             {
             {
-                
+
             }
             }
             else
             else
             {
             {
@@ -275,14 +276,14 @@ namespace MOKA_Factory_Tools
                 JObject jObject = JObject.Parse(ParseText);
                 JObject jObject = JObject.Parse(ParseText);
                 if (jObject["data"] != null)
                 if (jObject["data"] != null)
                 {
                 {
-                    foreach(var data in jObject["data"])
+                    foreach (var data in jObject["data"])
                     {
                     {
                         midAddressList.Add(new MidAddress()
                         midAddressList.Add(new MidAddress()
                         {
                         {
                             des = JSON_SeleteNode(jObject, "des"),
                             des = JSON_SeleteNode(jObject, "des"),
                             code = JSON_SeleteNode(jObject, "code"),
                             code = JSON_SeleteNode(jObject, "code"),
                             order = data["order_number"].ToObject<string>(),
                             order = data["order_number"].ToObject<string>(),
-                            number = data["order_quantity"].ToObject<string>(), 
+                            number = data["order_quantity"].ToObject<string>(),
                             pid = data["project_id"].ToObject<string>(),
                             pid = data["project_id"].ToObject<string>(),
                             ctype = data["client_type"].ToObject<string>(),
                             ctype = data["client_type"].ToObject<string>(),
                             purl = data["packet_url"].ToObject<string>(),
                             purl = data["packet_url"].ToObject<string>(),
@@ -293,7 +294,7 @@ namespace MOKA_Factory_Tools
                         });
                         });
                     }
                     }
                 }
                 }
-                
+
                 Log.WriteGetKeyLog("\r\nGet Mid address success:" + "\r\n" + result.Html + "\r\nAddress:" + item.URL + "\r\nPostdata:" + item.Postdata);
                 Log.WriteGetKeyLog("\r\nGet Mid address success:" + "\r\n" + result.Html + "\r\nAddress:" + item.URL + "\r\nPostdata:" + item.Postdata);
                 return true;
                 return true;
             }
             }
@@ -364,7 +365,7 @@ namespace MOKA_Factory_Tools
         /// <param name="key"></param>
         /// <param name="key"></param>
         /// <param name="error"></param>
         /// <param name="error"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool GetKeys(string url,string keymessage,string sn,string keytype, SQLiteConnection sqliteConn, out string key, out string error, string order, out string md5)
+        public static bool GetKeys(string url, string keymessage, string sn, string keytype, SQLiteConnection sqliteConn, out string key, out string error, string order, out string md5)
         {
         {
             string code;
             string code;
             string desc;
             string desc;
@@ -377,7 +378,7 @@ namespace MOKA_Factory_Tools
                 Encoding = Encoding.Default,
                 Encoding = Encoding.Default,
                 Method = "post",
                 Method = "post",
                 ContentType = "application/x-www-form-urlencoded",
                 ContentType = "application/x-www-form-urlencoded",
-                KeepAlive = false                
+                KeepAlive = false
             };
             };
             switch (keymessage)
             switch (keymessage)
             {
             {
@@ -387,7 +388,7 @@ namespace MOKA_Factory_Tools
                         item.Postdata = "devicetype=tcl_unknown_model" + "&sn=" + sn;
                         item.Postdata = "devicetype=tcl_unknown_model" + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
-                        HttpResult result = http.GetHtml(item);                     
+                        HttpResult result = http.GetHtml(item);
                         if (result.StatusCode == System.Net.HttpStatusCode.OK)
                         if (result.StatusCode == System.Net.HttpStatusCode.OK)
                         {
                         {
                             Log.WriteGetKeyLog("\r\nGetDeviceID:\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html);
                             Log.WriteGetKeyLog("\r\nGetDeviceID:\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html);
@@ -396,14 +397,14 @@ namespace MOKA_Factory_Tools
                                 //
                                 //
                             }
                             }
                             else
                             else
-                            {                                
+                            {
                                 error = desc;
                                 error = desc;
                                 ReportErrormsg("Fail to parse DID", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
                                 ReportErrormsg("Fail to parse DID", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
                                 return false;
                                 return false;
                             }
                             }
                         }
                         }
                         else
                         else
-                        {                           
+                        {
                             error = result.StatusDescription;
                             error = result.StatusDescription;
                             ReportErrormsg("Fail to get DID", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
                             ReportErrormsg("Fail to get DID", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
                             return false;
                             return false;
@@ -412,8 +413,8 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 case "MAC":
                 case "MAC":
                     {
                     {
-                        item.URL = url+"/getmac.do?";
-                        item.Postdata = "typeString=" + keytype + "&sn="+ sn;
+                        item.URL = url + "/getmac.do?";
+                        item.Postdata = "typeString=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
                         HttpResult result = http.GetHtml(item);
                         HttpResult result = http.GetHtml(item);
@@ -442,7 +443,7 @@ namespace MOKA_Factory_Tools
                 case "HDCP_KEY":
                 case "HDCP_KEY":
                     {
                     {
                         item.URL = url + "/gethdcpkey.do?";
                         item.URL = url + "/gethdcpkey.do?";
-                        item.Postdata = "type=" + keytype + "&sn="+ sn;
+                        item.Postdata = "type=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
                         HttpResult result = http.GetHtml(item);
                         HttpResult result = http.GetHtml(item);
@@ -470,7 +471,7 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 case "CI_PLUS_KEY":
                 case "CI_PLUS_KEY":
                     {
                     {
-                        item.URL = url+ "/getcikey.do?";
+                        item.URL = url + "/getcikey.do?";
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
@@ -499,7 +500,7 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 case "WiDi":
                 case "WiDi":
                     {
                     {
-                        item.URL = url+ "/getwidi.do?";
+                        item.URL = url + "/getwidi.do?";
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
@@ -528,7 +529,7 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 case "HDCP2.2_KEY":
                 case "HDCP2.2_KEY":
                     {
                     {
-                        item.URL = url+ "/gethdcpkey2.do?";
+                        item.URL = url + "/gethdcpkey2.do?";
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
@@ -557,7 +558,7 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 case "NETFILX_ESN":
                 case "NETFILX_ESN":
                     {
                     {
-                        item.URL = url+ "/getnetfilxesn.do?";
+                        item.URL = url + "/getnetfilxesn.do?";
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         item.Postdata = "type=" + keytype + "&sn=" + sn;
                         if (sn.Trim().Length > 0)
                         if (sn.Trim().Length > 0)
                             item.Postdata += "&order=" + order;
                             item.Postdata += "&order=" + order;
@@ -817,48 +818,48 @@ namespace MOKA_Factory_Tools
                         break;
                         break;
                     }
                     }
                 case "MOKA_RT2851M_IR": // ACAS Key;
                 case "MOKA_RT2851M_IR": // ACAS Key;
-                {
-                    item.URL = url + "/getAcasKey.do?";
-                    item.Postdata = "type=" + keytype + "&sn=" + sn;
-                    if (sn.Trim().Length > 0)
-                        item.Postdata += "&order=" + order;
-                    HttpResult result = http.GetHtml(item);
-                    if (result.StatusCode == System.Net.HttpStatusCode.OK)
                     {
                     {
-                        Log.WriteGetKeyLog("\r\nGet ACAS key:\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html);
-                        if (Xmlconfig.GetOthersKeyXml(result.Html, "response", "acasKey", out code, out desc, out key, out md5))
+                        item.URL = url + "/getAcasKey.do?";
+                        item.Postdata = "type=" + keytype + "&sn=" + sn;
+                        if (sn.Trim().Length > 0)
+                            item.Postdata += "&order=" + order;
+                        HttpResult result = http.GetHtml(item);
+                        if (result.StatusCode == System.Net.HttpStatusCode.OK)
                         {
                         {
+                            Log.WriteGetKeyLog("\r\nGet ACAS key:\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html);
+                            if (Xmlconfig.GetOthersKeyXml(result.Html, "response", "acasKey", out code, out desc, out key, out md5))
+                            {
 
 
+                            }
+                            else
+                            {
+                                error = desc;
+                                ReportErrormsg("Fail to parse ACAS key", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
+                                return false;
+                            }
                         }
                         }
                         else
                         else
                         {
                         {
-                            error = desc;
-                            ReportErrormsg("Fail to parse ACAS key", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
+                            error = result.StatusDescription;
+                            ReportErrormsg("Fail to get ACAS key", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
                             return false;
                             return false;
                         }
                         }
+                        break;
                     }
                     }
-                    else
-                    {
-                        error = result.StatusDescription;
-                        ReportErrormsg("Fail to get ACAS key", error + "\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html, sqliteConn);
-                        return false;
-                    }
-                    break;
-                }
             }
             }
             return true;
             return true;
         }
         }
 
 
         public static bool GetWidevineAnAttestationKey(
         public static bool GetWidevineAnAttestationKey(
-            string url, 
-            string sn, 
-            string keytype, 
-            SQLiteConnection sqliteConn, 
+            string url,
+            string sn,
+            string keytype,
+            SQLiteConnection sqliteConn,
             out bool isAndroidTV,
             out bool isAndroidTV,
             out string Widevinekey,
             out string Widevinekey,
             out string Attestationkey,
             out string Attestationkey,
-            out string error, 
-            string order, 
+            out string error,
+            string order,
             out string AttestationMd5)
             out string AttestationMd5)
         {
         {
             string code;
             string code;
@@ -908,20 +909,19 @@ namespace MOKA_Factory_Tools
         /// <param name="reportData"></param>
         /// <param name="reportData"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool ReportErrormsg(string reportType,string reportData, SQLiteConnection sqliteConn)
+        public static bool ReportErrormsg(string reportType, string reportData, SQLiteConnection sqliteConn)
         {
         {
-            
-            ErrorInfo ErrorInfo1 = new ErrorInfo { reportType = reportType, reportData = reportData.Replace("'",""), version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), factory = FactoryName, mac = TestMode.MAC, reportTime = System.DateTime.Now.ToString(("yyyy-MM-dd HH:mm:ss")) };
+            ErrorInfo ErrorInfo1 = new ErrorInfo { reportType = reportType, reportData = reportData.Replace("'", ""), version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), factory = FactoryName, mac = TestMode.MAC, reportTime = System.DateTime.Now.ToString(("yyyy-MM-dd HH:mm:ss")) };
             string jsonError = Newtonsoft.Json.JsonConvert.SerializeObject(ErrorInfo1, Newtonsoft.Json.Formatting.Indented);
             string jsonError = Newtonsoft.Json.JsonConvert.SerializeObject(ErrorInfo1, Newtonsoft.Json.Formatting.Indented);
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
             HttpItem item = new HttpItem()
             {
             {
                 URL = TestMode.errorreportServerurl,//URL这里都是测试URl   必需项
                 URL = TestMode.errorreportServerurl,//URL这里都是测试URl   必需项
                 Encoding = Encoding.UTF8,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
                 Encoding = Encoding.UTF8,//编码格式(utf-8,gb2312,gbk)     可选项 默认类会自动识别
-                                //Encoding = Encoding.Default,
+                                         //Encoding = Encoding.Default,
                 Method = "post",//URL     可选项 默认为Get
                 Method = "post",//URL     可选项 默认为Get
                 Postdata = jsonError,
                 Postdata = jsonError,
-                PostEncoding= Encoding.UTF8,
+                PostEncoding = Encoding.UTF8,
                 KeepAlive = false
                 KeepAlive = false
             };
             };
             item.ContentType = "application/json;charset=utf-8";
             item.ContentType = "application/json;charset=utf-8";
@@ -933,9 +933,9 @@ namespace MOKA_Factory_Tools
             }
             }
             else
             else
             {
             {
-                if(HTTPChecker(item.URL))
+                if (HTTPChecker(item.URL))
                     SQLiteHelper.InsertDelayErrorReport(sqliteConn, new object[] { item.URL, item.Postdata });
                     SQLiteHelper.InsertDelayErrorReport(sqliteConn, new object[] { item.URL, item.Postdata });
-                Log.WriteErrorLog("\r\nFail to ReportErrormsg:\r\n"+ result.StatusDescription +"\r\n"+ result.Html + "\r\nAddress:" + TestMode.errorreportServerurl + "\r\nPostdata:" + jsonError);
+                Log.WriteErrorLog("\r\nFail to ReportErrormsg:\r\n" + result.StatusDescription + "\r\n" + result.Html + "\r\nAddress:" + TestMode.errorreportServerurl + "\r\nPostdata:" + jsonError);
                 return false;
                 return false;
             }
             }
             try
             try
@@ -965,7 +965,7 @@ namespace MOKA_Factory_Tools
         /// <param name="order"></param>
         /// <param name="order"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool ReportDownloadStatus(string url,string order, SQLiteConnection sqliteConn)
+        public static bool ReportDownloadStatus(string url, string order, SQLiteConnection sqliteConn)
         {
         {
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
             HttpItem item = new HttpItem()
@@ -1021,17 +1021,17 @@ namespace MOKA_Factory_Tools
         /// <param name="keydata"></param>
         /// <param name="keydata"></param>
         /// <param name="error"></param>
         /// <param name="error"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool CreateDBkeyString(KeyInfo keyInfo,out string keydata,out string error)
+        public static bool CreateDBkeyString(KeyInfo keyInfo, out string keydata, out string error)
         {
         {
             keydata = "";
             keydata = "";
             error = "";
             error = "";
             try
             try
             {
             {
-                DBKeysStringFormat DBKeysStringFormat1 = new DBKeysStringFormat { cikey = keyInfo.CI_plus == null ? "" : keyInfo.CI_plus, esn = keyInfo.ESN == null ? "" : keyInfo.ESN, hdcp = keyInfo.HDCP == null ? "" : keyInfo.HDCP, widevine = keyInfo.Widevine == null ? "" : keyInfo.Widevine, hdcp22=keyInfo.HDCP22 == null ? "" : keyInfo.HDCP22, did=keyInfo.DID == null ? "" : keyInfo.DID, mac=keyInfo.Mac == null ? "" : keyInfo.Mac, widi=keyInfo.WiDi == null ? "" : keyInfo.WiDi, attestation = keyInfo.Attestation == null ? "" : keyInfo.Attestation, mgk = keyInfo.MGK == null ? "" : keyInfo.MGK };
+                DBKeysStringFormat DBKeysStringFormat1 = new DBKeysStringFormat { cikey = keyInfo.CI_plus == null ? "" : keyInfo.CI_plus, esn = keyInfo.ESN == null ? "" : keyInfo.ESN, hdcp = keyInfo.HDCP == null ? "" : keyInfo.HDCP, widevine = keyInfo.Widevine == null ? "" : keyInfo.Widevine, hdcp22 = keyInfo.HDCP22 == null ? "" : keyInfo.HDCP22, did = keyInfo.DID == null ? "" : keyInfo.DID, mac = keyInfo.Mac == null ? "" : keyInfo.Mac, widi = keyInfo.WiDi == null ? "" : keyInfo.WiDi, attestation = keyInfo.Attestation == null ? "" : keyInfo.Attestation, mgk = keyInfo.MGK == null ? "" : keyInfo.MGK };
                 keydata = Newtonsoft.Json.JsonConvert.SerializeObject(DBKeysStringFormat1, Newtonsoft.Json.Formatting.Indented);
                 keydata = Newtonsoft.Json.JsonConvert.SerializeObject(DBKeysStringFormat1, Newtonsoft.Json.Formatting.Indented);
                 return true;
                 return true;
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 error = ex.Message;
                 error = ex.Message;
                 return false;
                 return false;
@@ -1082,11 +1082,10 @@ namespace MOKA_Factory_Tools
                 else
                 else
                     return false;
                     return false;
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 return false;
                 return false;
             }
             }
-            
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1107,11 +1106,10 @@ namespace MOKA_Factory_Tools
                 myRequest.UseDefaultCredentials = true;//权限设置
                 myRequest.UseDefaultCredentials = true;//权限设置
                 return (myResponse.StatusCode == HttpStatusCode.OK);//返回响应的状态
                 return (myResponse.StatusCode == HttpStatusCode.OK);//返回响应的状态
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 return false;
                 return false;
             }
             }
-            
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1131,7 +1129,7 @@ namespace MOKA_Factory_Tools
         /// </summary>
         /// </summary>
         /// <param name="content"></param>
         /// <param name="content"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool UploadCopyResult(string content ,string url, SQLiteConnection sqliteConn,string order, bool repeatupload, string id,int timeout)
+        public static bool UploadCopyResult(string content, string url, SQLiteConnection sqliteConn, string order, bool repeatupload, string id, int timeout)
         {
         {
             if (timeout < 5000)
             if (timeout < 5000)
                 timeout = 5000;
                 timeout = 5000;
@@ -1180,8 +1178,8 @@ namespace MOKA_Factory_Tools
                 CommonMethod.ReportErrormsg("Fail to upload copy result", result.StatusDescription + "\r\n" + result.Html + "\r\nAddress: " + item.URL + "\r\nPostdata: " + item.Postdata, sqliteConn);
                 CommonMethod.ReportErrormsg("Fail to upload copy result", result.StatusDescription + "\r\n" + result.Html + "\r\nAddress: " + item.URL + "\r\nPostdata: " + item.Postdata, sqliteConn);
                 return true;
                 return true;
             }
             }
-
         }
         }
+
         /// <summary>
         /// <summary>
         /// 本地DB存储的异常重新上报
         /// 本地DB存储的异常重新上报
         /// </summary>
         /// </summary>
@@ -1189,7 +1187,7 @@ namespace MOKA_Factory_Tools
         /// <param name="reportData"></param>
         /// <param name="reportData"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool ReportErrormsg2(string url,string content,out bool mark)
+        public static bool ReportErrormsg2(string url, string content, out bool mark)
         {
         {
             mark = false;
             mark = false;
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
@@ -1228,7 +1226,6 @@ namespace MOKA_Factory_Tools
                     Log.WriteErrorLog("\r\nError report return error:\r\n" + ParseText + "\r\nAddress:" + TestMode.errorreportServerurl + "\r\nPostdata:" + content);
                     Log.WriteErrorLog("\r\nError report return error:\r\n" + ParseText + "\r\nAddress:" + TestMode.errorreportServerurl + "\r\nPostdata:" + content);
                     return false;
                     return false;
                 }
                 }
-
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
@@ -1291,7 +1288,7 @@ namespace MOKA_Factory_Tools
         /// </summary>
         /// </summary>
         /// <param name="copydate">烧录时间</param>
         /// <param name="copydate">烧录时间</param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool UploadPreloadCopyResult(string host, string copydate,string SN, SQLiteConnection localDBNow, SQLiteConnection sqliteConn,bool repeatupload,string id,int timeout)
+        public static bool UploadPreloadCopyResult(string host, string copydate, string SN, SQLiteConnection localDBNow, SQLiteConnection sqliteConn, bool repeatupload, string id, int timeout)
         {
         {
             string ParseText = "";
             string ParseText = "";
             bool status;
             bool status;
@@ -1300,8 +1297,8 @@ namespace MOKA_Factory_Tools
                 List<PostDateClass> postList = new List<PostDateClass>();
                 List<PostDateClass> postList = new List<PostDateClass>();
                 postList.Add(new PostDateClass("sn", SN));
                 postList.Add(new PostDateClass("sn", SN));
                 postList.Add(new PostDateClass("date", copydate));
                 postList.Add(new PostDateClass("date", copydate));
-                ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList,out status,timeout); 
-                if(status)
+                ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, timeout);
+                if (status)
                 {
                 {
                     JObject jObject = JObject.Parse(ParseText);
                     JObject jObject = JObject.Parse(ParseText);
                     string des = CommonMethod.JSON_SeleteNode(jObject, "des");
                     string des = CommonMethod.JSON_SeleteNode(jObject, "des");
@@ -1324,8 +1321,8 @@ namespace MOKA_Factory_Tools
                     }
                     }
                     else
                     else
                     {
                     {
-                        CommonMethod.ReportErrormsg("Fail to UploadPreloadCopyResult","Address: " + host + "/reportlist.do?" + "\r\nPostdata: " + "sn=" + SN + "\r\ndate=" + copydate+"\r\n"+ ParseText, sqliteConn);
-                        Log.WriteErrorLog("\r\nUpdateReportStatus code return error,should be 1000 " + "\r\n" + SN + ":" + ParseText+"\r\nAddress:" + host + "/reportlist.do?" + "\r\nPostdata: " + "sn=" + SN + "\r\ndate=" + copydate);
+                        CommonMethod.ReportErrormsg("Fail to UploadPreloadCopyResult", "Address: " + host + "/reportlist.do?" + "\r\nPostdata: " + "sn=" + SN + "\r\ndate=" + copydate + "\r\n" + ParseText, sqliteConn);
+                        Log.WriteErrorLog("\r\nUpdateReportStatus code return error,should be 1000 " + "\r\n" + SN + ":" + ParseText + "\r\nAddress:" + host + "/reportlist.do?" + "\r\nPostdata: " + "sn=" + SN + "\r\ndate=" + copydate);
                         if (repeatupload)
                         if (repeatupload)
                         {
                         {
                             SQLiteHelper.DeleteDelayCopyReport(sqliteConn, id);
                             SQLiteHelper.DeleteDelayCopyReport(sqliteConn, id);
@@ -1341,7 +1338,6 @@ namespace MOKA_Factory_Tools
                         SQLiteHelper.InsertDelayCopyReport(sqliteConn, new object[] { "preload_mode", host, SN + "@" + copydate });
                         SQLiteHelper.InsertDelayCopyReport(sqliteConn, new object[] { "preload_mode", host, SN + "@" + copydate });
                     return false;
                     return false;
                 }
                 }
-                
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
@@ -1366,7 +1362,7 @@ namespace MOKA_Factory_Tools
             bool status;
             bool status;
             try
             try
             {
             {
-                ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status,30000);
+                ParseText = FormPost.postFileMessage(host + "/reportlist.do?", postList, out status, 30000);
                 if (status)
                 if (status)
                 {
                 {
                     JObject jObject = JObject.Parse(ParseText);
                     JObject jObject = JObject.Parse(ParseText);
@@ -1394,7 +1390,6 @@ namespace MOKA_Factory_Tools
                     Log.WriteErrorLog("Fail to UploadPreloadCopyResult\r\nAddress: " + host + "/reportlist.do?" + ParseText);
                     Log.WriteErrorLog("Fail to UploadPreloadCopyResult\r\nAddress: " + host + "/reportlist.do?" + ParseText);
                     return false;
                     return false;
                 }
                 }
-
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
@@ -1454,7 +1449,7 @@ namespace MOKA_Factory_Tools
         public static bool UpgradeCheck(string url, string FactoryNum, SQLiteConnection sqliteConn, out UpgradeMsgList upmid)
         public static bool UpgradeCheck(string url, string FactoryNum, SQLiteConnection sqliteConn, out UpgradeMsgList upmid)
         {
         {
             upmid = new UpgradeMsgList();
             upmid = new UpgradeMsgList();
-            UpgradeCheckInput UpgradeCheckInput1 = new UpgradeCheckInput { appid = "SCBC_Factory_Tools", devicemodel= "SCBC_Factory_Tools", dnum= FactoryNum, ver= System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), type= "pc" };//System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()
+            UpgradeCheckInput UpgradeCheckInput1 = new UpgradeCheckInput { appid = "SCBC_Factory_Tools", devicemodel = "SCBC_Factory_Tools", dnum = FactoryNum, ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), type = "pc" };//System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(UpgradeCheckInput1, Newtonsoft.Json.Formatting.Indented);
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(UpgradeCheckInput1, Newtonsoft.Json.Formatting.Indented);
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
             HttpItem item = new HttpItem()
@@ -1473,7 +1468,7 @@ namespace MOKA_Factory_Tools
                                        | SecurityProtocolType.Tls11//(SecurityProtocolType)0x300 //Tls11
                                        | SecurityProtocolType.Tls11//(SecurityProtocolType)0x300 //Tls11
                                        | SecurityProtocolType.Tls12;//(SecurityProtocolType)0xC00; //Tls12
                                        | SecurityProtocolType.Tls12;//(SecurityProtocolType)0xC00; //Tls12
             HttpResult result = http.GetHtml(item);
             HttpResult result = http.GetHtml(item);
-            string ParseText = result.Html;          
+            string ParseText = result.Html;
             if (result.StatusCode == System.Net.HttpStatusCode.OK)
             if (result.StatusCode == System.Net.HttpStatusCode.OK)
             {
             {
                 Log.WriteGetKeyLog("\r\nUpgrade check," + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
                 Log.WriteGetKeyLog("\r\nUpgrade check," + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
@@ -1523,7 +1518,6 @@ namespace MOKA_Factory_Tools
                 MessageBox.Show("Fail to parse upgrade check info\r\n " + ex.Message);
                 MessageBox.Show("Fail to parse upgrade check info\r\n " + ex.Message);
                 return false;
                 return false;
             }
             }
-
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1534,9 +1528,9 @@ namespace MOKA_Factory_Tools
         /// <param name="Result"></param>
         /// <param name="Result"></param>
         /// <param name="sqliteConn"></param>
         /// <param name="sqliteConn"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool UpgradeReport(string url, string FactoryNum, string Result,SQLiteConnection sqliteConn)
+        public static bool UpgradeReport(string url, string FactoryNum, string Result, SQLiteConnection sqliteConn)
         {
         {
-            UpgradeReportInput UpgradeCheckInput1 = new UpgradeReportInput { appid = "SCBC_Factory_Tools", devmodel = "SCBC_Factory_Tools", dnum = FactoryNum, ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), type = "pc", result= Result };
+            UpgradeReportInput UpgradeCheckInput1 = new UpgradeReportInput { appid = "SCBC_Factory_Tools", devmodel = "SCBC_Factory_Tools", dnum = FactoryNum, ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), type = "pc", result = Result };
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(UpgradeCheckInput1, Newtonsoft.Json.Formatting.Indented);
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(UpgradeCheckInput1, Newtonsoft.Json.Formatting.Indented);
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
             HttpItem item = new HttpItem()
@@ -1589,7 +1583,7 @@ namespace MOKA_Factory_Tools
         /// <param name="filemd5"></param>
         /// <param name="filemd5"></param>
         /// <param name="error"></param>
         /// <param name="error"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool CompareLocalkey(string filename, string filetype, string filemd5, out string error,out string filefullname)
+        public static bool CompareLocalkey(string filename, string filetype, string filemd5, out string error, out string filefullname)
         {
         {
             error = "";
             error = "";
             filefullname = "";
             filefullname = "";
@@ -1606,7 +1600,7 @@ namespace MOKA_Factory_Tools
                     string FileMD5 = GetMD5.GetMD5HashFromFile(keyfile.Name);
                     string FileMD5 = GetMD5.GetMD5HashFromFile(keyfile.Name);
                     if (FileMD5 == filemd5)
                     if (FileMD5 == filemd5)
                     {
                     {
-                        Log.WriteGetKeyLog("Check md5file success,file md5:" + FileMD5+"\r\nfile:"+ keyfile.FullName) ;
+                        Log.WriteGetKeyLog("Check md5file success,file md5:" + FileMD5 + "\r\nfile:" + keyfile.FullName);
                         filefullname = keyfile.FullName;
                         filefullname = keyfile.FullName;
                         return true;
                         return true;
                     }
                     }
@@ -1618,12 +1612,11 @@ namespace MOKA_Factory_Tools
                 }
                 }
                 return false;
                 return false;
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 error = ex.Message;
                 error = ex.Message;
                 return false;
                 return false;
             }
             }
-            
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1637,7 +1630,7 @@ namespace MOKA_Factory_Tools
         {
         {
             string strdata = Encoding.ASCII.GetString(data);
             string strdata = Encoding.ASCII.GetString(data);
             Console.WriteLine(strdata);
             Console.WriteLine(strdata);
-            if(strdata.StartsWith("MD5="))
+            if (strdata.StartsWith("MD5="))
             {
             {
                 string md5 = GetMD5.GetMD5Hash(key);
                 string md5 = GetMD5.GetMD5Hash(key);
                 Console.WriteLine(md5);
                 Console.WriteLine(md5);
@@ -1653,7 +1646,7 @@ namespace MOKA_Factory_Tools
         /// <param name="data"></param>
         /// <param name="data"></param>
         /// <param name="error"></param>
         /// <param name="error"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool GetCreateHexkey(string path,string data,out string error)
+        public static bool GetCreateHexkey(string path, string data, out string error)
         {
         {
             error = "";
             error = "";
             try
             try
@@ -1668,8 +1661,8 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
 
 
             }
             }
-            catch(Exception ex)
-            {                
+            catch (Exception ex)
+            {
                 error = ex.Message;
                 error = ex.Message;
                 Log.WriteErrorLog("save key error:" + error);
                 Log.WriteErrorLog("save key error:" + error);
                 return false;
                 return false;
@@ -1683,7 +1676,7 @@ namespace MOKA_Factory_Tools
         /// <param name="data"></param>
         /// <param name="data"></param>
         /// <param name="error"></param>
         /// <param name="error"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool ReadHexFile(string filepath,out string data,out string error)
+        public static bool ReadHexFile(string filepath, out string data, out string error)
         {
         {
             data = "";
             data = "";
             error = "";
             error = "";
@@ -1699,7 +1692,7 @@ namespace MOKA_Factory_Tools
                     }
                     }
                 }
                 }
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 error = ex.Message;
                 error = ex.Message;
                 return false;
                 return false;
@@ -1721,7 +1714,7 @@ namespace MOKA_Factory_Tools
             loginOutput1 = new LoginOutput();
             loginOutput1 = new LoginOutput();
             LoginInput LoginInput1 = new LoginInput { account = account, password = password, mac = pcmac };
             LoginInput LoginInput1 = new LoginInput { account = account, password = password, mac = pcmac };
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(LoginInput1, Newtonsoft.Json.Formatting.Indented);
             string jsonorder = Newtonsoft.Json.JsonConvert.SerializeObject(LoginInput1, Newtonsoft.Json.Formatting.Indented);
-            
+
             HttpHelper http = new HttpHelper();
             HttpHelper http = new HttpHelper();
             HttpItem item = new HttpItem()
             HttpItem item = new HttpItem()
             {
             {
@@ -1766,8 +1759,8 @@ namespace MOKA_Factory_Tools
                 MessageBox.Show("Fail to parse login return\r\n " + ex.Message);
                 MessageBox.Show("Fail to parse login return\r\n " + ex.Message);
                 return false;
                 return false;
             }
             }
-
         }
         }
+
         /// <summary>
         /// <summary>
         /// 获取指定日期,在为一年中为第几周
         /// 获取指定日期,在为一年中为第几周
         /// </summary>
         /// </summary>
@@ -1871,14 +1864,13 @@ namespace MOKA_Factory_Tools
                         updatetime = JSON_SeleteNode(jObject["obj"], "updatetime"),
                         updatetime = JSON_SeleteNode(jObject["obj"], "updatetime"),
                         createtime = JSON_SeleteNode(jObject["obj"], "createtime"),
                         createtime = JSON_SeleteNode(jObject["obj"], "createtime"),
                         isdelete = JSON_SeleteNode(jObject["obj"], "isdelete"),
                         isdelete = JSON_SeleteNode(jObject["obj"], "isdelete"),
-                        isExemption= JSON_SeleteNode(jObject["obj"], "isExemption")
+                        isExemption = JSON_SeleteNode(jObject["obj"], "isExemption")
                     };
                     };
                 if (WBList.code == "1000")
                 if (WBList.code == "1000")
                     return true;
                     return true;
                 else
                 else
                     return false;
                     return false;
             }
             }
-
             catch (Exception ex)
             catch (Exception ex)
             {
             {
                 Log.WriteErrorLog("\r\nFail to parse WB info," + ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
                 Log.WriteErrorLog("\r\nFail to parse WB info," + ex.Message + ":" + ParseText + "\r\nAddress:" + url + "\r\nPostdata:" + jsonorder);
@@ -1886,7 +1878,6 @@ namespace MOKA_Factory_Tools
                 MessageBox.Show("Fail to parse WB info\r\n " + ex.Message);
                 MessageBox.Show("Fail to parse WB info\r\n " + ex.Message);
                 return false;
                 return false;
             }
             }
-
         }
         }
 
 
         private static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
         private static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
@@ -2018,7 +2009,7 @@ namespace MOKA_Factory_Tools
                 Directory.CreateDirectory(path);
                 Directory.CreateDirectory(path);
             }
             }
 
 
-            if ( !lastOrder.Equals(ordernum) )
+            if (!lastOrder.Equals(ordernum))
             {
             {
                 lastOrder = ordernum;
                 lastOrder = ordernum;
                 ListACASSN.Clear();
                 ListACASSN.Clear();
@@ -2075,15 +2066,16 @@ namespace MOKA_Factory_Tools
                 value = (value >> 8) ^ Crc32Table[(value & 0xFF) ^ bytes[i]];
                 value = (value >> 8) ^ Crc32Table[(value & 0xFF) ^ bytes[i]];
             }
             }
             return value ^ 0xffffffff;
             return value ^ 0xffffffff;
-        }       
+        }
     }
     }
+
     /// <summary>
     /// <summary>
     /// 本地抄写模式方法
     /// 本地抄写模式方法
     /// </summary>
     /// </summary>
     public class GetLocalKeyCount
     public class GetLocalKeyCount
     {
     {
         static string LocalKeyPath = AppDomain.CurrentDomain.BaseDirectory + "\\Keys\\";
         static string LocalKeyPath = AppDomain.CurrentDomain.BaseDirectory + "\\Keys\\";
-        public static bool GetLocalDidCount(string order,out int num,ref MidList localmidList, SQLiteConnection errorDBNow)
+        public static bool GetLocalDidCount(string order, out int num, ref MidList localmidList, SQLiteConnection errorDBNow)
         {
         {
             num = 0;
             num = 0;
             try
             try
@@ -2149,15 +2141,15 @@ namespace MOKA_Factory_Tools
                         }
                         }
                     }
                     }
                     return true;
                     return true;
-
                 }
                 }
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 num = -1;
                 num = -1;
                 return true;
                 return true;
             }
             }
         }
         }
+
         public static bool GetLocalMacCount(string order, out int num, ref MidList localmidList, SQLiteConnection errorDBNow)
         public static bool GetLocalMacCount(string order, out int num, ref MidList localmidList, SQLiteConnection errorDBNow)
         {
         {
             num = 0;
             num = 0;
@@ -2296,6 +2288,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
+
         public static bool GetLocalWidevineCount(string order, out int num)
         public static bool GetLocalWidevineCount(string order, out int num)
         {
         {
             num = 0;
             num = 0;
@@ -2317,6 +2310,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
+
         public static bool GetLocalESNCount(string order, out int num)
         public static bool GetLocalESNCount(string order, out int num)
         {
         {
             num = 0;
             num = 0;
@@ -2380,7 +2374,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
-        public static bool GetLocalFolderKeyCount(string order,string keyname, out int num)
+        public static bool GetLocalFolderKeyCount(string order, string keyname, out int num)
         {
         {
             num = 0;
             num = 0;
             try
             try
@@ -2401,6 +2395,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
+
         public static bool GetLocalAttestationCount(string order, out int num)
         public static bool GetLocalAttestationCount(string order, out int num)
         {
         {
             num = 0;
             num = 0;
@@ -2422,6 +2417,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
+
         public static bool GetLocalCIKEYCount(string order, out int num)
         public static bool GetLocalCIKEYCount(string order, out int num)
         {
         {
             num = 0;
             num = 0;
@@ -2443,7 +2439,7 @@ namespace MOKA_Factory_Tools
                 return true;
                 return true;
             }
             }
         }
         }
-        public static bool GetLocalStringKeys(string order,string keytype,int filesize,out FileStream fskey,out StreamReader brkey, out string data,out string filename,out string error, SQLiteConnection errorDBNow,ref MidList localmidList,string SN)
+        public static bool GetLocalStringKeys(string order, string keytype, int filesize, out FileStream fskey, out StreamReader brkey, out string data, out string filename, out string error, SQLiteConnection errorDBNow, ref MidList localmidList, string SN)
         {
         {
             data = "";
             data = "";
             filename = "";
             filename = "";
@@ -2451,13 +2447,13 @@ namespace MOKA_Factory_Tools
             brkey = null;
             brkey = null;
             fskey = null;
             fskey = null;
             try
             try
-            {              
-                string keypath = LocalKeyPath + order + "\\"+ keytype;
+            {
+                string keypath = LocalKeyPath + order + "\\" + keytype;
                 if (Directory.Exists(keypath) == false)
                 if (Directory.Exists(keypath) == false)
                 {
                 {
                     error = "File not exist";
                     error = "File not exist";
                     return false;
                     return false;
-                }                  
+                }
                 else
                 else
                 {
                 {
                     DirectoryInfo Getkeyfile = new DirectoryInfo(keypath);
                     DirectoryInfo Getkeyfile = new DirectoryInfo(keypath);
@@ -2468,9 +2464,9 @@ namespace MOKA_Factory_Tools
                         {
                         {
                             try
                             try
                             {
                             {
-                                if(localmidList.host==null)
+                                if (localmidList.host == null)
                                 {
                                 {
-                                    if(CommonMethod.GetMidInfo(TestMode.serverurl, order, TestMode.MAC, "", "", errorDBNow, out localmidList))
+                                    if (CommonMethod.GetMidInfo(TestMode.serverurl, order, TestMode.MAC, "", "", errorDBNow, out localmidList))
                                     {
                                     {
                                         ;
                                         ;
                                     }
                                     }
@@ -2495,7 +2491,7 @@ namespace MOKA_Factory_Tools
                                     keytype = "WiDi";
                                     keytype = "WiDi";
                                 else if (keytype == "CIKEY")
                                 else if (keytype == "CIKEY")
                                     keytype = "CI_PLUS_KEY";
                                     keytype = "CI_PLUS_KEY";
-                                if (CommonMethod.GetKeys(localmidList.host, keytype, SN, localmidList.keytype[keytype], errorDBNow, out string did, out error, order,out string md5))
+                                if (CommonMethod.GetKeys(localmidList.host, keytype, SN, localmidList.keytype[keytype], errorDBNow, out string did, out error, order, out string md5))
                                 {
                                 {
                                     data = did;
                                     data = did;
                                     Log.WriteGetKeyLog("\r\n" + keytype + "= " + data);
                                     Log.WriteGetKeyLog("\r\n" + keytype + "= " + data);
@@ -2505,14 +2501,12 @@ namespace MOKA_Factory_Tools
                                 {
                                 {
                                     return false;
                                     return false;
                                 }
                                 }
-
                             }
                             }
-                            catch(Exception ex)
+                            catch (Exception ex)
                             {
                             {
                                 error = ex.Message;
                                 error = ex.Message;
                                 return false;
                                 return false;
                             }
                             }
-                            
                         }
                         }
                         else
                         else
                         {
                         {
@@ -2540,11 +2534,8 @@ namespace MOKA_Factory_Tools
                                 ;
                                 ;
                             }
                             }
                         }
                         }
-                        
-                        
                     }
                     }
                     return false;
                     return false;
-
                 }
                 }
             }
             }
             catch (Exception ex)
             catch (Exception ex)
@@ -2621,14 +2612,12 @@ namespace MOKA_Factory_Tools
                                 {
                                 {
                                     return false;
                                     return false;
                                 }
                                 }
-
                             }
                             }
                             catch (Exception ex)
                             catch (Exception ex)
                             {
                             {
                                 error = ex.Message;
                                 error = ex.Message;
                                 return false;
                                 return false;
                             }
                             }
-
                         }
                         }
                         else
                         else
                         {
                         {
@@ -2657,7 +2646,6 @@ namespace MOKA_Factory_Tools
                                 ;
                                 ;
                             }
                             }
                         }
                         }
-                                        
                     }
                     }
                     return false;
                     return false;
                 }
                 }
@@ -2676,7 +2664,7 @@ namespace MOKA_Factory_Tools
                 {
                 {
                     for (int i = 0; i < filelist.Count; i++)
                     for (int i = 0; i < filelist.Count; i++)
                     {
                     {
-                        if(filelist[i].ToString().Contains("DeviceID"))
+                        if (filelist[i].ToString().Contains("DeviceID"))
                             ((StreamReader)Reader[i]).Dispose();
                             ((StreamReader)Reader[i]).Dispose();
                         else
                         else
                             ((BinaryReader)Reader[i]).Dispose();
                             ((BinaryReader)Reader[i]).Dispose();
@@ -2686,9 +2674,9 @@ namespace MOKA_Factory_Tools
                     return true;
                     return true;
                 }
                 }
                 else
                 else
-                    return false;              
+                    return false;
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 for (int i = 0; i < Reader.Count; i++)
                 for (int i = 0; i < Reader.Count; i++)
                 {
                 {
@@ -2701,6 +2689,7 @@ namespace MOKA_Factory_Tools
                 return false;
                 return false;
             }
             }
         }
         }
+
         public static bool UnlockLocalKeys(ArrayList filelist, ArrayList Stream, ArrayList Reader)
         public static bool UnlockLocalKeys(ArrayList filelist, ArrayList Stream, ArrayList Reader)
         {
         {
             for (int i = 0; i < Reader.Count; i++)
             for (int i = 0; i < Reader.Count; i++)
@@ -2713,8 +2702,6 @@ namespace MOKA_Factory_Tools
             }
             }
             return true;
             return true;
         }
         }
-
-
     }
     }
 
 
     /// <summary>
     /// <summary>
@@ -2722,7 +2709,7 @@ namespace MOKA_Factory_Tools
     /// </summary>
     /// </summary>
     public class LocalTxtRecord
     public class LocalTxtRecord
     {
     {
-        public static bool LocalRecord(string record,string name)
+        public static bool LocalRecord(string record, string name)
         {
         {
             try
             try
             {
             {
@@ -2749,8 +2736,6 @@ namespace MOKA_Factory_Tools
             {
             {
                 return false;
                 return false;
             }
             }
-            
-
         }
         }
     }
     }
 
 

+ 5 - 5
SCBC Factory Tools/IO/SerialCMD.cs

@@ -2345,7 +2345,7 @@ namespace MOKA_Factory_Tools
         /// <returns></returns>
         /// <returns></returns>
         public static bool SetEDIDPid(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         public static bool SetEDIDPid(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         {
         {
-            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x00, 0x07 }, param, true, false, out result, out data, out error, waitTime);
+            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x00, 0x07 }, param, false, false, out result, out data, out error, waitTime);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -2359,9 +2359,9 @@ namespace MOKA_Factory_Tools
         /// <returns></returns>
         /// <returns></returns>
         public static bool ReadEDIDModelName(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
         public static bool ReadEDIDModelName(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
         {
         {
-            if (Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0x9A }, new byte[] { 0x08 }, true, false, out result, out data, out error, waitTime))
+            if (Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0xBE }, new byte[] { 0x0E }, true, false, out result, out data, out error, waitTime))
             {
             {
-                if (data[0] == 0x01)
+                if (data[0] == 0x0E)
                 {
                 {
                     data = data.Skip(1).Take(data.Length - 1).ToArray();
                     data = data.Skip(1).Take(data.Length - 1).ToArray();
                     return true;
                     return true;
@@ -2387,7 +2387,7 @@ namespace MOKA_Factory_Tools
         /// <returns></returns>
         /// <returns></returns>
         public static bool SetEDIDModelName(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         public static bool SetEDIDModelName(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         {
         {
-            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0x99, 0x09 }, param, true, false, out result, out data, out error, waitTime);
+            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0x99, 0x09 }, param, false, false, out result, out data, out error, waitTime);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -2446,7 +2446,7 @@ namespace MOKA_Factory_Tools
         /// <returns></returns>
         /// <returns></returns>
         public static bool SetACASKey(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         public static bool SetACASKey(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error, int waitTime)
         {
         {
-            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x00, 0x08 }, param, true, false, out result, out data, out error, waitTime);
+            return Sendcmd(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x00, 0x08 }, param, false, false, out result, out data, out error, waitTime);
         }
         }
 
 
         /// <summary>
         /// <summary>

+ 4 - 1
SCBC Factory Tools/Models/StructList.cs

@@ -163,6 +163,9 @@ namespace MOKA_Factory_Tools
         public int SerailDelay { get; set; }
         public int SerailDelay { get; set; }
         public bool UsingLocalServer { get; set; }
         public bool UsingLocalServer { get; set; }
         public Dictionary<string, string> CustomCMD { get; set; }
         public Dictionary<string, string> CustomCMD { get; set; }
+        /// <summary>
+        /// 允许不用扫条码抄写(单击按钮);
+        /// </summary>
         public bool AllowNoScanning { get; set; }
         public bool AllowNoScanning { get; set; }
         public int ReportTimeOut { get; set; }
         public int ReportTimeOut { get; set; }
         /// <summary>
         /// <summary>
@@ -204,7 +207,7 @@ namespace MOKA_Factory_Tools
         public string ECP { get; set; }
         public string ECP { get; set; }
         public string YouTube_KEY { get; set; }
         public string YouTube_KEY { get; set; }
         public string EDIDPid { get; set; }
         public string EDIDPid { get; set; }
-        public string EDIDModeName { get; set; }
+        public string EDIDModelName { get; set; }
         public string ACASKey { get; set; }
         public string ACASKey { get; set; }
     }
     }
 
 

+ 77 - 77
SCBC Factory Tools/Views/Main.cs

@@ -18,7 +18,7 @@ using System.Windows.Forms;
 
 
 namespace MOKA_Factory_Tools
 namespace MOKA_Factory_Tools
 {
 {
-    public delegate void MoveHandler(Point XY, ArrayList formlocationmsg,int num);
+    public delegate void MoveHandler(Point XY, ArrayList formlocationmsg, int num);
     public delegate void KeyDownHandler(ArrayList formlocationmsg, IntPtr intPtr);
     public delegate void KeyDownHandler(ArrayList formlocationmsg, IntPtr intPtr);
     public partial class Main : Skin_Color
     public partial class Main : Skin_Color
     {
     {
@@ -31,7 +31,7 @@ namespace MOKA_Factory_Tools
         FunctionSetting functionSetting1 = new FunctionSetting();
         FunctionSetting functionSetting1 = new FunctionSetting();
         SQLiteConnection LocalDB = null;
         SQLiteConnection LocalDB = null;
         SQLiteConnection ErrorDB = null;
         SQLiteConnection ErrorDB = null;
-        
+
         Dictionary<string, string> ChannelMapList = new Dictionary<string, string>();
         Dictionary<string, string> ChannelMapList = new Dictionary<string, string>();
         Dictionary<string, string> LanguageMapList = new Dictionary<string, string>();
         Dictionary<string, string> LanguageMapList = new Dictionary<string, string>();
         string Custom_ProjectID = "";
         string Custom_ProjectID = "";
@@ -48,7 +48,7 @@ namespace MOKA_Factory_Tools
         public Main(int enable)
         public Main(int enable)
         {
         {
             InitializeComponent();
             InitializeComponent();
-            LockSettingFunction(enable == 0|| enable == 3);
+            LockSettingFunction(enable == 0 || enable == 3);
             CreateKeyManually.Visible = enable == 1;
             CreateKeyManually.Visible = enable == 1;
             LocalWrite = enable == 3;
             LocalWrite = enable == 3;
         }
         }
@@ -61,7 +61,7 @@ namespace MOKA_Factory_Tools
             LoadJsonConfig();
             LoadJsonConfig();
             this.StartPosition = FormStartPosition.Manual;
             this.StartPosition = FormStartPosition.Manual;
             this.Location = new Point(0, 0);
             this.Location = new Point(0, 0);
-            this.Text = CommonMethod.FactoryName+" "+System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+            this.Text = CommonMethod.FactoryName + " " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
             if (!File.Exists(ErrorDBPath))
             if (!File.Exists(ErrorDBPath))
             {
             {
                 if (SQLiteHelper.NewDbFile(ErrorDBPath))
                 if (SQLiteHelper.NewDbFile(ErrorDBPath))
@@ -75,18 +75,18 @@ namespace MOKA_Factory_Tools
             {
             {
                 ErrorDB = new SQLiteConnection("data source=" + ErrorDBPath);
                 ErrorDB = new SQLiteConnection("data source=" + ErrorDBPath);
                 ErrorDB.Open();
                 ErrorDB.Open();
-                
+
             }
             }
         }
         }
 
 
         private void SetDSNLimit()
         private void SetDSNLimit()
         {
         {
             // 如果抄写PSN,不自动赋值条码限制;
             // 如果抄写PSN,不自动赋值条码限制;
-            if (BarcodeWrite.Checked )
+            if (BarcodeWrite.Checked)
                 return;
                 return;
 
 
             // 设置条码限制默认打上勾;
             // 设置条码限制默认打上勾;
-            if (midList1.keytype != null && midList1.keytype.ContainsKey("DSN") )
+            if (midList1.keytype != null && midList1.keytype.ContainsKey("DSN"))
             {
             {
                 BarcodeLimit.Checked = true;
                 BarcodeLimit.Checked = true;
                 BarCodeKeyCodeText.Text = OrderText.Text;
                 BarCodeKeyCodeText.Text = OrderText.Text;
@@ -96,7 +96,7 @@ namespace MOKA_Factory_Tools
         private void OrderSubmit_Click(object sender, EventArgs e)
         private void OrderSubmit_Click(object sender, EventArgs e)
         {
         {
             SQLiteHelper.DeleteOldData(ErrorDB);//删除30天以前已经上报的数据
             SQLiteHelper.DeleteOldData(ErrorDB);//删除30天以前已经上报的数据
-            if(TestMode.serverurl == Serverurl.Testurl)
+            if (TestMode.serverurl == Serverurl.Testurl)
             {
             {
                 MessageBoxButtons messButton = MessageBoxButtons.YesNo;
                 MessageBoxButtons messButton = MessageBoxButtons.YesNo;
                 DialogResult dr = MessageBox.Show(LResource.TestServerUsingError, LResource.Error, messButton);
                 DialogResult dr = MessageBox.Show(LResource.TestServerUsingError, LResource.Error, messButton);
@@ -109,7 +109,7 @@ namespace MOKA_Factory_Tools
                     return;
                     return;
                 }
                 }
             }
             }
-            if(TVCOM.SelectedItem==null)
+            if (TVCOM.SelectedItem == null)
             {
             {
                 MessageBox.Show(LResource.TVCOMNullError, LResource.Error);
                 MessageBox.Show(LResource.TVCOMNullError, LResource.Error);
                 return;
                 return;
@@ -139,8 +139,8 @@ namespace MOKA_Factory_Tools
             functionSetting1.WriteWB = WriteWB.Checked;
             functionSetting1.WriteWB = WriteWB.Checked;
             functionSetting1.WBInit = WBInit.Checked;
             functionSetting1.WBInit = WBInit.Checked;
             functionSetting1.WBPath = WBPath.Text;
             functionSetting1.WBPath = WBPath.Text;
-            
-            if(!LocalWrite)
+
+            if (!LocalWrite)
             {
             {
                 if (Preload.Checked)
                 if (Preload.Checked)
                 {
                 {
@@ -158,22 +158,22 @@ namespace MOKA_Factory_Tools
                             {
                             {
                                 if (SQLiteHelper.GetDBMidInfo(LocalDB, OrderText.Text.Trim(), out midAddress1))
                                 if (SQLiteHelper.GetDBMidInfo(LocalDB, OrderText.Text.Trim(), out midAddress1))
                                 {
                                 {
-                                    if(UsinglocalIDCheck.Checked)
+                                    if (UsinglocalIDCheck.Checked)
                                     {
                                     {
                                         midAddress1.pid = Custom_ProjectID;
                                         midAddress1.pid = Custom_ProjectID;
                                         MessageBox.Show(LResource.WilluseLocalPID, "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                                         MessageBox.Show(LResource.WilluseLocalPID, "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                                     }
                                     }
                                     else if (midAddress1.pid != Custom_ProjectID && Custom_ProjectID.Trim().Length > 0)
                                     else if (midAddress1.pid != Custom_ProjectID && Custom_ProjectID.Trim().Length > 0)
                                     {
                                     {
-                                        
+
                                         if (midAddress1.pid != null)
                                         if (midAddress1.pid != null)
                                             if (midAddress1.pid.Trim().Length > 0)
                                             if (midAddress1.pid.Trim().Length > 0)
                                                 PID_Num.Value = Convert.ToDecimal(midAddress1.pid);
                                                 PID_Num.Value = Convert.ToDecimal(midAddress1.pid);
-                                        MessageBox.Show(LResource.WilluseOnlinePID,"" , MessageBoxButtons.OK, MessageBoxIcon.Information);
+                                        MessageBox.Show(LResource.WilluseOnlinePID, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                     }
                                     }
 
 
                                     if (SQLiteHelper.GetrokuCustomer(LocalDB, OrderText.Text, out RokuCustomer rokuCustomer_1))
                                     if (SQLiteHelper.GetrokuCustomer(LocalDB, OrderText.Text, out RokuCustomer rokuCustomer_1))
-                                    {                                       
+                                    {
                                         midList1.rokuCustomer = rokuCustomer_1;
                                         midList1.rokuCustomer = rokuCustomer_1;
                                     };
                                     };
                                     if (SQLiteHelper.Getdsn(LocalDB, OrderText.Text, out string firetvdsn))
                                     if (SQLiteHelper.Getdsn(LocalDB, OrderText.Text, out string firetvdsn))
@@ -265,7 +265,7 @@ namespace MOKA_Factory_Tools
                                             {
                                             {
                                                 MessageBox.Show("White balance info error, please contact factory engineer!");
                                                 MessageBox.Show("White balance info error, please contact factory engineer!");
                                                 return;
                                                 return;
-                                            }                                                
+                                            }
                                             break;
                                             break;
                                         }
                                         }
                                     case "2"://已预置PR数据
                                     case "2"://已预置PR数据
@@ -279,7 +279,7 @@ namespace MOKA_Factory_Tools
                                             break;
                                             break;
                                         }
                                         }
                                 }
                                 }
-                                foreach(var midAddress1 in midAddress2)
+                                foreach (var midAddress1 in midAddress2)
                                 {
                                 {
                                     string KeyPath = AppDomain.CurrentDomain.BaseDirectory + "\\download\\" + midAddress1.order + ".json";
                                     string KeyPath = AppDomain.CurrentDomain.BaseDirectory + "\\download\\" + midAddress1.order + ".json";
                                     if (System.IO.File.Exists(KeyPath))
                                     if (System.IO.File.Exists(KeyPath))
@@ -309,8 +309,8 @@ namespace MOKA_Factory_Tools
                                                 }
                                                 }
                                                 SQLiteHelper.UpdateTime(dbPath, midAddress1.order);
                                                 SQLiteHelper.UpdateTime(dbPath, midAddress1.order);
                                             }
                                             }
-                                            if(File.Exists(dbPath))
-                                            { 
+                                            if (File.Exists(dbPath))
+                                            {
                                                 List<object[]> keyDatas = new List<object[]>();
                                                 List<object[]> keyDatas = new List<object[]>();
                                                 using (System.IO.StreamReader file = System.IO.File.OpenText(KeyPath))
                                                 using (System.IO.StreamReader file = System.IO.File.OpenText(KeyPath))
                                                 {
                                                 {
@@ -386,7 +386,7 @@ namespace MOKA_Factory_Tools
                                         GC.Collect(gid);
                                         GC.Collect(gid);
                                     }
                                     }
                                 }
                                 }
-                                if(File.Exists(dbPath))
+                                if (File.Exists(dbPath))
                                 {
                                 {
                                     if (LocalDB == null)
                                     if (LocalDB == null)
                                     {
                                     {
@@ -400,7 +400,7 @@ namespace MOKA_Factory_Tools
                                         else
                                         else
                                             MessageBox.Show(LResource.DownloadReportFail);
                                             MessageBox.Show(LResource.DownloadReportFail);
                                     }
                                     }
-                                }                                
+                                }
                             }
                             }
                             else
                             else
                             {
                             {
@@ -428,7 +428,6 @@ namespace MOKA_Factory_Tools
                         }
                         }
                         else if (midList1.projectid != Custom_ProjectID && Custom_ProjectID.Trim().Length > 0)
                         else if (midList1.projectid != Custom_ProjectID && Custom_ProjectID.Trim().Length > 0)
                         {
                         {
-                            
                             if (midList1.projectid != null)
                             if (midList1.projectid != null)
                                 if (midList1.projectid.Trim().Length > 0)
                                 if (midList1.projectid.Trim().Length > 0)
                                     PID_Num.Value = Convert.ToDecimal(midList1.projectid);
                                     PID_Num.Value = Convert.ToDecimal(midList1.projectid);
@@ -464,7 +463,7 @@ namespace MOKA_Factory_Tools
                             formlocationmsg.Add(part1);
                             formlocationmsg.Add(part1);
                             operationPanel1.Show();
                             operationPanel1.Show();
                         }
                         }
-                        catch(Exception ex)
+                        catch (Exception ex)
                         {
                         {
                             Log.WriteErrorLog(ex.Message);
                             Log.WriteErrorLog(ex.Message);
                         }
                         }
@@ -476,16 +475,14 @@ namespace MOKA_Factory_Tools
                     {
                     {
                         MessageBox.Show(LResource.GetMidInfoerror);
                         MessageBox.Show(LResource.GetMidInfoerror);
                     }
                     }
-
                 }
                 }
             }
             }
             else
             else
             {
             {
                 MessageBox.Show(LResource.LocalKeyMode);
                 MessageBox.Show(LResource.LocalKeyMode);
-                
+
                 try
                 try
                 {
                 {
-                    
                     if (Preload.Checked)
                     if (Preload.Checked)
                     {
                     {
                         string dbPath = AppDomain.CurrentDomain.BaseDirectory + "\\Keys\\" + OrderText.Text.Trim() + ".db";
                         string dbPath = AppDomain.CurrentDomain.BaseDirectory + "\\Keys\\" + OrderText.Text.Trim() + ".db";
@@ -580,17 +577,17 @@ namespace MOKA_Factory_Tools
 
 
                     OperationPanel operationPanel1 = new OperationPanel(this, LocalDB, ErrorDB, null, functionSetting1, WriteCheck1, ReadCheck1, WriteDone1, Preload.Checked, midList1, OrderText.Text.Trim());
                     OperationPanel operationPanel1 = new OperationPanel(this, LocalDB, ErrorDB, null, functionSetting1, WriteCheck1, ReadCheck1, WriteDone1, Preload.Checked, midList1, OrderText.Text.Trim());
                     operationPanel1.StartPosition = FormStartPosition.Manual;
                     operationPanel1.StartPosition = FormStartPosition.Manual;
-                    if((this.Right + operationPanel1.Size.Width * formlocationmsg.Count)> Screen.PrimaryScreen.Bounds.Width&&LocationMark)
+                    if ((this.Right + operationPanel1.Size.Width * formlocationmsg.Count) > Screen.PrimaryScreen.Bounds.Width && LocationMark)
                     {
                     {
                         LocationMark = false;
                         LocationMark = false;
                         LocationNum = formlocationmsg.Count;
                         LocationNum = formlocationmsg.Count;
                     }
                     }
                     if (formlocationmsg.Count == 0)
                     if (formlocationmsg.Count == 0)
                         operationPanel1.Location = (Point)new Size(this.Right, this.Top);
                         operationPanel1.Location = (Point)new Size(this.Right, this.Top);
-                    else if((this.Right + operationPanel1.Size.Width * formlocationmsg.Count)> Screen.PrimaryScreen.Bounds.Width)
+                    else if ((this.Right + operationPanel1.Size.Width * formlocationmsg.Count) > Screen.PrimaryScreen.Bounds.Width)
                     {
                     {
                         Point point = ((Dictionary<IntPtr, Point>)formlocationmsg[formlocationmsg.Count - 1]).Last().Value;
                         Point point = ((Dictionary<IntPtr, Point>)formlocationmsg[formlocationmsg.Count - 1]).Last().Value;
-                        operationPanel1.Location = (Point)new Size(this.Right + operationPanel1.Size.Width * (formlocationmsg.Count- LocationNum), this.Top + operationPanel1.Size.Height);
+                        operationPanel1.Location = (Point)new Size(this.Right + operationPanel1.Size.Width * (formlocationmsg.Count - LocationNum), this.Top + operationPanel1.Size.Height);
                     }
                     }
                     else
                     else
                     {
                     {
@@ -611,10 +608,10 @@ namespace MOKA_Factory_Tools
                     //
                     //
                 }
                 }
             }
             }
-                              
+
             OrderSubmit.Text = LResource.submitbutton;
             OrderSubmit.Text = LResource.submitbutton;
 #if DEBUG
 #if DEBUG
-           
+
 #else
 #else
             LockSettingFunction(false);
             LockSettingFunction(false);
 #endif
 #endif
@@ -624,7 +621,7 @@ namespace MOKA_Factory_Tools
                     if (!Preload.Checked || LocalDB != null)
                     if (!Preload.Checked || LocalDB != null)
                         uploadbackground.Start();
                         uploadbackground.Start();
             }
             }
-            
+
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -652,14 +649,14 @@ namespace MOKA_Factory_Tools
                 var Preloadmode = jObject["Preload"].Value<string>();
                 var Preloadmode = jObject["Preload"].Value<string>();
                 var UsingLocalPID = jObject["UsingLocalPID"].Value<string>();
                 var UsingLocalPID = jObject["UsingLocalPID"].Value<string>();
                 Custom_ProjectID = jObject["Custom_ProjectID"].Value<string>();
                 Custom_ProjectID = jObject["Custom_ProjectID"].Value<string>();
-                functionSetting1.Wait_after_completion= jObject["Wait_after_completion"].Value<int>();
+                functionSetting1.Wait_after_completion = jObject["Wait_after_completion"].Value<int>();
                 functionSetting1.EnterFactoryRetry = jObject["EnterFactoryRetry"].Value<int>();
                 functionSetting1.EnterFactoryRetry = jObject["EnterFactoryRetry"].Value<int>();
                 functionSetting1.AllowNoScanning = jObject["AllowNoScanning"].Value<bool>();
                 functionSetting1.AllowNoScanning = jObject["AllowNoScanning"].Value<bool>();
-                functionSetting1.ReportTimeOut= jObject["ReportTimeOut"].Value<int>();
+                functionSetting1.ReportTimeOut = jObject["ReportTimeOut"].Value<int>();
 
 
 
 
                 //本地离线抄写时key长度设置获取
                 //本地离线抄写时key长度设置获取
-                functionSetting1.LocalDidSize= jObject["LocalSize"]["DID"].Value<int>();
+                functionSetting1.LocalDidSize = jObject["LocalSize"]["DID"].Value<int>();
                 functionSetting1.LocalMacSize = jObject["LocalSize"]["MAC"].Value<int>();
                 functionSetting1.LocalMacSize = jObject["LocalSize"]["MAC"].Value<int>();
                 functionSetting1.LocalHdcpSize = jObject["LocalSize"]["HDCP"].Value<int>();
                 functionSetting1.LocalHdcpSize = jObject["LocalSize"]["HDCP"].Value<int>();
                 functionSetting1.LocalWidiSize = jObject["LocalSize"]["WIDI"].Value<int>();
                 functionSetting1.LocalWidiSize = jObject["LocalSize"]["WIDI"].Value<int>();
@@ -678,13 +675,13 @@ namespace MOKA_Factory_Tools
 
 
                 //条码限制
                 //条码限制
                 functionSetting1.BarcodeLimit = jObject["BarcodeLimit"].Value<bool>();
                 functionSetting1.BarcodeLimit = jObject["BarcodeLimit"].Value<bool>();
-                functionSetting1.BarcodeWrite = jObject["BarcodeWrite"] == null ? CommonMethod.AddJsonConfig("BarcodeWrite",false) : jObject["BarcodeWrite"].Value<bool>();
+                functionSetting1.BarcodeWrite = jObject["BarcodeWrite"] == null ? CommonMethod.AddJsonConfig("BarcodeWrite", false) : jObject["BarcodeWrite"].Value<bool>();
                 functionSetting1.BarcodeLength = jObject["BarcodeLength"].Value<int>();
                 functionSetting1.BarcodeLength = jObject["BarcodeLength"].Value<int>();
                 functionSetting1.BarcodeKeyword = jObject["BarcodeKeyword"].Value<string>();
                 functionSetting1.BarcodeKeyword = jObject["BarcodeKeyword"].Value<string>();
 
 
                 //串口延迟
                 //串口延迟
                 functionSetting1.SerailDelay = jObject["SerailDelay"].Value<int>();
                 functionSetting1.SerailDelay = jObject["SerailDelay"].Value<int>();
-                SerialCMD.SerialTimeout= jObject["SerialTimeout"].Value<int>();
+                SerialCMD.SerialTimeout = jObject["SerialTimeout"].Value<int>();
 
 
                 // G客户防呆措施;
                 // G客户防呆措施;
                 functionSetting1.UsingGFoolProofing = jObject["UsingGFoolProofing"] == null ? false : jObject["UsingGFoolProofing"].Value<bool>();
                 functionSetting1.UsingGFoolProofing = jObject["UsingGFoolProofing"] == null ? false : jObject["UsingGFoolProofing"].Value<bool>();
@@ -719,7 +716,7 @@ namespace MOKA_Factory_Tools
                 }
                 }
 
 
                 //ReadCheck配置读取
                 //ReadCheck配置读取
-                ReadCheck1.PIDReadcheck= jObject["ReadCheck"]["PID"].Value<bool>();
+                ReadCheck1.PIDReadcheck = jObject["ReadCheck"]["PID"].Value<bool>();
                 ReadCheck1.OSDReadcheck = jObject["ReadCheck"]["OSD"].Value<bool>();
                 ReadCheck1.OSDReadcheck = jObject["ReadCheck"]["OSD"].Value<bool>();
                 ReadCheck1.SHOPReadcheck = jObject["ReadCheck"]["SHOP"].Value<bool>();
                 ReadCheck1.SHOPReadcheck = jObject["ReadCheck"]["SHOP"].Value<bool>();
                 ReadCheck1.DIDReadcheck = jObject["ReadCheck"]["DID"].Value<bool>();
                 ReadCheck1.DIDReadcheck = jObject["ReadCheck"]["DID"].Value<bool>();
@@ -744,6 +741,7 @@ namespace MOKA_Factory_Tools
                 ReadCheck1.YouTubeReadcheck = jObject["ReadCheck"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "YouTube") : jObject["ReadCheck"]["YouTube"].Value<bool>();
                 ReadCheck1.YouTubeReadcheck = jObject["ReadCheck"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "YouTube") : jObject["ReadCheck"]["YouTube"].Value<bool>();
                 ReadCheck1.EDIDPIDReadcheck = jObject["ReadCheck"]["EDIDPID"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "EDIDPID") : jObject["ReadCheck"]["EDIDPID"].Value<bool>();
                 ReadCheck1.EDIDPIDReadcheck = jObject["ReadCheck"]["EDIDPID"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "EDIDPID") : jObject["ReadCheck"]["EDIDPID"].Value<bool>();
                 ReadCheck1.EDIDModeNameReadcheck = jObject["ReadCheck"]["EDIDModeName"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "EDIDModeName") : jObject["ReadCheck"]["EDIDModeName"].Value<bool>();
                 ReadCheck1.EDIDModeNameReadcheck = jObject["ReadCheck"]["EDIDModeName"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "EDIDModeName") : jObject["ReadCheck"]["EDIDModeName"].Value<bool>();
+                ReadCheck1.ACASKeyReadcheck = jObject["ReadCheck"]["ACASKey"] == null ? CommonMethod.InsertJsonConfig("ReadCheck", "ACASKey") : jObject["ReadCheck"]["ACASKey"].Value<bool>();
                 //WriteCheck配置读取
                 //WriteCheck配置读取
                 WriteCheck1.DIDCheckcheck = jObject["WriteCheck"]["DID"].Value<bool>();
                 WriteCheck1.DIDCheckcheck = jObject["WriteCheck"]["DID"].Value<bool>();
                 WriteCheck1.MacCheckcheck = jObject["WriteCheck"]["MAC"].Value<bool>();
                 WriteCheck1.MacCheckcheck = jObject["WriteCheck"]["MAC"].Value<bool>();
@@ -755,18 +753,19 @@ namespace MOKA_Factory_Tools
                 WriteCheck1.CI_plusCheckcheck = jObject["WriteCheck"]["CI"].Value<bool>();
                 WriteCheck1.CI_plusCheckcheck = jObject["WriteCheck"]["CI"].Value<bool>();
                 WriteCheck1.AttestationCheckcheck = jObject["WriteCheck"]["Attestation"].Value<bool>();
                 WriteCheck1.AttestationCheckcheck = jObject["WriteCheck"]["Attestation"].Value<bool>();
                 WriteCheck1.MGKCheckcheck = jObject["WriteCheck"]["MGK"].Value<bool>();
                 WriteCheck1.MGKCheckcheck = jObject["WriteCheck"]["MGK"].Value<bool>();
-                WriteCheck1.FairplayCheckcheck =  jObject["WriteCheck"]["Fairplay"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Fairplay") : jObject["WriteCheck"]["Fairplay"].Value<bool>();
-                WriteCheck1.ECPCheckcheck =  jObject["WriteCheck"]["ECP"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "ECP") : jObject["WriteCheck"]["ECP"].Value<bool>();
+                WriteCheck1.FairplayCheckcheck = jObject["WriteCheck"]["Fairplay"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Fairplay") : jObject["WriteCheck"]["Fairplay"].Value<bool>();
+                WriteCheck1.ECPCheckcheck = jObject["WriteCheck"]["ECP"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "ECP") : jObject["WriteCheck"]["ECP"].Value<bool>();
                 WriteCheck1.WifiMacCheckcheck = jObject["WriteCheck"]["WifiMac"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "WifiMac") : jObject["WriteCheck"]["WifiMac"].Value<bool>();
                 WriteCheck1.WifiMacCheckcheck = jObject["WriteCheck"]["WifiMac"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "WifiMac") : jObject["WriteCheck"]["WifiMac"].Value<bool>();
-                WriteCheck1.BTMacCheckcheck =  jObject["WriteCheck"]["BTMac"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "BTMac") : jObject["WriteCheck"]["BTMac"].Value<bool>();
-                WriteCheck1.LEKCheckcheck =  jObject["WriteCheck"]["LEK"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "LEK") : jObject["WriteCheck"]["LEK"].Value<bool>();
-                WriteCheck1.PEKCheckcheck =  jObject["WriteCheck"]["PEK"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "PEK") : jObject["WriteCheck"]["PEK"].Value<bool>();
-                WriteCheck1.PlayreadyCheckcheck =  jObject["WriteCheck"]["Playready"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Playready") : jObject["WriteCheck"]["Playready"].Value<bool>();
-                WriteCheck1.HashCheckcheck =  jObject["WriteCheck"]["Hash"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Hash") : jObject["WriteCheck"]["Hash"].Value<bool>();
+                WriteCheck1.BTMacCheckcheck = jObject["WriteCheck"]["BTMac"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "BTMac") : jObject["WriteCheck"]["BTMac"].Value<bool>();
+                WriteCheck1.LEKCheckcheck = jObject["WriteCheck"]["LEK"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "LEK") : jObject["WriteCheck"]["LEK"].Value<bool>();
+                WriteCheck1.PEKCheckcheck = jObject["WriteCheck"]["PEK"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "PEK") : jObject["WriteCheck"]["PEK"].Value<bool>();
+                WriteCheck1.PlayreadyCheckcheck = jObject["WriteCheck"]["Playready"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Playready") : jObject["WriteCheck"]["Playready"].Value<bool>();
+                WriteCheck1.HashCheckcheck = jObject["WriteCheck"]["Hash"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "Hash") : jObject["WriteCheck"]["Hash"].Value<bool>();
                 WriteCheck1.DSNCheckcheck = jObject["WriteCheck"]["DSN"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "DSN") : jObject["WriteCheck"]["DSN"].Value<bool>();
                 WriteCheck1.DSNCheckcheck = jObject["WriteCheck"]["DSN"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "DSN") : jObject["WriteCheck"]["DSN"].Value<bool>();
                 WriteCheck1.YouTubeCheckcheck = jObject["WriteCheck"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "YouTube") : jObject["WriteCheck"]["YouTube"].Value<bool>();
                 WriteCheck1.YouTubeCheckcheck = jObject["WriteCheck"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "YouTube") : jObject["WriteCheck"]["YouTube"].Value<bool>();
+                WriteCheck1.ACASKeyCheckcheck = jObject["WriteCheck"]["ACASKey"] == null ? CommonMethod.InsertJsonConfig("WriteCheck", "ACASKey") : jObject["WriteCheck"]["ACASKey"].Value<bool>();
                 //WriteDone配置读取
                 //WriteDone配置读取
-                WriteDone1.PIDWrite_YesNo = jObject["WriteDone"]["PID"].Value<bool>(); 
+                WriteDone1.PIDWrite_YesNo = jObject["WriteDone"]["PID"].Value<bool>();
                 WriteDone1.PIDWriteDelay = jObject["WriteDone"]["PIDWirteDelay"].Value<int>();
                 WriteDone1.PIDWriteDelay = jObject["WriteDone"]["PIDWirteDelay"].Value<int>();
                 WriteDone1.ClientTypeCheck_YesNo = jObject["WriteDone"]["ClientType"].Value<bool>();
                 WriteDone1.ClientTypeCheck_YesNo = jObject["WriteDone"]["ClientType"].Value<bool>();
                 WriteDone1.SoftwareVersionCheck_YesNo = jObject["WriteDone"]["SoftwareVersion"].Value<bool>();
                 WriteDone1.SoftwareVersionCheck_YesNo = jObject["WriteDone"]["SoftwareVersion"].Value<bool>();
@@ -780,19 +779,20 @@ namespace MOKA_Factory_Tools
                 WriteDone1.CI_plusWrite_YesNo = jObject["WriteDone"]["CI"].Value<bool>();
                 WriteDone1.CI_plusWrite_YesNo = jObject["WriteDone"]["CI"].Value<bool>();
                 WriteDone1.AttestationWrite_YesNo = jObject["WriteDone"]["Attestation"].Value<bool>();
                 WriteDone1.AttestationWrite_YesNo = jObject["WriteDone"]["Attestation"].Value<bool>();
                 WriteDone1.MGKWrite_YesNo = jObject["WriteDone"]["MGK"].Value<bool>();
                 WriteDone1.MGKWrite_YesNo = jObject["WriteDone"]["MGK"].Value<bool>();
-                WriteDone1.FairplayWrite_YesNo =  jObject["WriteDone"]["Fairplay"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Fairplay") : jObject["WriteDone"]["Fairplay"].Value<bool>();
-                WriteDone1.ECPWrite_YesNo =  jObject["WriteDone"]["ECP"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "ECP") : jObject["WriteDone"]["ECP"].Value<bool>();
-                WriteDone1.WifiMacWrite_YesNo =  jObject["WriteDone"]["WifiMac"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "WifiMac") : jObject["WriteDone"]["WifiMac"].Value<bool>();
-                WriteDone1.BTMacWrite_YesNo =  jObject["WriteDone"]["BTMac"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "BTMac") : jObject["WriteDone"]["BTMac"].Value<bool>();
-                WriteDone1.LEKWrite_YesNo =  jObject["WriteDone"]["LEK"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "LEK") : jObject["WriteDone"]["LEK"].Value<bool>();
-                WriteDone1.PEKWrite_YesNo =  jObject["WriteDone"]["PEK"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "PEK") : jObject["WriteDone"]["PEK"].Value<bool>();
-                WriteDone1.PlayreadyWrite_YesNo =  jObject["WriteDone"]["Playready"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Playready") : jObject["WriteDone"]["Playready"].Value<bool>();
+                WriteDone1.FairplayWrite_YesNo = jObject["WriteDone"]["Fairplay"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Fairplay") : jObject["WriteDone"]["Fairplay"].Value<bool>();
+                WriteDone1.ECPWrite_YesNo = jObject["WriteDone"]["ECP"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "ECP") : jObject["WriteDone"]["ECP"].Value<bool>();
+                WriteDone1.WifiMacWrite_YesNo = jObject["WriteDone"]["WifiMac"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "WifiMac") : jObject["WriteDone"]["WifiMac"].Value<bool>();
+                WriteDone1.BTMacWrite_YesNo = jObject["WriteDone"]["BTMac"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "BTMac") : jObject["WriteDone"]["BTMac"].Value<bool>();
+                WriteDone1.LEKWrite_YesNo = jObject["WriteDone"]["LEK"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "LEK") : jObject["WriteDone"]["LEK"].Value<bool>();
+                WriteDone1.PEKWrite_YesNo = jObject["WriteDone"]["PEK"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "PEK") : jObject["WriteDone"]["PEK"].Value<bool>();
+                WriteDone1.PlayreadyWrite_YesNo = jObject["WriteDone"]["Playready"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Playready") : jObject["WriteDone"]["Playready"].Value<bool>();
                 WriteDone1.HashWrite_YesNo = jObject["WriteDone"]["Hash"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Hash") : jObject["WriteDone"]["Hash"].Value<bool>();
                 WriteDone1.HashWrite_YesNo = jObject["WriteDone"]["Hash"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "Hash") : jObject["WriteDone"]["Hash"].Value<bool>();
                 WriteDone1.DSNWrite_YesNo = jObject["WriteDone"]["DSN"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "DSN") : jObject["WriteDone"]["DSN"].Value<bool>();
                 WriteDone1.DSNWrite_YesNo = jObject["WriteDone"]["DSN"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "DSN") : jObject["WriteDone"]["DSN"].Value<bool>();
-                WriteDone1.AutoWhiteBalance= jObject["WriteDone"]["AutoWhiteBalance"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "AutoWhiteBalance") : jObject["WriteDone"]["AutoWhiteBalance"].Value<bool>();
+                WriteDone1.AutoWhiteBalance = jObject["WriteDone"]["AutoWhiteBalance"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "AutoWhiteBalance") : jObject["WriteDone"]["AutoWhiteBalance"].Value<bool>();
                 WriteDone1.YouTubeWrite_YesNo = jObject["WriteDone"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "YouTube") : jObject["WriteDone"]["YouTube"].Value<bool>();
                 WriteDone1.YouTubeWrite_YesNo = jObject["WriteDone"]["YouTube"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "YouTube") : jObject["WriteDone"]["YouTube"].Value<bool>();
                 WriteDone1.EDIDPIDWrite_YesNo = jObject["WriteDone"]["EDIDPID"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "EDIDPID") : jObject["WriteDone"]["EDIDPID"].Value<bool>();
                 WriteDone1.EDIDPIDWrite_YesNo = jObject["WriteDone"]["EDIDPID"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "EDIDPID") : jObject["WriteDone"]["EDIDPID"].Value<bool>();
                 WriteDone1.EDIDModeNameWrite_YesNo = jObject["WriteDone"]["EDIDModeName"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "EDIDModeName") : jObject["WriteDone"]["EDIDModeName"].Value<bool>();
                 WriteDone1.EDIDModeNameWrite_YesNo = jObject["WriteDone"]["EDIDModeName"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "EDIDModeName") : jObject["WriteDone"]["EDIDModeName"].Value<bool>();
+                WriteDone1.ACASKeyWrite_YesNo = jObject["WriteDone"]["ACASKey"] == null ? CommonMethod.InsertJsonConfig("WriteDone", "ACASKey") : jObject["WriteDone"]["ACASKey"].Value<bool>();
                 file.Close();
                 file.Close();
                 if (Custom_ProjectID != null)
                 if (Custom_ProjectID != null)
                     if (Custom_ProjectID.Trim().Length > 0)
                     if (Custom_ProjectID.Trim().Length > 0)
@@ -824,17 +824,17 @@ namespace MOKA_Factory_Tools
                 Preload.Checked = Preloadmode == "True";
                 Preload.Checked = Preloadmode == "True";
                 WriteChannel.Checked = WriteChannelConfig == "True";
                 WriteChannel.Checked = WriteChannelConfig == "True";
                 WriteOSD.Checked = WriteOSDLanguageConfig == "True";
                 WriteOSD.Checked = WriteOSDLanguageConfig == "True";
-                WriteSHOP.Checked = WriteSHOPLanguageConfig == "True";                             
+                WriteSHOP.Checked = WriteSHOPLanguageConfig == "True";
                 WBInit.Checked = WhiteBalanceInitConfig == "True";
                 WBInit.Checked = WhiteBalanceInitConfig == "True";
                 UsinglocalIDCheck.Checked = UsingLocalPID == "True";
                 UsinglocalIDCheck.Checked = UsingLocalPID == "True";
                 OrderText.Text = LastOrder;
                 OrderText.Text = LastOrder;
-                if(File.Exists(WhiteBalancePath))
-                {                   
+                if (File.Exists(WhiteBalancePath))
+                {
                     if (!LoadWBConfig(WhiteBalancePath))
                     if (!LoadWBConfig(WhiteBalancePath))
                     {
                     {
                         MessageBox.Show(LResource.ReadWBError);
                         MessageBox.Show(LResource.ReadWBError);
                         WriteWB.Checked = false;
                         WriteWB.Checked = false;
-                    }                       
+                    }
                     else
                     else
                     {
                     {
                         WBPath.Text = WhiteBalancePath;
                         WBPath.Text = WhiteBalancePath;
@@ -871,12 +871,12 @@ namespace MOKA_Factory_Tools
                 functionSetting1.WarmRGB[2] = (byte)(Convert.ToDouble(Iniconfig.OperateIniFile.ReadIniData("WBA value:", "Warm white B:", null, filepath)) + 256);
                 functionSetting1.WarmRGB[2] = (byte)(Convert.ToDouble(Iniconfig.OperateIniFile.ReadIniData("WBA value:", "Warm white B:", null, filepath)) + 256);
                 return true;
                 return true;
             }
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
             {
                 MessageBox.Show(ex.Message);
                 MessageBox.Show(ex.Message);
                 return false;
                 return false;
             }
             }
-            
+
         }
         }
 
 
         private void ChannelList_SelectedIndexChanged(object sender, EventArgs e)
         private void ChannelList_SelectedIndexChanged(object sender, EventArgs e)
@@ -885,7 +885,7 @@ namespace MOKA_Factory_Tools
             string channelcode = ChannelMapList[ChannelSelect];
             string channelcode = ChannelMapList[ChannelSelect];
             functionSetting1.ChannelCode = SerialInit.HexToByte(channelcode);
             functionSetting1.ChannelCode = SerialInit.HexToByte(channelcode);
             SaveJsonConfig("ChannelSelect", ChannelSelect);
             SaveJsonConfig("ChannelSelect", ChannelSelect);
-            Log.WriteInfoLog("\r\nSet channel setting to " + ChannelSelect + "\r\nchannel code is "+ channelcode);
+            Log.WriteInfoLog("\r\nSet channel setting to " + ChannelSelect + "\r\nchannel code is " + channelcode);
         }
         }
 
 
         private void OSDList_SelectedIndexChanged(object sender, EventArgs e)
         private void OSDList_SelectedIndexChanged(object sender, EventArgs e)
@@ -917,7 +917,7 @@ namespace MOKA_Factory_Tools
             {
             {
                 strFileName = System.IO.Path.GetFullPath(openFileDialog1.FileName);
                 strFileName = System.IO.Path.GetFullPath(openFileDialog1.FileName);
                 WBPath.Text = strFileName;
                 WBPath.Text = strFileName;
-                if(LoadWBConfig(strFileName))
+                if (LoadWBConfig(strFileName))
                 {
                 {
                     functionSetting1.WBFileName = Path.GetFileName(openFileDialog1.FileName);
                     functionSetting1.WBFileName = Path.GetFileName(openFileDialog1.FileName);
                     SaveJsonConfig("WhiteBalancePath", strFileName);
                     SaveJsonConfig("WhiteBalancePath", strFileName);
@@ -928,7 +928,7 @@ namespace MOKA_Factory_Tools
 
 
         private void WriteWB_CheckedChanged(object sender, EventArgs e)
         private void WriteWB_CheckedChanged(object sender, EventArgs e)
         {
         {
-            if(WriteWB.Checked==true)
+            if (WriteWB.Checked == true)
             {
             {
                 if (WBPath.Text.Trim().Length > 0)
                 if (WBPath.Text.Trim().Length > 0)
                 {
                 {
@@ -947,13 +947,13 @@ namespace MOKA_Factory_Tools
             }
             }
         }
         }
 
 
-        public void SaveJsonConfig(string node,object value)
+        public void SaveJsonConfig(string node, object value)
         {
         {
             StreamReader file = File.OpenText(LocalPath.localpath + "\\Config.json");
             StreamReader file = File.OpenText(LocalPath.localpath + "\\Config.json");
             using (JsonTextReader reader = new JsonTextReader(file))
             using (JsonTextReader reader = new JsonTextReader(file))
             {
             {
                 JObject jObject = (JObject)JToken.ReadFrom(reader);
                 JObject jObject = (JObject)JToken.ReadFrom(reader);
-                jObject[node] = value.ToString();      
+                jObject[node] = value.ToString();
                 file.Close();
                 file.Close();
                 using (StreamWriter writer = new StreamWriter(LocalPath.localpath + "\\Config.json"))
                 using (StreamWriter writer = new StreamWriter(LocalPath.localpath + "\\Config.json"))
                 {
                 {
@@ -1045,14 +1045,14 @@ namespace MOKA_Factory_Tools
 
 
         private void CreateKeyManually_Click(object sender, EventArgs e)
         private void CreateKeyManually_Click(object sender, EventArgs e)
         {
         {
-            CreateDBManually CreateDBManually1 = new CreateDBManually(TestMode.serverurl,ErrorDB);
+            CreateDBManually CreateDBManually1 = new CreateDBManually(TestMode.serverurl, ErrorDB);
             CreateDBManually1.ShowDialog();
             CreateDBManually1.ShowDialog();
         }
         }
 
 
         private void Preload_CheckedChanged(object sender, EventArgs e)
         private void Preload_CheckedChanged(object sender, EventArgs e)
         {
         {
             SaveJsonConfig("Preload", Preload.Checked.ToString());
             SaveJsonConfig("Preload", Preload.Checked.ToString());
-        }       
+        }
 
 
         private void Form1_Move(object sender, EventArgs e)
         private void Form1_Move(object sender, EventArgs e)
         {
         {
@@ -1061,7 +1061,7 @@ namespace MOKA_Factory_Tools
                 Point XY = this.Location;
                 Point XY = this.Location;
                 XY.X = this.Right;
                 XY.X = this.Right;
                 XY.Y = this.Top;
                 XY.Y = this.Top;
-                this.MoveEvent(XY, formlocationmsg,LocationNum);
+                this.MoveEvent(XY, formlocationmsg, LocationNum);
             }
             }
         }
         }
 
 
@@ -1084,7 +1084,7 @@ namespace MOKA_Factory_Tools
             }
             }
         }
         }
 
 
-        private void AutoKeyRequire(IntPtr intPtr,string key,string keytype)
+        private void AutoKeyRequire(IntPtr intPtr, string key, string keytype)
         {
         {
             Task.Run(() =>
             Task.Run(() =>
             {
             {
@@ -1097,7 +1097,7 @@ namespace MOKA_Factory_Tools
                         CommonMethod.AutoGetKey(midList1.host, OrderText.Text.Trim(), key, keytype, ErrorDB);
                         CommonMethod.AutoGetKey(midList1.host, OrderText.Text.Trim(), key, keytype, ErrorDB);
                     }
                     }
                 }
                 }
-            });              
+            });
         }
         }
 
 
         private void SNKeyDownEven(IntPtr intPtr)
         private void SNKeyDownEven(IntPtr intPtr)
@@ -1135,7 +1135,7 @@ namespace MOKA_Factory_Tools
         {
         {
             while (true)
             while (true)
             {
             {
-                if(CommonMethod.HTTPChecker(StructList.CheckServerConnectionUrl))
+                if (CommonMethod.HTTPChecker(StructList.CheckServerConnectionUrl))
                 {
                 {
                     try
                     try
                     {
                     {
@@ -1153,9 +1153,9 @@ namespace MOKA_Factory_Tools
                             }
                             }
                             else
                             else
                                 if (CommonMethod.UploadCopyResult(content, url, ErrorDB, OrderText.Text.Trim(), true, id, functionSetting1.ReportTimeOut))
                                 if (CommonMethod.UploadCopyResult(content, url, ErrorDB, OrderText.Text.Trim(), true, id, functionSetting1.ReportTimeOut))
-                                {
-                                    SQLiteHelper.UpdateReportData(ErrorDB, "CopyDelayReport", "ID", id);
-                                }
+                            {
+                                SQLiteHelper.UpdateReportData(ErrorDB, "CopyDelayReport", "ID", id);
+                            }
                     }
                     }
                     catch (Exception ex)
                     catch (Exception ex)
                     {
                     {
@@ -1175,7 +1175,7 @@ namespace MOKA_Factory_Tools
                                 SQLiteHelper.UpdateReportData(ErrorDB, "ErrorReport", "ID", id);
                                 SQLiteHelper.UpdateReportData(ErrorDB, "ErrorReport", "ID", id);
                             }
                             }
                         }
                         }
-                            
+
                     }
                     }
                     catch (Exception ex)
                     catch (Exception ex)
                     {
                     {
@@ -1185,13 +1185,13 @@ namespace MOKA_Factory_Tools
                 }
                 }
                 else
                 else
                     Thread.Sleep(20000);
                     Thread.Sleep(20000);
-            }         
+            }
         }
         }
 
 
         private void PID_Num_ValueChanged(object sender, EventArgs e)
         private void PID_Num_ValueChanged(object sender, EventArgs e)
         {
         {
             Custom_ProjectID = PID_Num.Value.ToString();
             Custom_ProjectID = PID_Num.Value.ToString();
-            SaveJsonConfig("Custom_ProjectID", Custom_ProjectID);            
+            SaveJsonConfig("Custom_ProjectID", Custom_ProjectID);
         }
         }
 
 
         private void BarCodeLengthText_ValueChanged(object sender, EventArgs e)
         private void BarCodeLengthText_ValueChanged(object sender, EventArgs e)

+ 94 - 94
SCBC Factory Tools/Views/OperationPanel.Designer.cs

@@ -67,6 +67,16 @@
             this.skinLabel10 = new CCWin.SkinControl.SkinLabel();
             this.skinLabel10 = new CCWin.SkinControl.SkinLabel();
             this.skinGroupBox2 = new CCWin.SkinControl.SkinGroupBox();
             this.skinGroupBox2 = new CCWin.SkinControl.SkinGroupBox();
             this.skinPanel1 = new CCWin.SkinControl.SkinPanel();
             this.skinPanel1 = new CCWin.SkinControl.SkinPanel();
+            this.m_readACASID = new CCWin.SkinControl.SkinLabel();
+            this.skinLabel24 = new CCWin.SkinControl.SkinLabel();
+            this.skinLabel27 = new CCWin.SkinControl.SkinLabel();
+            this.skinLabel28 = new CCWin.SkinControl.SkinLabel();
+            this.WriteACASID = new CCWin.SkinControl.SkinCheckBox();
+            this.m_readACASKey = new CCWin.SkinControl.SkinLabel();
+            this.m_checkACASKey = new CCWin.SkinControl.SkinLabel();
+            this.m_writeACASKey = new CCWin.SkinControl.SkinLabel();
+            this.ACASKeyCount = new CCWin.SkinControl.SkinLabel();
+            this.WriteACASKey = new CCWin.SkinControl.SkinCheckBox();
             this.m_readEDIDName = new CCWin.SkinControl.SkinLabel();
             this.m_readEDIDName = new CCWin.SkinControl.SkinLabel();
             this.m_checkEDIDName = new CCWin.SkinControl.SkinLabel();
             this.m_checkEDIDName = new CCWin.SkinControl.SkinLabel();
             this.m_writeEDIDName = new CCWin.SkinControl.SkinLabel();
             this.m_writeEDIDName = new CCWin.SkinControl.SkinLabel();
@@ -190,16 +200,6 @@
             this.SNText = new CCWin.SkinControl.SkinWaterTextBox();
             this.SNText = new CCWin.SkinControl.SkinWaterTextBox();
             this.timer1 = new System.Windows.Forms.Timer(this.components);
             this.timer1 = new System.Windows.Forms.Timer(this.components);
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
-            this.m_readACASKey = new CCWin.SkinControl.SkinLabel();
-            this.m_checkACASKey = new CCWin.SkinControl.SkinLabel();
-            this.m_writeACASKey = new CCWin.SkinControl.SkinLabel();
-            this.ACASKeyCount = new CCWin.SkinControl.SkinLabel();
-            this.WriteACASKey = new CCWin.SkinControl.SkinCheckBox();
-            this.m_readACASID = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel24 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel27 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel28 = new CCWin.SkinControl.SkinLabel();
-            this.WriteACASID = new CCWin.SkinControl.SkinCheckBox();
             this.skinGroupBox1.SuspendLayout();
             this.skinGroupBox1.SuspendLayout();
             this.skinGroupBox2.SuspendLayout();
             this.skinGroupBox2.SuspendLayout();
             this.skinPanel1.SuspendLayout();
             this.skinPanel1.SuspendLayout();
@@ -686,6 +686,90 @@
             this.skinPanel1.Name = "skinPanel1";
             this.skinPanel1.Name = "skinPanel1";
             this.skinPanel1.NormlBack = null;
             this.skinPanel1.NormlBack = null;
             // 
             // 
+            // m_readACASID
+            // 
+            resources.ApplyResources(this.m_readACASID, "m_readACASID");
+            this.m_readACASID.BackColor = System.Drawing.Color.Transparent;
+            this.m_readACASID.BorderColor = System.Drawing.Color.White;
+            this.m_readACASID.Name = "m_readACASID";
+            // 
+            // skinLabel24
+            // 
+            resources.ApplyResources(this.skinLabel24, "skinLabel24");
+            this.skinLabel24.BackColor = System.Drawing.Color.Transparent;
+            this.skinLabel24.BorderColor = System.Drawing.Color.White;
+            this.skinLabel24.Name = "skinLabel24";
+            // 
+            // skinLabel27
+            // 
+            resources.ApplyResources(this.skinLabel27, "skinLabel27");
+            this.skinLabel27.BackColor = System.Drawing.Color.Transparent;
+            this.skinLabel27.BorderColor = System.Drawing.Color.White;
+            this.skinLabel27.Name = "skinLabel27";
+            // 
+            // skinLabel28
+            // 
+            resources.ApplyResources(this.skinLabel28, "skinLabel28");
+            this.skinLabel28.BackColor = System.Drawing.Color.Transparent;
+            this.skinLabel28.BorderColor = System.Drawing.Color.White;
+            this.skinLabel28.Name = "skinLabel28";
+            // 
+            // WriteACASID
+            // 
+            resources.ApplyResources(this.WriteACASID, "WriteACASID");
+            this.WriteACASID.BackColor = System.Drawing.Color.Transparent;
+            this.WriteACASID.ControlState = CCWin.SkinClass.ControlState.Normal;
+            this.WriteACASID.DownBack = null;
+            this.WriteACASID.MouseBack = null;
+            this.WriteACASID.Name = "WriteACASID";
+            this.WriteACASID.NormlBack = null;
+            this.WriteACASID.SelectedDownBack = null;
+            this.WriteACASID.SelectedMouseBack = null;
+            this.WriteACASID.SelectedNormlBack = null;
+            this.WriteACASID.UseVisualStyleBackColor = false;
+            // 
+            // m_readACASKey
+            // 
+            resources.ApplyResources(this.m_readACASKey, "m_readACASKey");
+            this.m_readACASKey.BackColor = System.Drawing.Color.Transparent;
+            this.m_readACASKey.BorderColor = System.Drawing.Color.White;
+            this.m_readACASKey.Name = "m_readACASKey";
+            // 
+            // m_checkACASKey
+            // 
+            resources.ApplyResources(this.m_checkACASKey, "m_checkACASKey");
+            this.m_checkACASKey.BackColor = System.Drawing.Color.Transparent;
+            this.m_checkACASKey.BorderColor = System.Drawing.Color.White;
+            this.m_checkACASKey.Name = "m_checkACASKey";
+            // 
+            // m_writeACASKey
+            // 
+            resources.ApplyResources(this.m_writeACASKey, "m_writeACASKey");
+            this.m_writeACASKey.BackColor = System.Drawing.Color.Transparent;
+            this.m_writeACASKey.BorderColor = System.Drawing.Color.White;
+            this.m_writeACASKey.Name = "m_writeACASKey";
+            // 
+            // ACASKeyCount
+            // 
+            resources.ApplyResources(this.ACASKeyCount, "ACASKeyCount");
+            this.ACASKeyCount.BackColor = System.Drawing.Color.Transparent;
+            this.ACASKeyCount.BorderColor = System.Drawing.Color.White;
+            this.ACASKeyCount.Name = "ACASKeyCount";
+            // 
+            // WriteACASKey
+            // 
+            resources.ApplyResources(this.WriteACASKey, "WriteACASKey");
+            this.WriteACASKey.BackColor = System.Drawing.Color.Transparent;
+            this.WriteACASKey.ControlState = CCWin.SkinClass.ControlState.Normal;
+            this.WriteACASKey.DownBack = null;
+            this.WriteACASKey.MouseBack = null;
+            this.WriteACASKey.Name = "WriteACASKey";
+            this.WriteACASKey.NormlBack = null;
+            this.WriteACASKey.SelectedDownBack = null;
+            this.WriteACASKey.SelectedMouseBack = null;
+            this.WriteACASKey.SelectedNormlBack = null;
+            this.WriteACASKey.UseVisualStyleBackColor = false;
+            // 
             // m_readEDIDName
             // m_readEDIDName
             // 
             // 
             resources.ApplyResources(this.m_readEDIDName, "m_readEDIDName");
             resources.ApplyResources(this.m_readEDIDName, "m_readEDIDName");
@@ -1701,90 +1785,6 @@
             this.timer1.Interval = 1000;
             this.timer1.Interval = 1000;
             this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
             this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
             // 
             // 
-            // m_readACASKey
-            // 
-            resources.ApplyResources(this.m_readACASKey, "m_readACASKey");
-            this.m_readACASKey.BackColor = System.Drawing.Color.Transparent;
-            this.m_readACASKey.BorderColor = System.Drawing.Color.White;
-            this.m_readACASKey.Name = "m_readACASKey";
-            // 
-            // m_checkACASKey
-            // 
-            resources.ApplyResources(this.m_checkACASKey, "m_checkACASKey");
-            this.m_checkACASKey.BackColor = System.Drawing.Color.Transparent;
-            this.m_checkACASKey.BorderColor = System.Drawing.Color.White;
-            this.m_checkACASKey.Name = "m_checkACASKey";
-            // 
-            // m_writeACASKey
-            // 
-            resources.ApplyResources(this.m_writeACASKey, "m_writeACASKey");
-            this.m_writeACASKey.BackColor = System.Drawing.Color.Transparent;
-            this.m_writeACASKey.BorderColor = System.Drawing.Color.White;
-            this.m_writeACASKey.Name = "m_writeACASKey";
-            // 
-            // ACASKeyCount
-            // 
-            resources.ApplyResources(this.ACASKeyCount, "ACASKeyCount");
-            this.ACASKeyCount.BackColor = System.Drawing.Color.Transparent;
-            this.ACASKeyCount.BorderColor = System.Drawing.Color.White;
-            this.ACASKeyCount.Name = "ACASKeyCount";
-            // 
-            // WriteACASKey
-            // 
-            resources.ApplyResources(this.WriteACASKey, "WriteACASKey");
-            this.WriteACASKey.BackColor = System.Drawing.Color.Transparent;
-            this.WriteACASKey.ControlState = CCWin.SkinClass.ControlState.Normal;
-            this.WriteACASKey.DownBack = null;
-            this.WriteACASKey.MouseBack = null;
-            this.WriteACASKey.Name = "WriteACASKey";
-            this.WriteACASKey.NormlBack = null;
-            this.WriteACASKey.SelectedDownBack = null;
-            this.WriteACASKey.SelectedMouseBack = null;
-            this.WriteACASKey.SelectedNormlBack = null;
-            this.WriteACASKey.UseVisualStyleBackColor = false;
-            // 
-            // m_readACASID
-            // 
-            resources.ApplyResources(this.m_readACASID, "m_readACASID");
-            this.m_readACASID.BackColor = System.Drawing.Color.Transparent;
-            this.m_readACASID.BorderColor = System.Drawing.Color.White;
-            this.m_readACASID.Name = "m_readACASID";
-            // 
-            // skinLabel24
-            // 
-            resources.ApplyResources(this.skinLabel24, "skinLabel24");
-            this.skinLabel24.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel24.BorderColor = System.Drawing.Color.White;
-            this.skinLabel24.Name = "skinLabel24";
-            // 
-            // skinLabel27
-            // 
-            resources.ApplyResources(this.skinLabel27, "skinLabel27");
-            this.skinLabel27.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel27.BorderColor = System.Drawing.Color.White;
-            this.skinLabel27.Name = "skinLabel27";
-            // 
-            // skinLabel28
-            // 
-            resources.ApplyResources(this.skinLabel28, "skinLabel28");
-            this.skinLabel28.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel28.BorderColor = System.Drawing.Color.White;
-            this.skinLabel28.Name = "skinLabel28";
-            // 
-            // WriteACASID
-            // 
-            resources.ApplyResources(this.WriteACASID, "WriteACASID");
-            this.WriteACASID.BackColor = System.Drawing.Color.Transparent;
-            this.WriteACASID.ControlState = CCWin.SkinClass.ControlState.Normal;
-            this.WriteACASID.DownBack = null;
-            this.WriteACASID.MouseBack = null;
-            this.WriteACASID.Name = "WriteACASID";
-            this.WriteACASID.NormlBack = null;
-            this.WriteACASID.SelectedDownBack = null;
-            this.WriteACASID.SelectedMouseBack = null;
-            this.WriteACASID.SelectedNormlBack = null;
-            this.WriteACASID.UseVisualStyleBackColor = false;
-            // 
             // OperationPanel
             // OperationPanel
             // 
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 199 - 143
SCBC Factory Tools/Views/OperationPanel.cs


+ 10 - 10
SCBC Factory Tools/Views/OperationPanel.resx

@@ -126,7 +126,7 @@
   </data>
   </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="BtnRefresh.Location" type="System.Drawing.Point, System.Drawing">
   <data name="BtnRefresh.Location" type="System.Drawing.Point, System.Drawing">
-    <value>198, 157</value>
+    <value>198, 167</value>
   </data>
   </data>
   <data name="BtnRefresh.Size" type="System.Drawing.Size, System.Drawing">
   <data name="BtnRefresh.Size" type="System.Drawing.Size, System.Drawing">
     <value>60, 23</value>
     <value>60, 23</value>
@@ -193,7 +193,7 @@
     <value>NoControl</value>
     <value>NoControl</value>
   </data>
   </data>
   <data name="ProductMsg_Text.Location" type="System.Drawing.Point, System.Drawing">
   <data name="ProductMsg_Text.Location" type="System.Drawing.Point, System.Drawing">
-    <value>229, 121</value>
+    <value>229, 117</value>
   </data>
   </data>
   <data name="ProductMsg_Text.Size" type="System.Drawing.Size, System.Drawing">
   <data name="ProductMsg_Text.Size" type="System.Drawing.Size, System.Drawing">
     <value>50, 17</value>
     <value>50, 17</value>
@@ -298,7 +298,7 @@
     <value>5</value>
     <value>5</value>
   </data>
   </data>
   <data name="BtnClickstart.Location" type="System.Drawing.Point, System.Drawing">
   <data name="BtnClickstart.Location" type="System.Drawing.Point, System.Drawing">
-    <value>264, 157</value>
+    <value>264, 167</value>
   </data>
   </data>
   <data name="BtnClickstart.Size" type="System.Drawing.Size, System.Drawing">
   <data name="BtnClickstart.Size" type="System.Drawing.Size, System.Drawing">
     <value>102, 23</value>
     <value>102, 23</value>
@@ -592,7 +592,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="ChannelText.Location" type="System.Drawing.Point, System.Drawing">
   <data name="ChannelText.Location" type="System.Drawing.Point, System.Drawing">
-    <value>322, 19</value>
+    <value>316, 18</value>
   </data>
   </data>
   <data name="ChannelText.Size" type="System.Drawing.Size, System.Drawing">
   <data name="ChannelText.Size" type="System.Drawing.Size, System.Drawing">
     <value>78, 17</value>
     <value>78, 17</value>
@@ -622,7 +622,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="BaudText.Location" type="System.Drawing.Point, System.Drawing">
   <data name="BaudText.Location" type="System.Drawing.Point, System.Drawing">
-    <value>197, 19</value>
+    <value>191, 18</value>
   </data>
   </data>
   <data name="BaudText.Size" type="System.Drawing.Size, System.Drawing">
   <data name="BaudText.Size" type="System.Drawing.Size, System.Drawing">
     <value>62, 17</value>
     <value>62, 17</value>
@@ -652,7 +652,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="OSDText.Location" type="System.Drawing.Point, System.Drawing">
   <data name="OSDText.Location" type="System.Drawing.Point, System.Drawing">
-    <value>247, 40</value>
+    <value>244, 40</value>
   </data>
   </data>
   <data name="OSDText.Size" type="System.Drawing.Size, System.Drawing">
   <data name="OSDText.Size" type="System.Drawing.Size, System.Drawing">
     <value>58, 17</value>
     <value>58, 17</value>
@@ -802,7 +802,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="COMText.Location" type="System.Drawing.Point, System.Drawing">
   <data name="COMText.Location" type="System.Drawing.Point, System.Drawing">
-    <value>49, 19</value>
+    <value>49, 18</value>
   </data>
   </data>
   <data name="COMText.Size" type="System.Drawing.Size, System.Drawing">
   <data name="COMText.Size" type="System.Drawing.Size, System.Drawing">
     <value>62, 17</value>
     <value>62, 17</value>
@@ -952,7 +952,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="skinLabel5.Location" type="System.Drawing.Point, System.Drawing">
   <data name="skinLabel5.Location" type="System.Drawing.Point, System.Drawing">
-    <value>212, 40</value>
+    <value>206, 40</value>
   </data>
   </data>
   <data name="skinLabel5.Size" type="System.Drawing.Size, System.Drawing">
   <data name="skinLabel5.Size" type="System.Drawing.Size, System.Drawing">
     <value>37, 17</value>
     <value>37, 17</value>
@@ -1012,7 +1012,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="skinLabel3.Location" type="System.Drawing.Point, System.Drawing">
   <data name="skinLabel3.Location" type="System.Drawing.Point, System.Drawing">
-    <value>266, 19</value>
+    <value>260, 19</value>
   </data>
   </data>
   <data name="skinLabel3.Size" type="System.Drawing.Size, System.Drawing">
   <data name="skinLabel3.Size" type="System.Drawing.Size, System.Drawing">
     <value>57, 17</value>
     <value>57, 17</value>
@@ -1042,7 +1042,7 @@
     <value>微软雅黑, 9pt</value>
     <value>微软雅黑, 9pt</value>
   </data>
   </data>
   <data name="skinLabel2.Location" type="System.Drawing.Point, System.Drawing">
   <data name="skinLabel2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>124, 19</value>
+    <value>118, 19</value>
   </data>
   </data>
   <data name="skinLabel2.Size" type="System.Drawing.Size, System.Drawing">
   <data name="skinLabel2.Size" type="System.Drawing.Size, System.Drawing">
     <value>67, 17</value>
     <value>67, 17</value>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov