add toggle sim mode

This commit is contained in:
Pakin 2024-08-02 13:44:24 +07:00
parent 4a989506e0
commit 9136d1b395

View file

@ -905,6 +905,61 @@
<Value> "New ui V2" </Value>
</Text>
;EnableNewBrewUI
<Image>
<X> info_startX </X>
<Y> info_14Y </Y>
<Filename> "ROOT/taobin_project/image/tab_1.png" </Filename>
<EventClick>
READ_FILE "/mnt/sdcard/coffeevending/sim_on" str_sim_on
If str_sim_on = "1" Then
WRITE_FILE "/mnt/sdcard/coffeevending/sim_on" ""
RebootWithCause "Turn off Sim mode"
Else
WRITE_FILE "/mnt/sdcard/coffeevending/sim_on" "1"
RebootWithCause "Turn on Sim mode"
EndIf
</EventClick>
</Image>
<Text>
<X> info_text_startX </X>
<Y> info_text_14Y </Y>
<Size> 30 </Size>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
<State> eval(
READ_FILE "/mnt/sdcard/coffeevending/sim_on" str_sim_on
If str_sim_on = "1" Then
Var return = "Enable"
Else
Var return = "Invisible"
EndIf
) </State>
<Value> "DisableSimMode" </Value>
</Text>
<Text>
<X> info_text_startX </X>
<Y> info_text_14Y </Y>
<Size> 30 </Size>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
<State> eval(
READ_FILE "/mnt/sdcard/coffeevending/sim_on" str_sim_on
If str_sim_on = "1" Then
Var return = "Invisible"
Else
Var return = "Enable"
EndIf
) </State>
<Value> "EnableSimMode" </Value>
</Text>
;<QRCode>
;<X> 930 </X>
;<Y> info_cancel_y </Y>