taobin_project/xml/test_all_syntax.xml
2025-07-08 10:55:32 +07:00

124 lines
2.5 KiB
XML

<Page>
<Width> 1080 </Width>
<Height> 1312 </Height>
<Volume> SoundVolume </Volume>
<Background> BackgroundColor </Background>
<EventOpen>
; On open
Machine AndroidTemperatureUpdateNow
OpenInst 3 "ROOT/taobin_project/xml/page_list.xml"
OpenInst 2 "ROOT/taobin_project/xml/page_list.xml"
Var Timeout = 0
Var Index = 1
DEBUGVAR TestArrary[0]
DEBUGVAR TestArrary[Index]
DEBUGVAR TestArrary[2]
DEBUGVAR TestArrary[3]
; xml-open-0 /mnt/sdcard/coffeevending/taobin_project/xml/test_all_syntax.xml
SAVELOG "TEST IF"
Var idx = 0
If idx = 0 Then
SAVELOG "================ Test I f true OK"
Else
SAVELOG "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
EndIf
SAVELOG "TEST Else"
Var idx = 1
If idx = 0 Then
SAVELOG "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Else
SAVELOG "================ Test el se OK"
If idx = 2 Then
SAVELOG "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Else
SAVELOG "================ Test el se OK recursive"
EndIf
EndIf
SAVELOG "============================== Test step 1 ========================"
Var idx_test = 0
DEBUGVAR idx_test
TRY "ROOT/taobin_project/xml/test_forloop.xml"
SAVELOG "=========== END ==========="
Var $12-03-03-0094.Price = 35
Var $12-03-03-0094.Discount = 15
</EventOpen>
<Timeout> 120000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
If Timeout > 10 Then
Open "ROOT/taobin_project/xml/page_board.xml"
EndIf
Refresh
TimerReset
</EventTimeout>
<Text>
<X>200</X>
<Y>200</Y>
<Value> "Value must be ฿15 "
</Value>
<Size> 30 </Size>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
</Text>
<Text>
<X>480</X>
<Y>200</Y>
<Value>
eval(
SAVELOG " ============ This is test express recursive ==========="
If $12-03-03-0094.Price = -1 Then
Var priceFormat = "Free"
Else
If $12-03-03-0094.Discount = "" Then
Var priceFormat = $12-03-03-0094.Price
Else
If $12-03-03-0094.Discount > 0 Then
Var priceFormat = $12-03-03-0094.Discount
Else
Var priceFormat = $12-03-03-0094.Price
EndIf
EndIf
EndIf
DEBUGVAR priceFormat
Var return !assigned StringFmt( priceFormat, DisplayFormat, PreScaleConvertShow)
)
</Value>
<Size> 30 </Size>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
</Text>
</Page>