|
@@ -5314,6 +5314,12 @@ namespace MOKA_Factory_Tools
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void OnBtnWBView(object sender, EventArgs e)
|
|
private void OnBtnWBView(object sender, EventArgs e)
|
|
{
|
|
{
|
|
|
|
+ if (IsThreadRunning)
|
|
|
|
+ {
|
|
|
|
+ Log.WriteInfoLog("Thread is running for key!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
SNText.Focus();
|
|
SNText.Focus();
|
|
if (FunctionSettingNow.WriteWB)
|
|
if (FunctionSettingNow.WriteWB)
|
|
{
|
|
{
|
|
@@ -5578,6 +5584,12 @@ namespace MOKA_Factory_Tools
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void OnBtnOtherView(object sender, EventArgs e)
|
|
private void OnBtnOtherView(object sender, EventArgs e)
|
|
{
|
|
{
|
|
|
|
+ if (IsThreadRunning)
|
|
|
|
+ {
|
|
|
|
+ Log.WriteInfoLog("Thread is running for key!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (midListNow.rokuCustomer != null)
|
|
if (midListNow.rokuCustomer != null)
|
|
MessageBox.Show("Roku TV\r\n" + "Brand:" +
|
|
MessageBox.Show("Roku TV\r\n" + "Brand:" +
|
|
midListNow.rokuCustomer.brand + "\r\nOEM Model:" +
|
|
midListNow.rokuCustomer.brand + "\r\nOEM Model:" +
|
|
@@ -5586,7 +5598,7 @@ namespace MOKA_Factory_Tools
|
|
JsonConvert.SerializeObject(midListNow.rokuCustomer.data).ToString() + "\r\nData:" +
|
|
JsonConvert.SerializeObject(midListNow.rokuCustomer.data).ToString() + "\r\nData:" +
|
|
midListNow.rokuCustomer.remotetype, LResource.ProductMsg);
|
|
midListNow.rokuCustomer.remotetype, LResource.ProductMsg);
|
|
else
|
|
else
|
|
- MessageBox.Show("null");
|
|
|
|
|
|
+ MessageBox.Show("ruku info is nothing!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -5727,6 +5739,11 @@ namespace MOKA_Factory_Tools
|
|
/// </summary>
|
|
/// </summary>
|
|
private void OnBtnRefresh(object sender, EventArgs e)
|
|
private void OnBtnRefresh(object sender, EventArgs e)
|
|
{
|
|
{
|
|
|
|
+ if (IsThreadRunning)
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
usingTime = 0;
|
|
usingTime = 0;
|
|
EnableText(SNText);
|
|
EnableText(SNText);
|
|
EnableButton(BtnClickstart);
|
|
EnableButton(BtnClickstart);
|
|
@@ -5736,7 +5753,7 @@ namespace MOKA_Factory_Tools
|
|
{
|
|
{
|
|
if (WritekeyThread.IsAlive)
|
|
if (WritekeyThread.IsAlive)
|
|
{
|
|
{
|
|
- WritekeyThread.Abort();
|
|
|
|
|
|
+ WritekeyThread.Abort(); // Abort出现无法中断线程的问题,会导致界面卡死, 所以如果IsThreadRunning=true,直接退出;
|
|
if (timer1.Enabled)
|
|
if (timer1.Enabled)
|
|
{
|
|
{
|
|
timer1.Stop();
|
|
timer1.Stop();
|
|
@@ -5748,6 +5765,7 @@ namespace MOKA_Factory_Tools
|
|
}
|
|
}
|
|
}
|
|
}
|
|
SN = ""; // 需要在线程结束后才能清空;
|
|
SN = ""; // 需要在线程结束后才能清空;
|
|
|
|
+ IsThreadRunning = false;
|
|
UsingTime_Text.Text = "0";
|
|
UsingTime_Text.Text = "0";
|
|
GC.Collect();
|
|
GC.Collect();
|
|
MessageBox.Show(LResource.RefreshPanel);
|
|
MessageBox.Show(LResource.RefreshPanel);
|