소스 검색

删除无用的测试代码;模拟工程修改;

JeffWang 2 년 전
부모
커밋
7b4e73f0dc
2개의 변경된 파일9개의 추가작업 그리고 44개의 파일을 삭제
  1. 0 38
      FactoryTool_CShare/Business/V2Method.cs
  2. 9 6
      FactoryTool_CShare/Views/OperationPanel.cs

+ 0 - 38
FactoryTool_CShare/Business/V2Method.cs

@@ -17,44 +17,6 @@ namespace MOKA_Factory_Tools
 {
     internal class V2Method
     {
-#if DEBUG
-        public static void Test()
-        {
-            MidList mid;
-            bool bRet = GetMidInfo("TEST_WJF", "04-D4-C4-EE-6B-CD", null, out mid);
-            if (bRet)
-            {
-                List<KeyType> key2Write;
-                string msg;
-                KeyInfo keys = new KeyInfo();
-                bRet = GetMidKey(mid.host, "SN0321-test9999", "TEST_WJF", "20220321APSN9999", "BBB", null, null, ref keys, out msg);
-
-                List<MidAddress> midlist; 
-                GetOfflineData(mid.host, "TEST_WJF", null, out midlist);
-
-                if (bRet)
-                {
-                    Action<KeyData> SetEnable = (keydata) =>
-                    {
-                        if (keydata != null && keydata.data.Length > 0)
-                            keydata.enable = true;
-                    };
-
-                    SetEnable(keys.Mac);
-                    SetEnable(keys.HDCP);
-                    SetEnable(keys.DID);
-                    SetEnable(keys.HDCP22);
-                    SetEnable(keys.CI_plus);
-                    SetEnable(keys.Playready);
-
-                    ReportOnlineData(mid.host, "TEST_WJF", GetReportJson("TEST_WJF", "SN0321-test9999", false, "", "", "", ref keys), null, false, "", 1000);
-
-                    ReportOfflineData(mid.host, "2022-07-18 14:40:42", "SN0321-test9999", null, null, false, "");
-                }
-            }
-        }
-#endif
-
         private static string url_getMessage = "https://cn.uc.qhmoka.com/scbc-server/clientType/getMessage.do";
 
         public static void SetMexicanConfig(bool bMexican = false)

+ 9 - 6
FactoryTool_CShare/Views/OperationPanel.cs

@@ -693,7 +693,8 @@ namespace MOKA_Factory_Tools
             }
             SNText.Text = "";
 #if SIMULATION
-            SNText.Text = "test0205002yi";
+            SN = "40243/C06100001003";
+            SNText.Text = "40243/C06100001003";
 #endif
             SNTextFocus = new Thread(TextBoxFocus);
             SNTextFocus.Start();
@@ -2199,15 +2200,14 @@ namespace MOKA_Factory_Tools
                         goto end;
                     }
 #else
-                    devicecode = "G9V2GV0123260000";
-                    psn = keyInfo._PSN.data = "B22013921-0B00018";
+                    devicecode = "277";
+                    psn = keyInfo._PSN.data = "FZ1BBCP2706XXNXB00037";
 #endif
                 }
 
                 // 部分订单无key,只有Roku信息;
                 if (midListNow.keytype.Count() != 0)
                 {
-                    //if (!CommonMethod.GetIDMKeys(midListNow.host, SN, orderNow, psn, devicecode, key2Write, errorDBNow, ref keyInfo, out error))
                     if (!V2Method.GetMidKey(midListNow.host, SN, orderNow, psn, devicecode, key2Write, errorDBNow, ref keyInfo, out error))
                     {
                         ErrMsg = string.Format("{0} GetIDMKeys Failed!\r\n{1}", SN, error);
@@ -4954,9 +4954,12 @@ namespace MOKA_Factory_Tools
         stop:
             timer1.Stop();
             usingTime = 0;
-            EnableText(SNText);
-            EnableButton(BtnClickstart);
+
+#if !SIMULATION
             SN = "";
+            EnableText(SNText);            
+#endif
+            EnableButton(BtnClickstart);
         }
 
         /// <summary>