This commit is contained in:
thuannd88
2024-09-05 13:54:06 +07:00
parent f4f433b838
commit acfa22a83a
3 changed files with 167 additions and 97 deletions
+22 -20
View File
@@ -68,12 +68,13 @@ namespace SafeBagDE70.Admin
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
Task.Run(() =>
{
Thread.Sleep(2000);
Thread.Sleep(5000);
Dispatcher.Invoke(() =>
{
lblCounterStatus.Text = "";
});
});
AppData.GetCassetteData();
}
else
{
@@ -116,29 +117,30 @@ namespace SafeBagDE70.Admin
{
cCmdRsp.SendEventFix(recvData.dat[16]);
}
if (cCmdRsp.recv_dat.dat[0] != 0x40)
//if (cCmdRsp.recv_dat.dat[0] != 0x40)
//{
// bSuccess = false;
//}
//if (bSuccess)
//{
//}
Thread.Sleep(1000);
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_RESET);
Thread.Sleep(2000);
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
if (cCmdRsp.recv_dat.dat[1] == 0x04 && cCmdRsp.recv_dat.dat[2] == 0x41)
{
bSuccess = false;
}
if (bSuccess)
{
Thread.Sleep(1000);
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_RESET);
Thread.Sleep(2000);
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
if (cCmdRsp.recv_dat.dat[1] == 0x04 && cCmdRsp.recv_dat.dat[2] == 0x41)
lblCounterStatus.Text = "Reset lỗi thành công";
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
Task.Run(() =>
{
lblCounterStatus.Text = "Reset lỗi thành công";
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
Task.Run(() =>
Thread.Sleep(2000);
Dispatcher.Invoke(() =>
{
Thread.Sleep(2000);
Dispatcher.Invoke(() =>
{
lblCounterStatus.Text = "";
});
lblCounterStatus.Text = "";
});
}
});
}
}
}