Sfoglia il codice sorgente

【软件版本】
V 3.0.6.5 未正式发布,先给厂线测试。
【模块名称】

【问题原因】
10月31号工厂抄写时出现了问题,导致HDCP无效
【修改描述】
将DSN抄写放到最后面(原本在最前面)
【测试结果】

sat23 3 anni fa
parent
commit
9e832e38fa

+ 1 - 1
SCBC Factory Tools/Packagescript/setup without net40.nsi

@@ -4,7 +4,7 @@ ${StrRep}
 
 ; °²×°³ÌÐò³õʼ¶¨Òå³£Á¿
 !define PRODUCT_NAME "MOKA Factory Tools"
-!define PRODUCT_VERSION "3.0.6.4"
+!define PRODUCT_VERSION "3.0.6.5"
 !define PRODUCT_PUBLISHER "MOKA"
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MOKA Factory Tools.exe"
 !define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"

+ 1 - 1
SCBC Factory Tools/Packagescript/setup.nsi

@@ -4,7 +4,7 @@ ${StrRep}
 
 ; °²×°³ÌÐò³õʼ¶¨Òå³£Á¿
 !define PRODUCT_NAME "MOKA Factory Tools"
-!define PRODUCT_VERSION "3.0.6.4"
+!define PRODUCT_VERSION "3.0.6.5"
 !define PRODUCT_PUBLISHER "MOKA"
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MOKA Factory Tools.exe"
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

+ 1 - 1
SCBC Factory Tools/Properties/AssemblyInfo.cs

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.6.4")]
+[assembly: AssemblyVersion("3.0.6.5")]
 [assembly: AssemblyFileVersion("1.0.0.1")]

+ 126 - 126
SCBC Factory Tools/Views/OperationPanel.cs

@@ -1549,132 +1549,6 @@ namespace MOKA_Factory_Tools
                 }
             }
 
