fix deactive state

This commit is contained in:
miggaze 2022-08-05 14:16:20 +07:00
parent c3ffece9f5
commit c2ea778863
3 changed files with 79 additions and 4 deletions

View file

@ -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

View file

@ -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

64
xml_main/offline.xml Normal file
View file

@ -0,0 +1,64 @@
<Page>
<Width> 1024 </Width>
<Height> 600 </Height>
<Background> "/ROOT/pictures/offline.bmp" </Background>
<Sound> "/ROOT/sounds/outofservice.wav" </Sound>
<Volume> SoundVolume </Volume>
<Timeout> 10000 </Timeout>
<EventOpen>
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
</EventOpen>
<EventTimeout>
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
</EventTimeout>
<EventNetDown>
Open "/ROOT/xml/outservice.xml"
</EventNetDown>
<EventSecurity>
Open "/ROOT/xml/security_alarm.xml"
</EventSecurity>
; image click for maintenance
<Image>
<X> 900 </X>
<Y> 0 </Y>
<Width> 120 </Width>
<Height> 120 </Height>
<Visible> False </Visible>
<EventClick> Open "/ROOT/xml/page_board.xml" </EventClick>
</Image>
</Page>