fix lỗi báo máy in gần hết giấy còn 20 lần in

This commit is contained in:
thuannd88
2024-09-26 13:50:21 +07:00
parent f9f9ba3d49
commit d648718824
3 changed files with 9 additions and 7 deletions
+6 -2
View File
@@ -448,10 +448,14 @@ namespace SafeBagDE70
private void GetPrinterStatus()
{
var status = printerManager.GetStatus();
var strPrinterMessage = "";
if (status != null)
{
if (status.StsNOPAPER|| AppData.IsStopPrinting())
bool StsNOPAPER = status.StsNOPAPER;
bool StsNEARENDPAP = status.StsNEARENDPAP;
if (StsNOPAPER || (StsNEARENDPAP && AppData.IsStopPrinting()))
{
AppData.DeviceStatus.PrinterStatus = (int)PrinterStatusCode.PAPEROUT;
StopTimers();
@@ -459,7 +463,7 @@ namespace SafeBagDE70
ShowError(strPrinterMessage);
AppData.ADMINDEVICESTATUS.PrinterStatus = strPrinterMessage;
}
else if (status.StsNEARENDPAP)
else if (StsNEARENDPAP)
{
AppData.UpdatePrinterStatus(true);
strPrinterMessage = "MÁY IN: GẦN HẾT GIẤY";