From c2ea7788636697760405d6f3bd0a61e2c9e4103b Mon Sep 17 00:00:00 2001 From: miggaze Date: Fri, 5 Aug 2022 14:16:20 +0700 Subject: [PATCH] fix deactive state --- xml/page_catalog_with_vending.xml | 15 ++++++-- xml_main/main.xml | 4 +- xml_main/offline.xml | 64 +++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 xml_main/offline.xml diff --git a/xml/page_catalog_with_vending.xml b/xml/page_catalog_with_vending.xml index 38504cf7..b22eaab6 100644 --- a/xml/page_catalog_with_vending.xml +++ b/xml/page_catalog_with_vending.xml @@ -61,19 +61,26 @@ Var StrawAutoRelease1 = "false" Var StrawAutoRelease2 = "false" + Var SELLONLINE = 0 + If SELLSTATUS = "SELLONLINE" Then + Var SELLONLINE = 1 + EndIf + If SELLSTATUS = "SELLNOCASH" Then + Var SELLONLINE = 1 + EndIf - If NetworkStatus = "ACTIVATE" Then + If SELLONLINE = 1 Then Var ShowButtonClick2 = "Enable" Else Var ShowButtonClick2 = "Invisible" Var ButtontoTopupMenu = "Invisible" EndIf - If NetworkStatus = "ACTIVATE" Then + If SELLONLINE = 1 Then Var ShowNetworkProblem = "Invisible" Var ShowNetworkProblemText = "" - GenHashWithTimeStamp QRCODE99 + ;GenHashWithTimeStamp QRCODE99x WEB "ENABLE" Else @@ -87,6 +94,8 @@ EndIf + + ; 1035 is Coke. STRCONTAIN "1035" MaterialAvailable CokeUI diff --git a/xml_main/main.xml b/xml_main/main.xml index 41b05480..8d30f8e8 100644 --- a/xml_main/main.xml +++ b/xml_main/main.xml @@ -100,7 +100,9 @@ ; Open "/ROOT/xml/outservice.xml" EndIf If NetworkStatus = "DEACTIVE" Then - Open "/ROOT/xml/offline.xml" + If SELLSTATUS = "DEACTIVE" Then + Open "/ROOT/xml/offline.xml" + EndIf EndIf diff --git a/xml_main/offline.xml b/xml_main/offline.xml new file mode 100644 index 00000000..b9936e6b --- /dev/null +++ b/xml_main/offline.xml @@ -0,0 +1,64 @@ + + + 1024 + 600 + "/ROOT/pictures/offline.bmp" + "/ROOT/sounds/outofservice.wav" + SoundVolume + 10000 + + TopView "hide" + If DeactivateCause = "Deactive Coin-Sensor(BO)" Then + Open "/ROOT/xml/offline_coinsensor.xml" + EndIf + If DeactivateCause = "xml error" Then + Open "/ROOT/xml/offline_xml_error.xml" + EndIf + If NetworkStatus = "DEACTIVE" Then + If TopupType = "OIL" Then + If XMLProfile = "General_NoCharge_100Up" Then + If DeactivateCause = "credit full" Then + Var ImageStaus01 = "Disable" + Open "/ROOT/xml/main.xml" + EndIf + EndIf + EndIf + EndIf + + + If BatteryStatus = "LOW" Then + If PowerStatus = "BATTERY" Then + Shutdown + Open "/app/xml/shutdown_comp.xml" + EndIf + EndIf + DEBUGVAR NetworkStatus + If NetworkStatus = "DEACTIVE" Then + If SELLSTATUS = "DEACTIVE" Then + Else + Open "/ROOT/xml/main.xml" + EndIf + + TimerReset + Else + Open "/ROOT/xml/main.xml" + EndIf + + + Open "/ROOT/xml/outservice.xml" + + + Open "/ROOT/xml/security_alarm.xml" + + +; image click for maintenance + + 900 + 0 + 120 + 120 + False + Open "/ROOT/xml/page_board.xml" + + + \ No newline at end of file