-            // 如果是G客户,要在抄写其他key前时行fsn+psn查重处理;
-            if (WriteDSN.Checked)
-            {
-                // 计算函数耗时;
-                Stopwatch watch = new Stopwatch();
-                watch.Start();
-                if (SN == null)
-                {
-                    MessageBox.Show("Please scan to trigger testing");
-                    goto end;
-                }
-                if (SN.Trim().Length == 0)
-                {
-                    MessageBox.Show("Please scan to trigger testing");
-                    goto end;
-                }
-                Log.WriteInfoLog("Read FireTV Device Code...\r\n");
-                if (SerialCMD.GetFireTVDevcieCode(TVPort, out result, out data, out error, SerailDelay))
-                {
-                    string devicecode = Encoding.ASCII.GetString(data);
-                    if (devicecode == "N/A")
-                    {
-                        Log.WriteErrorLog("Device code format error!\r\n" + devicecode);
-                        MessageBox.Show(LResource.DeviceCodeFormatError + "\r\n" + devicecode);
-                        if (FunctionSettingNow.NTF)
-                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "Device code format error");
-                        goto end;
-                    }
-
-                    // 先读取psn的值;
-                    byte[] result_psn;
-                    byte[] data_psn;
-                    string error_psn;
-                    if (SerialCMD.ReadFireTVPSN(TVPort, out result_psn, out data_psn, out error_psn, SerailDelay))
-                    {
-                        string psn = Encoding.ASCII.GetString(data_psn);
-                        if (CommonMethod.GetFireTVDsn(midListNow.host, orderNow, Encoding.ASCII.GetString(data), SN, psn, out string dsn, out error_psn, errorDBNow))
-                        {
-                            keyInfo.DSN = dsn;
-                            if (!CommonMethod.IsNumberAndWord(keyInfo.DSN))
-                            {
-                                Log.WriteErrorLog("DSN format error!\r\n" + keyInfo.DSN);
-                                MessageBox.Show(LResource.DSNFormatError + "\r\n" + keyInfo.DSN);
-                                goto end;
-                            }
-                            byte[] DSNData = System.Text.Encoding.ASCII.GetBytes(keyInfo.DSN);
-                            Log.WriteInfoLog("Write DSN...");
-                            if (SerialCMD.SetFireTVDSN(TVPort, DSNData, out result, out data, out error, SerailDelay))
-                            {
-                                SetsuccessStatus(m_writeDSN);
-                                Log.WriteInfoLog("Check DSN...");
-                                if (writeCheckNow.DSNCheckcheck ? SerialCMD.CheckFireTVDSN(TVPort, out result, out data, out error, SerailDelay) : true)
-                                {
-                                    SetsuccessStatus(m_checkDSN);
-                                    Log.WriteInfoLog("Read DSN...");
-                                    if (readCheckNow.DSNReadcheck ? SerialCMD.GetFireTVDSN(TVPort, out result, out data, out error, SerailDelay) : true)
-                                    {
-                                        if (SerialInit.BytesCompare_Base64(data, DSNData))
-                                        {
-                                            SetsuccessStatus(m_readDSN);
-                                            //DSN读取别对成功
-                                        }
-                                        else
-                                        {
-                                            Log.WriteErrorLog(SN + "   contrast DSN fail");
-                                            MessageBox.Show(LResource.ContrastDSNError);
-                                            if (FunctionSettingNow.NTF)
-                                                ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Contrast DSN fail");
-                                            goto end;
-                                        }
-                                    }
-                                    else
-                                    {
-                                        SetfailStatus(m_readDSN);
-                                        Log.WriteErrorLog(SN + "   read DSN fail");
-                                        MessageBox.Show(LResource.ReadDSNError);
-                                        if (FunctionSettingNow.NTF)
-                                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Read DSN fail");
-                                        goto end;
-                                    }
-                                }
-                                else
-                                {
-                                    SetfailStatus(m_checkDSN);
-                                    Log.WriteErrorLog(SN + "   check DSN fail");
-                                    MessageBox.Show(LResource.CheckDSNError);
-                                    goto end;
-                                }
-                            }
-                            else
-                            {
-                                SetfailStatus(m_writeDSN);
-                                Log.WriteErrorLog(SN + "   Write DSN fail");
-                                MessageBox.Show(LResource.SetDSNError);
-                                if (FunctionSettingNow.NTF)
-                                    ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Write DSN fail");
-                                goto end;
-                            }
-                        }
-                        else
-                        {
-                            MessageBox.Show(error_psn);
-                            goto end;
-                        }
-                    }
-                    else
-                    {
-                        Log.WriteErrorLog("Failed to read PSN when requesting DSN !\r\n" + devicecode);
-                        MessageBox.Show(LResource.ReadPSNError);
-                        if (FunctionSettingNow.NTF)
-                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "read DSN error");
-                        goto end;
-                    }
-                }
-                else
-                {
-                    MessageBox.Show(LResource.GetDeviceCodeError);
-                    if (FunctionSettingNow.NTF)
-                        ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "GetDeviceCodeError");
-                    goto end;
-                }
-
-                watch.Stop();
-                Log.WriteInfoLog(string.Format("Write DSN Elapsed={0}", watch.Elapsed.TotalMilliseconds));
-            }
-
             // 如果是要导出ACASID+SN,先判断ACASID是否等于20位长度;
             if (FunctionSettingNow.ExportSNACASID)
             {
@@ -4711,6 +4585,132 @@ namespace MOKA_Factory_Tools
                 SetcolorStatus(ProductMsg_Text, Color.FromArgb(128, 255, 128));
             }
 
