taobin_project/xml/page_board.xml
2021-11-30 13:52:43 +07:00

704 lines
16 KiB
XML

<Page>
<X> 0 </X>
<Y> 608 </Y>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1312 </Height>
<Background> "0xFF0000" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
TopView "hide"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/topview_button_back_main.xml"
Var FileNumber = 1
DEBUGVAR SoundVolume
DEBUGVAR web_ref
DEBUGVAR web_payment
DEBUGVAR web_telnum
DEBUGVAR web_code
DEBUGVAR web_pin
Var web_telnumOK = ""
Var web_readyOK = "false"
Var GetFreeFromError = 0
Var taobin_version = "1.53"
Cart "DeleteMenuID" "ALL"
Var MultiPayEnable = "true"
Var ShoppyPayEnable = "false"
Var WebAppEnable = "true"
Var WebAppShow = "Enable"
Var PayType = ""
; On open
Var menu_back_to_main = "ROOT/taobin_project/xml/page_back_to_main.xml"
Var charOfBaht = "฿"
Var KanitTTF = "ROOT/taobin_project/font/Kanit/Kanit-Light.ttf"
Var KanitMediaTTF = "ROOT/taobin_project/font/Kanit/Kanit-Medium.ttf"
Var KanitBoldTTF = "ROOT/taobin_project/font/Kanit/Kanit-Bold.ttf"
Var RobotoBold = "ROOT/taobin_project/font/Roboto/Roboto-Bold.ttf"
Var RobotoBlack = "ROOT/taobin_project/font/Roboto/Roboto-Black.ttf"
Var RobotoRegular = "ROOT/taobin_project/font/Roboto/Roboto-Regular.ttf"
Var KanitMediumTTF = "ROOT/taobin_project/font/Kanit/Kanit-Regular.ttf"
Var KanitRegularTTF = "ROOT/taobin_project/font/Kanit/Kanit-Regular.ttf"
Var KanitThinTTF = "ROOT/taobin_project/font/Kanit/Kanit-Thin.ttf"
Var KanitLightTTF = "ROOT/taobin_project/font/Kanit/Kanit-Light.ttf"
Var KanitSemiBoldTTF = "ROOT/taobin_project/font/Kanit/Kanit-Medium.ttf"
Var BlinkStar = "ROOT/taobin_project/image/animation/blink_star.gif"
Var countClick = 0
Var RoadShow = "false"
Var IgnorePoint = "true"
Var ShowButtonClick = "Enable"
Var ShowButtonClickFull = "Invisible"
Var ShowButtonClick2 = "Enable"
;SAVELOG DisplayType
If DisplayType = "2" Then
Var XPosiShowCountDownBrew = 693
Var WQR = 185
Var HQR = 185
Else
Var XPosiShowCountDownBrew = 768
Var WQR = 290
Var HQR = 290
EndIf
If MachineStage = "close-maintenance" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
If MachineStage = "mcu-upgrade" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
If NeedUpgrade = "true" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
Var TestLoopMakeDrink = 0
Var TestLoopSuccess = 0
Var TestLoopFailed = 0
;Var IgnoreNetCore = "false"
;SAVELOG SaleProfile
STRCONTAIN "whey" SaleProfile WheyShow
STRCONTAIN "cocktail" SaleProfile CocktailShow
;STRCONTAIN "roadshow" SaleProfile RoadShow
Var TermTemOnline = "false"
Var TaobinOnline = "false"
STRCONTAIN "9501" MaterialAvailable TaobinOnline
STRCONTAIN "9505" MaterialAvailable TermTemOnline
Var TaobinOnlineX = "true"
DEBUGVAR TaobinOnline
DEBUGVAR TermTemOnline
; Dtac.
DEBUGVAR ShowDtac1
Var CAMPAIGN1 = "false"
If TaobinOnlineX = "true" Then
Var CountDownShowButton = 35
Var ShowButtonClickFull = "Invisible"
Var VideoMainPage = "ROOT/taobin_project/video/main_page.mp4"
EndIf
If TermTemOnline = "true" Then
Var CountDownShowButton = 28
Var ShowButtonClickFull = "Enable"
Var VideoMainPage = "ROOT/termtem_project/video/termtem01.mp4"
EndIf
If TaobinOnlineX = "false" Then
If TermTemOnline = "false" Then
; TODO
Machine Initial
Open "/ROOT/xml/outservice.xml"
EndIf
EndIf
DEBUGVAR NetworkStatus
If NetworkStatus = "ACTIVATE" Then
Var ShowNetworkProblem = "Invisible"
Var ShowNetworkProblemText = ""
Machine NetworkUp
GenHashWithTimeStamp QRCODE99
WEB "ENABLE"
Else
Var ShowNetworkProblem = "Enable"
Var ShowButtonClick2 = "Invisible"
Var ShowNetworkProblemText = "การสื่อสารขัดข้อง ชำระเงินได้เฉพาะเงินสด"
Machine NetworkDown
Var QRCODE99 = ""
WEB "DISABLE"
EndIf
Var ShowPrice = "Enable"
If RoadShow = "true" Then
Var ShowPrice = "Invisible"
EndIf
;SAVELOG WheyShow
;SAVELOG CocktailShow
;SAVELOG RoadShow
;SAVELOG ShowPrice
Var CountDownPauseVideo = 0
Var NextPage = "-"
If StartUpExt = "false" Then
Else
Machine Initial
Var StartUpExt = "false"
EndIf
StopLongPlay
Var TimerFirst = "true"
Var buttonRemoveCup = "Invisible"
LED LedDoorCup 1 255 255 255 255
LED LedDoorLid Off 255 255 255 255
DEBUGVAR AdvertiseProfile
SPLIT AdvertiseProfile "/" 1 AdvertiseProfile1
SPLIT AdvertiseProfile "/" 2 AdvertiseProfile2
SPLIT AdvertiseProfile "/" 3 AdvertiseProfile3
SPLIT AdvertiseProfile "/" 4 AdvertiseProfile4
SPLIT AdvertiseProfile "/" 5 AdvertiseProfile5
SPLIT AdvertiseProfile "/" 6 AdvertiseProfile6
SPLIT AdvertiseProfile "/" 7 AdvertiseProfile7
SPLIT AdvertiseProfile "/" 8 AdvertiseProfile8
SPLIT AdvertiseProfile "/" 9 AdvertiseProfile9
SPLIT AdvertiseProfile "/" 10 AdvertiseProfile10
SPLIT AdvertiseProfile "/" 11 AdvertiseProfile11
SPLIT AdvertiseProfile "/" 12 AdvertiseProfile12
SPLIT AdvertiseProfile "/" 13 AdvertiseProfile13
SPLIT AdvertiseProfile "/" 14 AdvertiseProfile14
SPLIT AdvertiseProfile "/" 15 AdvertiseProfile15
SPLIT AdvertiseProfile "/" 16 AdvertiseProfile16
SPLIT AdvertiseProfile "/" 17 AdvertiseProfile17
SPLIT AdvertiseProfile "/" 18 AdvertiseProfile18
; Default
Var AdvTaobinHome = "/mnt/sdcard/coffeevending/taobin_project/adv/taobin_adv_"
Var AdvTaobinMenu = "/mnt/sdcard/coffeevending/taobin_project/adv/taobin_adv_menu_"
Var AdvTaobinMenu2 = "/mnt/sdcard/coffeevending/taobin_project/adv/taobin_adv_menu2_"
Var video_main_0 = AdvTaobinHome + AdvertiseProfile7
Var video_main_0 = video_main_0 + ".mp4"
Var video_main_1 = AdvTaobinHome + AdvertiseProfile8
Var video_main_1 = video_main_1 + ".mp4"
Var video_main_2 = AdvTaobinHome + AdvertiseProfile9
Var video_main_2 = video_main_2 + ".mp4"
Var video_main_3 = AdvTaobinHome + AdvertiseProfile10
Var video_main_3 = video_main_3 + ".mp4"
Var video_main_4 = AdvTaobinHome + AdvertiseProfile11
Var video_main_4 = video_main_4 + ".mp4"
Var video_main_5 = AdvTaobinHome + AdvertiseProfile12
Var video_main_5 = video_main_5 + ".mp4"
If AdvertiseProfile7 = "00" Then
Var video_main_count = 1
Else
If AdvertiseProfile8 = "00" Then
Var video_main_count = 1
Else
If AdvertiseProfile9 = "00" Then
Var video_main_count = 2
Else
If AdvertiseProfile10 = "00" Then
Var video_main_count = 3
Else
If AdvertiseProfile11 = "00" Then
Var video_main_count = 4
Else
If AdvertiseProfile12 = "00" Then
Var video_main_count = 5
Else
Var video_main_count = 6
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
If VideoAdvIndex = 0 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile7
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 1 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile8
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 2 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile9
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 3 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile10
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 4 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile11
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 5 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile12
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 0 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile7
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If VideoAdvIndex = 1 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile8
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If VideoAdvIndex = 2 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile9
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If VideoAdvIndex = 3 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile10
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If VideoAdvIndex = 4 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile11
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If VideoAdvIndex = 5 Then
Var video_menu_1 = AdvTaobinMenu + AdvertiseProfile12
Var video_menu_1 = video_menu_1 + ".mp4"
EndIf
If CAMPAIGN1 = "true" Then
Var video_menu_1 = "ROOT/taobin_project/campaign1/page_catalog_menu.mp4"
Var video_menu_0 = "ROOT/taobin_project/campaign1/page_catalog.mp4"
Var video_main_2 = "/mnt/sdcard/coffeevending/taobin_project/campaign1/page_main.mp4"
Var video_main_count = 3
EndIf
Var showCart = "Invisible"
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
If IgnoreNetCore = "true" Then
Else
If NetworkStatus = "DOWN" Then
;Open "/ROOT/xml/outservice.xml"
EndIf
If NetworkStatus = "DEACTIVE" Then
Open "/ROOT/xml/offline.xml"
EndIf
If MachineStage = "close-maintenance" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
If MachineStage = "mcu-upgrade" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
If MachineStage = "drink-failed" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
If MachineStage = "remove-cup" Then
Open "ROOT/taobin_project/xml/page_remove_cup.xml"
EndIf
If NeedUpgrade = "true" Then
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
If CountDownShowButton > 0 Then
Var CountDownShowButton = CountDownShowButton - 1
EndIf
;SAVELOG MachineStage
;SAVELOG CountDownShowButton
;SAVELOG ShowButtonClickFull
If TaobinOnlineX = "true" Then
If CountDownShowButton = 31 Then
Var ShowButtonClickFull = "Enable"
Var ShowButtonClick = "Invisible"
Refresh
EndIf
If CountDownShowButton = 3 Then
Var ShowButtonClick = "Enable"
Var ShowButtonClickFull = "Invisible"
Refresh
EndIf
If CountDownPauseVideo > 0 Then
; ignore
Var CountDownPauseVideo = CountDownPauseVideo - 1
If CountDownPauseVideo = 0 Then
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_choose_drink1.xml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
EndIf
EndIf
EndIf
If TermTemOnline = "true" Then
If CountDownShowButton = 31 Then
Var ShowButtonClickFull = "Enable"
Var ShowButtonClick = "Invisible"
Refresh
EndIf
If CountDownShowButton = 3 Then
Var ShowButtonClick = "Enable"
Var ShowButtonClickFull = "Invisible"
Refresh
EndIf
If CountDownPauseVideo > 0 Then
; ignore
Var CountDownPauseVideo = CountDownPauseVideo - 1
If CountDownPauseVideo = 0 Then
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/termtem_project/xml/page_tt__catalog_choose_drink1.xml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
EndIf
EndIf
EndIf
If TimerFirst = "true" Then
Var TimerFirst = "false"
Var CountUpReloadAll = CountUpReloadAll + 1
DEBUGVAR CountUpReloadAll
If CountUpReloadAll > 80 Then
Var StartUpExt = "-"
Var CountUpReloadAll = 0
ReloadAll
EndIf
EndIf
;DEBUGVAR CupOnArm
;Var CupOnArm = "true"
If CupOnArm = "true" Then
Var buttonRemoveCup = "Enable"
Else
Var buttonRemoveCup = "Invisible"
EndIf
Refresh
TimerReset
</EventTimeout>
<EventEnd>
;SAVELOG ShowButtonClick
If TaobinOnlineX = "true" Then
Var CountDownShowButton = 35
EndIf
If TermTemOnline = "true" Then
Var CountDownShowButton = 28
EndIf
Var CountDownPauseVideo = 6
If TaobinOnlineX = "true" Then
TouchTapClose
EndIf
;Open CurrentXMLFileName0
Refresh
</EventEnd>
<EventNetDown>
SAVELOG NetworkStatus
;Open "/mnt/sdcard/coffeevending/xml/main.xml"
</EventNetDown>
<EventNetDeactive>
SAVELOG NetworkStatus
Open "/mnt/sdcard/coffeevending/xml/main.xml"
</EventNetDeactive>
<EventWebApp>
DEBUGVAR web_ready
If web_ready = "true" Then
If web_ref = QRCODE99 Then
Var web_readyOK = web_ready
Var web_telnumOK = web_telnum
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_payment.xml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
EndIf
Else
EndIf
</EventWebApp>
<Video>
<X> 0 </X>
<Y> 0 </Y>
;<Loop>"true"</Loop>
;<Volume> 80 </Volume>
<Filename> VideoMainPage </Filename>
</Video>
<Button>
<X> 212 </X>
<Y> 1481 </Y>
<State> ShowButtonClick </State>
;<Color> "0x00BDFF" </Color>
<FilenamePress> "ROOT/taobin_project/image/main_page/bp_main_page_start.png" </FilenamePress>
;<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
If CocktailShow = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_cocktail.xml"
Else
;If TaobinOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.xml"
;EndIf
If TermTemOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/termtem_project/xml/page_tt_catalog.xml"
EndIf
EndIf
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Button>
<X> 212 </X>
<Y> 1695 </Y>
<State> ShowButtonClick2 </State>
;<Color> "0x00BDFF" </Color>
<FilenamePress> "ROOT/taobin_project/image/main_page/bp_main_page_member.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_check_member.xml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Button>
<X> 556 </X>
<Y> 1695 </Y>
<State> ShowButtonClick2 </State>
;<Color> "0x00BDFF" </Color>
<FilenamePress> "ROOT/taobin_project/image/main_page/bp_main_page_topup.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Open "ROOT/xml/service_menu.xml"
</EventClick>
</Button>
<Button>
<X> 2 </X>
<Y> 609 </Y>
<State> ShowButtonClickFull </State>
;<Color> "0x00BDFF" </Color>
<Width> 1070 </Width>
<Height> 1310 </Height>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
;If TaobinOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.xml"
;EndIf
If TermTemOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/termtem_project/xml/page_tt_catalog.xml"
EndIf
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Button>
<X> 780 </X>
<Y> 630 </Y>
<State> buttonRemoveCup </State>
;<Color> "0x00BDFF" </Color>
<Interval> 500 </Interval>
<Filename> "ROOT/taobin_project/image/main_page/bn_remove_cup.png" </Filename>
<Filename> "ROOT/taobin_project/image/main_page/bp_remove_cup.png" </Filename>
<EventClick>
Machine RemoveCup
Machine DoorLidOpen
</EventClick>
</Button>
<Button>
<X> 0 </X>
<Y> 1870 </Y>
<State> ShowNetworkProblem </State>
<Color> "0xFF0000" </Color>
<Width> 1080 </Width>
<Height> 60 </Height>
</Button>
<Text>
<X> 5 </X>
<Y> 1880 </Y>
<Size> 24 </Size>
<Align> Center </Align>
<Width> 1080 </Width>
<Font> RobotoRegular </Font>
<Color> 0xFFFFFF </Color>
<Value> ShowNetworkProblemText </Value>
</Text>
<QRCode>
<X> 895 </X>
<Y> 1110 </Y>
<Width> 178 </Width>
<Height> 178 </Height>
<State> WebAppShow </State>
<Service> testservice </Service>
</QRCode>
<Button>
<X> 0 </X>
<Y> 1860 </Y>
<Width> 200 </Width>
<Height> 50 </Height>
<Volume> SoundVolume </Volume>
<EventClick>
Var countClick = countClick + 1
If countClick = 3 Then
;Var TestLoopMakeDrink = 1
EndIf
DEBUGVAR countClick
If countClick = 3 Then
Var countClick = 0
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
;OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_collect_point_1.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_tel_number_mask.xml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
EndIf
Refresh
</EventClick>
</Button>
</Page>