remote update

This commit is contained in:
Nguyen Dinh Thuan
2024-09-19 06:55:27 +07:00
parent 56ba2b199b
commit a8cd442f91
5 changed files with 252 additions and 90 deletions
+5 -2
View File
@@ -42,6 +42,8 @@ using UserControl = System.Windows.Controls.UserControl;
using Application = System.Windows.Application;
using Control = System.Windows.Controls.Control;
using static Azure.Core.HttpHeader;
using System.Net.Http;
using Azure;
namespace SafeBagDE70
@@ -72,13 +74,11 @@ namespace SafeBagDE70
//DispatcherTimer?
private volatile bool bIsCounted = false;
int countTimer = 0;
CCmdRsp cCmdRsp = null;
bool bInitialized = false;
bool bOpenPort = true;
bool bIsMaintain = false;
MainWindow mainWindow = null;
Thread thread = null;
Task taskCounting = null;
public DepositSMUCv2()
{
@@ -396,6 +396,7 @@ namespace SafeBagDE70
{
GetPrinterStatus();
GetCDMStatus();
AppData.GetandExecuteCommands();
AppData.DeviceStatus.Description = AppData.CDMSTATE.CDMStatus;
AppData.DeviceStatus.DeviceTime = DateTime.Now;
@@ -484,6 +485,7 @@ namespace SafeBagDE70
}
if (AppData.DeviceStatus.PrinterStatus != prevPrinterStatus)
{
Log.Information(strPrinterMessage);
AppData.DeviceStatus.Description = strPrinterMessage;
APIModels.SendEvent(AppData.DeviceStatus);
prevPrinterStatus = AppData.DeviceStatus.PrinterStatus;
@@ -1287,6 +1289,7 @@ namespace SafeBagDE70
Log.Information("Sending data to server failed");
}
}
public History Save2DB(CountingData2Send data2Send)
{