0 608 "Enable" 1080 1312 "0xFF0000" SoundVolume
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"
1000
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
;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
SAVELOG NetworkStatus
;Open "/mnt/sdcard/coffeevending/xml/main.xml"
SAVELOG NetworkStatus
Open "/mnt/sdcard/coffeevending/xml/main.xml"
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
5 1880 24 Center 1080
RobotoRegular
0xFFFFFF ShowNetworkProblemText 895 1110 178 178 WebAppShow testservice