Browse Source

修改了中英文提示

chenjiangqun 2 năm trước cách đây
mục cha
commit
28b4b2e47e

+ 1 - 1
FactoryTool_CShare/Business/GMethod.cs

@@ -638,7 +638,7 @@ namespace MOKA_Factory_Tools
                         }
                         if (PSN == "" || PSN == null)
                         {
-                            MessageBox.Show("查不到该FSN对应的主板PSN号");
+                            MessageBox.Show(LResource.FindPSNError);
                             return false;
                         }
                         Log.WriteInfoLog("PartSN" + PSN);

+ 54 - 0
FactoryTool_CShare/LResource.Designer.cs

@@ -852,6 +852,15 @@ namespace MOKA_Factory_Tools {
             }
         }
         
+        /// <summary>
+        ///   查找类似 The mainboard PSN number corresponding to the FSN cannot be found 的本地化字符串。
+        /// </summary>
+        internal static string FindPSNError {
+            get {
+                return ResourceManager.GetString("FindPSNError", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Find a whitebalance config from server, will write the WB data during testing! 的本地化字符串。
         /// </summary>
@@ -1293,6 +1302,24 @@ namespace MOKA_Factory_Tools {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Abnormal order type obtained according to SN, stop testing! 的本地化字符串。
+        /// </summary>
+        internal static string ObtainSNAbnormal {
+            get {
+                return ResourceManager.GetString("ObtainSNAbnormal", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Failed to obtain order type according to SN, Stop testing! 的本地化字符串。
+        /// </summary>
+        internal static string ObtainSNFail {
+            get {
+                return ResourceManager.GetString("ObtainSNFail", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Please input a order first! 的本地化字符串。
         /// </summary>
@@ -1887,6 +1914,24 @@ namespace MOKA_Factory_Tools {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Tip 的本地化字符串。
+        /// </summary>
+        internal static string Tip {
+            get {
+                return ResourceManager.GetString("Tip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 This SN has been used twice in succession, which may be misused to other machines. Please confirm whether to continue 的本地化字符串。
+        /// </summary>
+        internal static string TipMessage {
+            get {
+                return ResourceManager.GetString("TipMessage", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Fail to transfer key to DB! 的本地化字符串。
         /// </summary>
@@ -2265,6 +2310,15 @@ namespace MOKA_Factory_Tools {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Fail occurs for 2 times in total, and the test is prohibited! 的本地化字符串。
+        /// </summary>
+        internal static string WrongTestTwoFail {
+            get {
+                return ResourceManager.GetString("WrongTestTwoFail", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 YouTube key format error! 的本地化字符串。
         /// </summary>

+ 18 - 0
FactoryTool_CShare/LResource.resx

@@ -381,6 +381,9 @@
   <data name="FindNullSnInDB" xml:space="preserve">
     <value>Can not get the mid info from db where SN is  </value>
   </data>
+  <data name="FindPSNError" xml:space="preserve">
+    <value>The mainboard PSN number corresponding to the FSN cannot be found</value>
+  </data>
   <data name="FindWBfromServer" xml:space="preserve">
     <value>Find a whitebalance config from server, will write the WB data during testing!</value>
   </data>
@@ -528,6 +531,12 @@
   <data name="NofoundLocalDB" xml:space="preserve">
     <value>Can not find the local DB of the order!</value>
   </data>
+  <data name="ObtainSNAbnormal" xml:space="preserve">
+    <value>Abnormal order type obtained according to SN, stop testing!</value>
+  </data>
+  <data name="ObtainSNFail" xml:space="preserve">
+    <value>Failed to obtain order type according to SN, Stop testing!</value>
+  </data>
   <data name="OrderNullError" xml:space="preserve">
     <value>Please input a order first!</value>
   </data>
@@ -726,6 +735,12 @@
   <data name="TestServerUsingError" xml:space="preserve">
     <value>Software is connctiong a testing server, please do not use it on production!!!</value>
   </data>
+  <data name="Tip" xml:space="preserve">
+    <value>Tip</value>
+  </data>
+  <data name="TipMessage" xml:space="preserve">
+    <value>This SN has been used twice in succession, which may be misused to other machines. Please confirm whether to continue</value>
+  </data>
   <data name="TransferDBFail" xml:space="preserve">
     <value>Fail to transfer key to DB!</value>
   </data>
@@ -852,6 +867,9 @@
   <data name="WrongBarcode" xml:space="preserve">
     <value>The scanning barcode is wrong,please check!</value>
   </data>
+  <data name="WrongTestTwoFail" xml:space="preserve">
+    <value>Fail occurs for 2 times in total, and the test is prohibited!</value>
+  </data>
   <data name="YouTubeFormatError" xml:space="preserve">
     <value>YouTube key format error!</value>
   </data>

+ 18 - 0
FactoryTool_CShare/LResource.zh-CN.resx

@@ -381,6 +381,9 @@
   <data name="FindNullSnInDB" xml:space="preserve">
     <value>无法在本地Key包内查询到指定SN对应的key文件信息:</value>
   </data>
+  <data name="FindPSNError" xml:space="preserve">
+    <value>查不到该FSN对应的主板PSN号</value>
+  </data>
   <data name="FindWBfromServer" xml:space="preserve">
     <value>检测到后台推送的白平衡数据,将进行白平衡抄写,请注意!</value>
   </data>
@@ -528,6 +531,12 @@
   <data name="NofoundLocalDB" xml:space="preserve">
     <value>获取订单DB文件失败!</value>
   </data>
+  <data name="ObtainSNAbnormal" xml:space="preserve">
+    <value>根据SN获取订单类型异常,停止测试!</value>
+  </data>
+  <data name="ObtainSNFail" xml:space="preserve">
+    <value>根据SN获取订单类型失败,停止测试!</value>
+  </data>
   <data name="OrderNullError" xml:space="preserve">
     <value>请先输入订单号!</value>
   </data>
@@ -726,6 +735,12 @@
   <data name="TestServerUsingError" xml:space="preserve">
     <value>此软件连接测试服务器,请勿用于生产!!!</value>
   </data>
+  <data name="Tip" xml:space="preserve">
+    <value>提示</value>
+  </data>
+  <data name="TipMessage" xml:space="preserve">
+    <value>该SN已连续使用两次,可能误用到其他机器,请确认是否继续</value>
+  </data>
   <data name="TransferDBFail" xml:space="preserve">
     <value>Key包存储到本地数据库失败!</value>
   </data>
@@ -852,6 +867,9 @@
   <data name="WrongBarcode" xml:space="preserve">
     <value>扫码的条码不符合规则,请检查!</value>
   </data>
+  <data name="WrongTestTwoFail" xml:space="preserve">
+    <value>累计出现2次Fail,禁止测试!</value>
+  </data>
   <data name="YouTubeFormatError" xml:space="preserve">
     <value>YouTube key格式异常!</value>
   </data>

+ 4 - 4
FactoryTool_CShare/Views/OperationPanel.cs

@@ -930,7 +930,7 @@ namespace MOKA_Factory_Tools
                         // NTF规则:连续测试中累计出现2次Fail,禁止测试.
                         if (lastCount >= FunctionSettingNow.GFoolProofingCount)
                         {
-                            Verify dlg = new Verify("累计出现2次Fail,禁止测试!" + "\r\n" + SN);
+                            Verify dlg = new Verify(string.Format("{0}\r\n SN=<{1}>", LResource.WrongTestTwoFail,SN));
                             dlg.ShowDialog();
                             SNText.Enabled = true;
                             SNText.Text = "";
@@ -943,7 +943,7 @@ namespace MOKA_Factory_Tools
                     string strErrorMsg;
                     if (!GMethod.GetOrderTypeFromSN(SN, orderNow, out strOrderType, out strErrorMsg))
                     {
-                        Verify dlg = new Verify("根据SN获取订单类型失败,停止测试!" + "\r\nSN:" + SN);
+                        Verify dlg = new Verify(string.Format("{0} \r\n SN:<{1}>",LResource.ObtainSNFail,SN));
                         dlg.ShowDialog();
                         Log.WriteErrorLog(string.Format("SN={0},错误={1}", SN, strErrorMsg));
                         SNText.Enabled = true;
@@ -957,7 +957,7 @@ namespace MOKA_Factory_Tools
                         nOrderType = 0;
                     else
                     {
-                        Verify dlg = new Verify("根据SN获取订单类型异常,停止测试!" + "\r\n" + SN);
+                        Verify dlg = new Verify(string.Format("{0} \r\n SN:<{1}>",LResource.ObtainSNAbnormal,SN));
                         dlg.ShowDialog();
                         Log.WriteErrorLog(String.Format("{0}获取订单类型异常={1}", SN, strOrderType));
                         SNText.Enabled = true;
@@ -972,7 +972,7 @@ namespace MOKA_Factory_Tools
                     CommonMethod.GetProfileString("MOKAFactoryTools", "LastSN", "", strValue, 256);
                     if (strValue.ToString().Equals(SN, StringComparison.OrdinalIgnoreCase))
                     {
-                        if ( MessageBox.Show("该SN已连续使用两次,可能误用到其他机器,请确认是否继续", "提示", MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.Yes)
+                        if ( MessageBox.Show(LResource.TipMessage, LResource.Tip, MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.Yes)
                         {
                             SNText.Enabled = true;
                             SNText.Text = "";