+            // DSN抄写:如果是G客户,要在抄写其他key前时行fsn+psn查重处理;
+            if (WriteDSN.Checked)
+            {
+                // 计算函数耗时;
+                Stopwatch watch = new Stopwatch();
+                watch.Start();
+                if (SN == null)
+                {
+                    MessageBox.Show("Please scan to trigger testing");
+                    goto end;
+                }
+                if (SN.Trim().Length == 0)
+                {
+                    MessageBox.Show("Please scan to trigger testing");
+                    goto end;
+                }
+                Log.WriteInfoLog("Read FireTV Device Code...\r\n");
+                if (SerialCMD.GetFireTVDevcieCode(TVPort, out result, out data, out error, SerailDelay))
+                {
+                    string devicecode = Encoding.ASCII.GetString(data);
+                    if (devicecode == "N/A")
+                    {
+                        Log.WriteErrorLog("Device code format error!\r\n" + devicecode);
+                        MessageBox.Show(LResource.DeviceCodeFormatError + "\r\n" + devicecode);
+                        if (FunctionSettingNow.NTF)
+                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "Device code format error");
+                        goto end;
+                    }
+
+                    // 先读取psn的值;
+                    byte[] result_psn;
+                    byte[] data_psn;
+                    string error_psn;
+                    if (SerialCMD.ReadFireTVPSN(TVPort, out result_psn, out data_psn, out error_psn, SerailDelay))
+                    {
+                        string psn = Encoding.ASCII.GetString(data_psn);
+                        if (CommonMethod.GetFireTVDsn(midListNow.host, orderNow, Encoding.ASCII.GetString(data), SN, psn, out string dsn, out error_psn, errorDBNow))
+                        {
+                            keyInfo.DSN = dsn;
+                            if (!CommonMethod.IsNumberAndWord(keyInfo.DSN))
+                            {
+                                Log.WriteErrorLog("DSN format error!\r\n" + keyInfo.DSN);
+                                MessageBox.Show(LResource.DSNFormatError + "\r\n" + keyInfo.DSN);
+                                goto end;
+                            }
+                            byte[] DSNData = System.Text.Encoding.ASCII.GetBytes(keyInfo.DSN);
+                            Log.WriteInfoLog("Write DSN...");
+                            if (SerialCMD.SetFireTVDSN(TVPort, DSNData, out result, out data, out error, SerailDelay))
+                            {
+                                SetsuccessStatus(m_writeDSN);
+                                Log.WriteInfoLog("Check DSN...");
+                                if (writeCheckNow.DSNCheckcheck ? SerialCMD.CheckFireTVDSN(TVPort, out result, out data, out error, SerailDelay) : true)
+                                {
+                                    SetsuccessStatus(m_checkDSN);
+                                    Log.WriteInfoLog("Read DSN...");
+                                    if (readCheckNow.DSNReadcheck ? SerialCMD.GetFireTVDSN(TVPort, out result, out data, out error, SerailDelay) : true)
+                                    {
+                                        if (SerialInit.BytesCompare_Base64(data, DSNData))
+                                        {
+                                            SetsuccessStatus(m_readDSN);
+                                            //DSN读取别对成功
+                                        }
+                                        else
+                                        {
+                                            Log.WriteErrorLog(SN + "   contrast DSN fail");
+                                            MessageBox.Show(LResource.ContrastDSNError);
+                                            if (FunctionSettingNow.NTF)
+                                                ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Contrast DSN fail");
+                                            goto end;
+                                        }
+                                    }
+                                    else
+                                    {
+                                        SetfailStatus(m_readDSN);
+                                        Log.WriteErrorLog(SN + "   read DSN fail");
+                                        MessageBox.Show(LResource.ReadDSNError);
+                                        if (FunctionSettingNow.NTF)
+                                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Read DSN fail");
+                                        goto end;
+                                    }
+                                }
+                                else
+                                {
+                                    SetfailStatus(m_checkDSN);
+                                    Log.WriteErrorLog(SN + "   check DSN fail");
+                                    MessageBox.Show(LResource.CheckDSNError);
+                                    goto end;
+                                }
+                            }
+                            else
+                            {
+                                SetfailStatus(m_writeDSN);
+                                Log.WriteErrorLog(SN + "   Write DSN fail");
+                                MessageBox.Show(LResource.SetDSNError);
+                                if (FunctionSettingNow.NTF)
+                                    ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, keyInfo.DSN, false, "Write DSN fail");
+                                goto end;
+                            }
+                        }
+                        else
+                        {
+                            MessageBox.Show(error_psn);
+                            goto end;
+                        }
+                    }
+                    else
+                    {
+                        Log.WriteErrorLog("Failed to read PSN when requesting DSN !\r\n" + devicecode);
+                        MessageBox.Show(LResource.ReadPSNError);
+                        if (FunctionSettingNow.NTF)
+                            ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "read DSN error");
+                        goto end;
+                    }
+                }
+                else
+                {
+                    MessageBox.Show(LResource.GetDeviceCodeError);
+                    if (FunctionSettingNow.NTF)
+                        ntfBLL.SetDataBuringResult(FunctionSettingNow.Line, FunctionSettingNow.Station, SN, "", false, "GetDeviceCodeError");
+                    goto end;
+                }
+
+                watch.Stop();
+                Log.WriteInfoLog(string.Format("Write DSN Elapsed={0}", watch.Elapsed.TotalMilliseconds));
+            }
+
             keycontent += "toolVersion=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "&";
 
             //自定义指令发送