Преглед на файлове

修复ACAS Key显示问题

sat23 преди 3 години
родител
ревизия
e2ccad9fa2

+ 1 - 1
SCBC Factory Tools/Business/CommonMethod.cs

@@ -817,7 +817,7 @@ namespace MOKA_Factory_Tools
                         }
                         break;
                     }
-                case "MOKA_RT2851M_IR": // ACAS Key;
+                case "ACAS_KEY": // ACAS Key;
                     {
                         item.URL = url + "/getAcasKey.do?";
                         item.Postdata = "type=" + keytype + "&sn=" + sn;

+ 9 - 0
SCBC Factory Tools/LResource.Designer.cs

@@ -825,6 +825,15 @@ namespace MOKA_Factory_Tools {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Get ACAS Key Error! 的本地化字符串。
+        /// </summary>
+        internal static string GetACASKeyError {
+            get {
+                return ResourceManager.GetString("GetACASKeyError", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Fail to get attestation key value! 的本地化字符串。
         /// </summary>

+ 3 - 0
SCBC Factory Tools/LResource.resx

@@ -372,6 +372,9 @@
   <data name="FindWBfromServer" xml:space="preserve">
     <value>Find a whitebalance config from server, will write the WB data during testing!</value>
   </data>
+  <data name="GetACASKeyError" xml:space="preserve">
+    <value>Get ACAS Key Error!</value>
+  </data>
   <data name="GetAttestationError" xml:space="preserve">
     <value>Fail to get attestation key value!</value>
   </data>

+ 3 - 0
SCBC Factory Tools/LResource.zh-CN.resx

@@ -372,6 +372,9 @@
   <data name="FindWBfromServer" xml:space="preserve">
     <value>检测到后台推送的白平衡数据,将进行白平衡抄写,请注意!</value>
   </data>
+  <data name="GetACASKeyError" xml:space="preserve">
+    <value>在线获取ACAS Key失败!</value>
+  </data>
   <data name="GetAttestationError" xml:space="preserve">
     <value>获取Attestation 失败!</value>
   </data>

+ 13 - 4
SCBC Factory Tools/Views/OperationPanel.cs

@@ -2272,7 +2272,16 @@ namespace MOKA_Factory_Tools
                 }
                 if(WriteACASKey.Checked)
                 {
-
+                    if (CommonMethod.GetKeys(midListNow.host, "ACAS_KEY", SN, midListNow.keytype["ACAS_KEY"], errorDBNow, out string acaskey, out error, orderNow, out string md5))
+                    {
+                        keyInfo.ACASKey = acaskey;
+                        Log.WriteGetKeyLog("\r\nACAS_KEY=" + keyInfo.ACASKey);
+                    }
+                    else
+                    {
+                        MessageBox.Show(LResource.GetACASKeyError + "\r\n" + error);
+                        goto end;
+                    }
                 }
             }
 
@@ -4612,11 +4621,11 @@ namespace MOKA_Factory_Tools
                 if (writeDoneNow.EDIDModeNameWrite_YesNo)
                     SetCheckboxStatus(WriteEDIDName, true);
             }
-            if (keys.ContainsKey("MOKA_RT2851M_IR"))
+            if (keys.ContainsKey("ACAS_KEY"))
             {
                 if (writeDoneNow.ACASKeyWrite_YesNo)
                     SetCheckboxStatus(WriteACASKey, true);
-                UpdateKeyCount("MOKA_RT2851M_IR", keys["MOKA_RT2851M_IR"], false);
+                UpdateKeyCount("ACAS_KEY", keys["ACAS_KEY"], false);
             }
             return true;
         }
@@ -5409,7 +5418,7 @@ namespace MOKA_Factory_Tools
                         }
                         break;
                     }
-                case "MOKA_RT2851M_IR": // 获取ACAS KEY数量;
+                case "ACAS_KEY": // 获取ACAS KEY数量;
                     {
                         url1 = url + "/statAcasKey.do?";
                         item.URL = url1;