|
@@ -49,6 +49,9 @@ namespace MOKA_Factory_Tools
|
|
|
Thread SNTextFocus;
|
|
|
bool FocusMark = false;
|
|
|
Thread WritekeyThread;
|
|
|
+
|
|
|
+ //整机抄写的
|
|
|
+ public static string smtPsn { get; set; } = "";
|
|
|
// 当前窗口抄写线程只能开一个;
|
|
|
private readonly object MyLock;
|
|
|
private bool IsThreadRunning { get; set; } = false;
|
|
@@ -90,12 +93,10 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
private void SetCheckboxStatusByConfig()
|
|
|
{
|
|
|
-
|
|
|
// 非小米的抄写,不处理.需要保证其他工厂的配置不受影响;
|
|
|
if (!FunctionSettingNow.MITVEnable && !FunctionSettingNow.IndiaMITVEnable)
|
|
|
return;
|
|
|
-
|
|
|
- #region 默认根据config启用是否抄写;
|
|
|
+#region 默认根据config启用是否抄写;
|
|
|
SetCheckboxStatus(WriteDID, cfg_writedone.DIDWrite_YesNo);
|
|
|
SetCheckboxStatus(WriteMac, cfg_writedone.MacWrite_YesNo);
|
|
|
SetCheckboxStatus(WriteHDCP, cfg_writedone.HDCPWrite_YesNo);
|
|
@@ -135,7 +136,7 @@ namespace MOKA_Factory_Tools
|
|
|
localDBNow = localDB;
|
|
|
errorDBNow = errorDB;
|
|
|
preloadNow = preload;
|
|
|
- midListNow = midList1;
|
|
|
+ midListNow = midList1;
|
|
|
orderNow = order;
|
|
|
if (reportDBNow == null)
|
|
|
{
|
|
@@ -150,6 +151,14 @@ namespace MOKA_Factory_Tools
|
|
|
ProductMsg_Text.Text = "Roku:";
|
|
|
if (functionSetting.NTF)
|
|
|
ntfBLL = new NTFBLL(functionSetting.Mexican_NTF);
|
|
|
+
|
|
|
+ //修改界面颜色
|
|
|
+ if (functionSetting.IsSmt == "1")
|
|
|
+ {
|
|
|
+ this.CaptionBackColorTop = Color.Red;
|
|
|
+ this.CaptionBackColorBottom = Color.Gold;
|
|
|
+ }
|
|
|
+
|
|
|
MyLock = new object();
|
|
|
}
|
|
|
|
|
@@ -240,7 +249,7 @@ namespace MOKA_Factory_Tools
|
|
|
SerialCMD.EnableRetry = FunctionSettingNow.EnableRetry;
|
|
|
SerialCMD.RetryCount = FunctionSettingNow.RetryCount;
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region 设置WriteCheck复选框默认状态;
|
|
|
if (!cfg_writecheck.DIDCheckcheck)
|
|
|
SetspecificText(m_checkdid, LResource.Skip, Color.Yellow);
|
|
@@ -429,6 +438,8 @@ namespace MOKA_Factory_Tools
|
|
|
SHOPText.Text = LResource.Default;
|
|
|
SHOPText.BackColor = Color.Yellow;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
#endregion
|
|
|
SetCheckboxStatusByConfig();
|
|
|
|
|
@@ -771,7 +782,7 @@ namespace MOKA_Factory_Tools
|
|
|
SNTextFocus.Start();
|
|
|
SNText.Focus();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 强制聚焦扫描框
|
|
|
/// </summary>
|
|
@@ -1278,8 +1289,17 @@ namespace MOKA_Factory_Tools
|
|
|
/// </summary>
|
|
|
public void SetInitialStatus()
|
|
|
{
|
|
|
- this.CaptionBackColorTop = Color.RoyalBlue;
|
|
|
- this.CaptionBackColorBottom = Color.Cyan;
|
|
|
+ if(FunctionSettingNow.IsSmt == "1")
|
|
|
+ {
|
|
|
+ this.CaptionBackColorTop = Color.Red;
|
|
|
+ this.CaptionBackColorBottom = Color.Red;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.CaptionBackColorTop = Color.RoyalBlue;
|
|
|
+ this.CaptionBackColorBottom = Color.Cyan;
|
|
|
+ }
|
|
|
+
|
|
|
this.Refresh();
|
|
|
SetCheckboxStatusByConfig();
|
|
|
/////////////////////////////////////////////////////////////
|
|
@@ -5071,6 +5091,21 @@ namespace MOKA_Factory_Tools
|
|
|
}
|
|
|
else
|
|
|
{// 在线抄写;
|
|
|
+ if(FunctionSettingNow.IsSmt == "0")
|
|
|
+ {
|
|
|
+ //读取PSN 并且上报
|
|
|
+ if (SerialCMD.ReadFireTVPSN(TVPort, out result, out data, out error, SerailDelay))
|
|
|
+ {
|
|
|
+ smtPsn = Encoding.ASCII.GetString(data);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ErrMsg = string.Format("读取PSN失败 {0}", error);
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
if (WriteDID.Checked)
|
|
|
{
|
|
|
string postjson = V2Method.GetReportJson(orderNow, SN, isNodid: false, midListNow.clienttype, midListNow.version, ProjectIDText.Text, ref keyInfo, FunctionSettingNow.MITVEnable || FunctionSettingNow.IndiaMITVEnable, ref _MiKey);
|