taobin_project/xml/page_board.xml
2023-11-27 15:21:32 +07:00

1610 lines
36 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_blank_main.xml"
Var FileNumber = 1
Var img_press_main_page = "ROOT/taobin_project/image/main_page/bp_main_page_start.png"
DEBUGVAR SoundVolume
Var credit_card_enable = ""
READ_FILE "/mnt/sdcard/credit_card_enable" credit_card_enable
Var eng_enable = "true"
Var thai_enable = "true"
Var show_eng = "false"
Var NextOrder = "false"
Var Seeker = "next"
Var Seeker.thankLidFlag = 0
Var Seeker.thankStrawFlag = 0
Var Seeker = "curr"
Var Seeker.thankLidFlag = 0
Var Seeker.thankStrawFlag = 0
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
Cart "DeleteMenuID" "ALL"
Var MultiPayEnable = "false"
;Var MultiPayEnable = "true"
Var ShoppyPayEnable = "true"
Var WebAppEnable = "true"
Var WebAppShow = "Enable"
Var PayType = ""
Var Seeker.CurrCreditAmount = 0
Var Seeker.CurrCreditUse = 0
Var Seeker.CurrCreditTelNum = ""
Var Seeker.CurrCreditPinNum = ""
DEBUGVAR PaySuccessWithDaemonTask
Var PaidPaymentFromNextStage = 0
Var DrinkPaid = "-"
; 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 RobotoThin = "ROOT/taobin_project/font/Roboto/Roboto-Thin.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 OpunMediumTTF = "ROOT/taobin_project/font/Opun/Opun-Medium.ttf"
Var OpunThinTTF = "ROOT/taobin_project/font/Opun/Opun-Thin.ttf"
Var KanitSemiBoldTTF = "ROOT/taobin_project/font/Kanit/Kanit-Medium.ttf"
Var BlinkStar = "ROOT/taobin_project/image/animation/blink_star.gif"
Var MITRegularTTF = "ROOT/taobin_project/font/Mitr/Mitr-Regular.ttf"
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
Var NoWaitMachineEnable = 1
DEBUGVAR InternationalEnable
If NoWaitMachineEnable = 1 Then
If stop_now = "true" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
Else
If MachineStage = "close-maintenance" Then
If InternationalEnable = 1 Then
RootLayoutVisible 3 "hide"
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
EndIf
If MachineStage = "mcu-upgrade" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
If NeedUpgrade = "true" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
Var TestLoopMakeDrink = 0
Var TestLoopSuccess = 0
Var TestLoopFailed = 0
Var cock_tail_str = ""
READ_FILE "/mnt/sdcard/cock_tail_enable" cock_tail_str
STRCONTAIN "1" cock_tail_str cock_tail_enable
If cock_tail_enable = "true" Then
Var WheyShow = "false"
Var CocktailShow = "true"
Var RoadShow = "true"
STRCONTAIN "1401" MaterialAvailable BeerTrapEnable
Else
Var WheyShow = "true"
Var CocktailShow = "false"
Var RoadShow = "false"
EndIf
; move to TRY actoin.
Var RoadShow = "false"
TRY "ROOT/taobin_project/xml/sometime/RoadShow.ev"
; take a look file page_board_1.xml
If XMLProfile = "" Then
CacheVarStr "get" XMLProfile
Else
CacheVarStr "put" XMLProfile
EndIf
Var TermTemOnline = "false"
Var TaobinOnline = "false"
If MaterialAvailable = "" Then
CacheVarStr "get" MaterialAvailable
Else
CacheVarStr "put" MaterialAvailable
EndIf
STRCONTAIN "9501" MaterialAvailable TaobinOnline
STRCONTAIN "9505" MaterialAvailable TermTemOnline
; App fast
STRCONTAIN "1063" MaterialAvailable AppFastEnable
STRCONTAIN "1046" MaterialAvailable WheyEnable
STRCONTAIN "1208" MaterialAvailable PromoteYuzuEnable
STRCONTAIN "1058" MaterialAvailable OreoEnable
STRCONTAIN "1068" MaterialAvailable JasmineTeaEnable
STRCONTAIN "1210" MaterialAvailable MelonSyrupEnable
Var MenuKidEnable = "false"
;Var AppFastEnable = "false"
If AppFastEnable = "true" Then
Var AppFastButtonState = "Enable"
Var WheyButtonState = "Invisible"
Var MenuKidButtonState ="Invisible"
Else
If WheyEnable = "true" Then
Var AppFastButtonState = "Invisible"
Var WheyButtonState = "Enable"
Var MenuKidButtonState ="Invisible"
Else
Var MenuKidEnable = "true"
Var AppFastButtonState = "Invisible"
Var WheyButtonState = "Invisible"
Var MenuKidButtonState ="Enable"
EndIf
EndIf
If CocktailShow = "true" Then
Var WheyEnable = "false"
Var MenuKidEnable = "false"
Var MenuKidButtonState = "Invisible"
Var WheyShow = "false"
Var WheyButtonState = "Invisible"
Var WebAppShow = "Invisible"
EndIf
Var TaobinOnlineX = "true"
DEBUGVAR AppFastEnable
DEBUGVAR MenuKidEnable
DEBUGVAR TaobinOnline
;DEBUGVAR TermTemOnline
DEBUGVAR WheyEnable
; Dtac.
Var CAMPAIGN1 = "false"
If TaobinOnlineX = "true" Then
Var EventTurnOn = 0
; CountDownShowButton must value 35
Var CountDownShowButton = 35
Var ShowButtonClickFull = "Invisible"
If LanguageInit = "ENG" Then
Var VideoMainPage = "ROOT/taobin_project/video/main_page_en.mp4"
Var show_eng = "true"
Else
Var VideoMainPage = "ROOT/taobin_project/video/main_page.mp4"
Var show_eng = "false"
EndIf
DEBUGVAR SystemDateMonthInt
DEBUGVAR SystemDateDayInt
; Zone set video main page.
Var adver_brewing_en = 1
If CountryName = "Australia" Then
TRY "/mnt/sdcard/coffeevending/taobin_project/inter/aus/video/script_video.ev"
EndIf
If CountryName = "Malaysia" Then
TRY "/mnt/sdcard/coffeevending/taobin_project/inter/mys/video/script_video.ev"
EndIf
If CountryName = "Thailand" Then
TRY "/mnt/sdcard/coffeevending/taobin_project/video/script1.ev"
EndIf
DEBUGVAR CountDownShowButton
DEBUGVAR EventTurnOn
EndIf
If TaobinOnlineX = "false" Then
If TermTemOnline = "false" Then
; TODO
Machine Initial
Open "/ROOT/xml/outservice.xml"
EndIf
EndIf
DEBUGVAR SELLSTATUS
DEBUGVAR NetworkStatus
If SELLSTATUS = "" Then
CacheVarStr "get" SELLSTATUS
Else
CacheVarStr "put" SELLSTATUS
EndIf
DEBUGVAR SELLSTATUS
DEBUGVAR AdvertiseProfile
Var SELLONLINE = 0
If SELLSTATUS = "SELLONLINE" Then
Var SELLONLINE = 1
EndIf
If SELLSTATUS = "SELLNOCASH" Then
Var SELLONLINE = 1
EndIf
If SELLONLINE = 1 Then
Var ShowNetworkProblem = "Invisible"
Var ShowNetworkProblemText = ""
Machine NetworkUp
Var QRCODE99x = ""
GenHashWithTimeStamp QRCODE99x
Var QRCODE99 = "https://taobin-beverage.web.app/" + QRCODE99x
;Var QRCODE99 = "https://uat-taobin-beverage.firebaseapp.com/" + QRCODE99x
WEB "ENABLE"
Else
Var ShowNetworkProblem = "Enable"
Var ShowButtonClick2 = "Invisible"
Var ShowNetworkProblemText = "การสื่อสารขัดข้อง ชำระเงินได้เฉพาะเงินสด"
If NetworkStatus = "DOWN" Then
Machine NetworkDown
EndIf
Var QRCODE99 = ""
WEB "DISABLE"
EndIf
Var ShowPrice = "Enable"
If RoadShow = "true" Then
Var ShowPrice = "Invisible"
Var WebAppShow = "Invisible"
EndIf
;SAVELOG WheyShow
;SAVELOG CocktailShow
DEBUGVAR RoadShow
;SAVELOG ShowPrice
Var CountDownPauseVideo = 0
Var NextPage = "-"
If StartUpExt = "false" Then
Else
Var OreoGuarantee = 0
Machine Initial
Var StartUpExt = "false"
Var CameraSettingStatus = ""
;DEBUGVAR "FlushTxRef1"
;FlushTxRef1
;If JXMLVersionInt > 428 Then
; LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/ui/lang.tsv"
;EndIf
Var SoundThaiIndex = 0
EndIf
DEBUGVAR Not#LanguageLoaded
;DEBUGVAR "FlushTxRef1"
;FlushTxRef1
StopLongPlay
Var TimerFirst = "true"
Var buttonRemoveCup = "Invisible"
Var led_new = "0"
READ_FILE "/mnt/sdcard/coffeevending/led_new" led_new
DEBUGVAR led_new
If led_new = "1" Then
LEDv2 LedDoorCupV2 Off 255 194 166 20 6
LEDv2 LedDoorLidV2 Off 255 255 255 20 6
Else
LED LedDoorCup Off 255 255 255 255
LED LedDoorLid Off 255 255 255 255
EndIf
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"
Var video_main_6 = AdvTaobinHome + AdvertiseProfile13
Var video_main_6 = video_main_6 + ".mp4"
Var video_main_7 = AdvTaobinHome + AdvertiseProfile14
Var video_main_7 = video_main_7 + ".mp4"
Var video_main_8 = AdvTaobinHome + AdvertiseProfile15
Var video_main_8 = video_main_8 + ".mp4"
Var video_main_9 = AdvTaobinHome + AdvertiseProfile16
Var video_main_9 = video_main_9 + ".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 = 6 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile13
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 7 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile14
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 8 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile15
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 9 Then
Var video_menu_0 = AdvTaobinMenu + AdvertiseProfile16
Var video_menu_0 = video_menu_0 + ".mp4"
EndIf
If VideoAdvIndex = 0 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile7
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 1 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile8
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 2 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile9
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 3 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile10
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 4 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile11
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 5 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile12
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 6 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile13
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 7 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile14
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 8 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile15
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
If VideoAdvIndex = 9 Then
Var video_menu2_1 = AdvTaobinMenu2 + AdvertiseProfile16
Var video_menu2_1 = video_menu2_1 + ".mp4"
EndIf
DEBUGVAR video_menu2_1
Var showCart = "Invisible"
Var LedLidBlink = "no"
Var EnableSelectMenuBetweenBrew = "Enable"
If JXMLVersionInt > 412 Then
Var ToppingNewShow = "true"
EndIf
DEBUGVAR XMLProfile
Machine CancelWepApp
StrLen AdvertiseProfile AdvertiseProfileLen
If XMLProfile = "taobin_notopup" Then
Var ButtontoTopupMenu = "Disable"
Else
Var ButtontoTopupMenu = "Enable"
EndIf
If NetworkStatus = "DOWN" Then
Var WebAppShow = "Invisible"
EndIf
DEBUGVAR XMLPageVersionInt
; forever
Var new_layout = "true"
Machine MenuLayoutNew
DEBUGVAR SpiralOnline
Topping "ClearNextOrder" "-"
If AdvertiseProfileLen = 0 Then
CacheVarStr "get" AdvertiseProfile
Else
STRCONTAIN "00/00" AdvertiseProfile advPro
If advPro = "true" Then
CacheVarStr "get" AdvertiseProfile
Else
CacheVarStr "put" AdvertiseProfile
EndIf
EndIf
DEBUGVAR AdvertiseProfile
Var show_lang = "THAI"
Var NETCORE_EVENT_CNT_TMP = NCIC07_EVENT_CNT
DEBUGVAR CameraCount
If CameraCount = 0 Then
CameraService "Start"
EndIf
If CameraCount = "" Then
CameraService "Start"
EndIf
DEBUGVAR CountryName
DEBUGVAR LanguageListEnable
DEBUGVAR DisplayFormat
DEBUGVAR ScaleValueForCalculation
DEBUGVAR PreScaleConvertShow
DEBUGVAR UnitPostDisplay
DEBUGVAR LanguageInit
Var TextPriceMenuSize = 14
Var TextPriceMenuY = 264
Var TextPriceMenuBlendX = 174
Var TextPriceMenuHotX = 50
; zone init lang
; CountryName
Var show_eng_button_stage = "Enable"
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page/bp_main_page_member.png"
Machine __arm_toggle
GetLongTimeInMinute CurrentTime
DEBUGVAR LastTimeClickOrder
DEBUGVAR CurrentTime
If LastTimeClickOrder = "" Then
GetLongTimeInMinute LastTimeClickOrder
EndIf
Var DiffTimeInMinute = CurrentTime - LastTimeClickOrder
DEBUGVAR DiffTimeInMinute
If DiffTimeInMinute > 120 Then
GetLongTimeInMinute LastTimeClickOrder
ScreenRefresh
EndIf
; zone config language
SetLanguage LanguageInit
Var InternationalEnable = 0
Var InternationalEnableStr = "false"
; CountryName
If CountryName = "" Then
READ_FILE "/mnt/sdcard/coffeevending/country/short" StrCountryShort
DEBUGVAR StrCountryShort
If StrCountryShort = "MYS" Then
Var CountryName = "Malaysia"
EndIf
If StrCountryShort = "MYR" Then
Var CountryName = "Malaysia"
EndIf
If StrCountryShort = "AUS" Then
Var CountryName = "Australia"
EndIf
EndIf
If CountryName = "Malaysia" Then
Var WebAppShow = "Invisible"
EnableLanguage "ENG"
;EnableLanguage "THAI"
;EnableLanguage "CHINA"
;EnableLanguage "JAPAN"
EnableLanguage "MALAY"
SetLanguage "MALAY"
LanguageControl "UpdateList" "-"
Var InternationalEnable = 1
Var show_eng = "true"
;Var VideoMainPage = "ROOT/taobin_project/inter/common/video/video_main.mp4"
Var img_press_main_page = "ROOT/taobin_project/image/main_page_en/bp_main_page_start.png"
Var ShowNetworkProblemText = "Network error. Payment Cash only."
Var CountryRootPath = "ROOT/taobin_project/inter/mys/"
Var PriceUnitText = "Prices in MYR"
Var TextPriceMenuSize = 12
Var TextPriceMenuY = 266
Var ShowButtonClick2 = "Enable"
Var ButtontoTopupMenu = "Invisible"
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page_en/bp_main_page_member.png"
Var show_eng_button_stage = "Invisible"
Var CountDownShowButton = 35
Var XButtonMember = 384
Var YButtonMember = 1695
If Not#LanguageLoaded = "" Then
LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/inter/mys/menu/lang.tsv"
EndIf
EndIf
If CountryName = "Indonesia" Then
Var TextPriceMenuSize = 14
Var show_eng_button_stage = "Invisible"
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page_en/bp_main_page_member.png"
Var CountryRootPath = "ROOT/taobin_project/inter/ids/"
Var CountDownShowButton = 35
If Not#LanguageLoaded = "" Then
LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/inter/ids/menu/lang.tsv"
EndIf
Var PriceUnitText = ""
Var XButtonMember = 212
Var YButtonMember = 1695
EndIf
If CountryName = "Australia" Then
Var WebAppShow = "Invisible"
EnableLanguage "ENG"
SetLanguage "ENG"
LanguageControl "UpdateList" "-"
Var InternationalEnable = 1
Var show_eng = "true"
;Var VideoMainPage = "ROOT/taobin_project/inter/aus/video/video_main.mp4"
Var img_press_main_page = "ROOT/taobin_project/image/main_page_en/bp_main_page_start.png"
Var ShowNetworkProblemText = "Network error. Payment Cash only."
Var CountryRootPath = "ROOT/taobin_project/inter/aus/"
ar TextPriceMenuSize = 12
Var TextPriceMenuY = 264
Var TextPriceMenuBlendX = 180
Var TextPriceMenuHotX = 48
Var ShowButtonClick2 = "Enable"
Var ButtontoTopupMenu = "Invisible"
Var PriceUnitText = ""
Var MemberButtonFileName = "ROOT/taobin_project/image/main_page_en/bp_main_page_member.png"
Var show_eng_button_stage = "Invisible"
Var CountDownShowButton = 35
Var XButtonMember = 384
Var YButtonMember = 1695
If Not#LanguageLoaded = "" Then
LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/inter/aus/menu/lang.tsv"
EndIf
EndIf
DEBUGVAR InternationalEnable
If InternationalEnable = 1 Then
Var LanguageObjectShow = "Enable"
Var NoLangObjectShow = "Invisible"
If Not#LanguageResult = "false" Then
LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/ui/lang.tsv"
EndIf
Var RootPath = "ROOT/taobin_project/inter/common/"
Var OpenFileXML = CountryRootPath + "xml/event/tricker.ev"
DEBUGVAR OpenFileXML
TRY OpenFileXML
Else
Var LanguageObjectShow = "Invisible"
Var NoLangObjectShow = "Enable"
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/tricker.ev"
Var RootPath = "ROOT/taobin_project/"
EndIf
Var StrXMLPageVer = "ver=" + XMLPageVersionInt
WRITE_FILE "/mnt/sdcard/coffeevending/version/xml_page_version.int" StrXMLPageVer
If SELLONLINE = 1 Then
Else
Var ShowNetworkProblem = "Enable"
;Var ShowButtonClick2 = "Invisible"
If NetworkStatus = "DOWN" Then
Machine NetworkDown
EndIf
Var QRCODE99 = ""
WEB "DISABLE"
EndIf
If GameInstalled = "" Then
CheckApp "com.NDF.taobin" GameInstalled
EndIf
Var CountDownCheckCamera = 10
;DEBUGVAR EnableLiveness
DEBUGVAR LivenessLicenseFailNumber
;DEBUGVAR LivenessControlVersion
;DEBUGVAR Not#CameraSettingStatus
RootLayoutVisible 3 "hide"
If SELLSTATUS = "DEACTIVE" Then
Open "/ROOT/xml/offline.xml"
EndIf
Var CheckCupStateDoorCupClose = ""
; zone cup on arm
If CupOnArm = "true" Then
If CheckCupStateDoorCupClose = "" Then
Var buttonRemoveCup = "Enable"
EndIf
If CheckCupStateDoorCupClose = "done" Then
Var buttonRemoveCup = "Enable"
EndIf
Else
If buttonRemoveCup = "Enable" Then
Var buttonRemoveCup = "Invisible"
EndIf
EndIf
TRY "ROOT/taobin_project/xml/profile/run.ev"
Var NETCORE_LOST_COUNT_UP = 0
If RoadShow = "true" Then
Var ShowNetworkProblem = "Invisible"
Var ShowNetworkProblemText = ""
EndIf
</EventOpen>
<EventUnitTest1>
Var NoWaitMachineEnable = 1
</EventUnitTest1>
<EventUnitTest2>
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert2.xml"
Var OpenFromPageBoard = 1
If InternationalEnable = 1 Then
; show language icon
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
RootLayoutVisible 3 "show"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_group_recommend.lxml"
Else
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/script_common_for_open_promotion_xml.ev"
EndIf
Machine DoorClose
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventUnitTest2>
<EventUnitTest3>
Var NoWaitMachineEnable = 0
</EventUnitTest3>
<EventUnitTest4>
STRCONTAIN "SugarBreak-y18IDCard" XMLProfile UnitTestProfile
If UnitTestProfile = "true" Then
Var XMLProfile = "standard"
Else
Var XMLProfile = "SugarBreak-y18IDCard"
EndIf
</EventUnitTest4>
<Timeout> 1000 </Timeout>
<EventTimeout>
; New profile: Y18, Y18+Live, NoSugarStepRight2
;DEBUGVAR 12-02-01-0021.Price
;DEBUGVAR $12-02-01-0021.Price
; DEBUGVAR XMLProfile
; test
; Var XMLProfile = "y18IDCard"
; Var XMLProfile = "y18IDCardLive"
; Var XMLProfile = "SugarBreak"
If XMLProfile = "" Then
; test action
ReadProfile "ROOT/xmlprofile/main.json" "XMLProfileFromJson"
DEBUGVAR XMLProfileFromJson
; Var XMLProfile = "Discount50"
EndIf
If Discount50 = "true" Then
Var HalfPrice = "true"
If InvokeDiscountCMD = "" Then
__CMD "invoke-discount-50" "-" "-" "-"
Var InvokeDiscountCMD = "true"
Else
; DEBUGVAR InvokeDiscountCMD
EndIf
Else
Var HalfPrice = "false"
; DEBUGVAR Discount50
EndIf
; DEBUGVAR EnableLiveness
; DEBUGVAR Only18
; DEBUGVAR NoSugarStepRight2
; DEBUGVAR HalfPrice
DEBUGVAR WebAppShow
If IgnoreNetCore = "true" Then
Else
If NetworkStatus = "DOWN" Then
Var WebAppShow = "Invisible"
EndIf
If SELLSTATUS = "DEACTIVE" Then
Open "/ROOT/xml/offline.xml"
EndIf
If NoWaitMachineEnable = 1 Then
If stop_now = "true" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
Else
If MachineStage = "close-maintenance" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
EndIf
If MachineStage = "mcu-upgrade" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
;stop_now
If NETCORE_LOST_CNT > 120 Then
Var stop_now = "true"
Var MachineErrorDetailAll = "???"
SAVELOG "NETCORE_LOST_CNT"
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
;DEBUGVAR NETCORE_EVENT_CNT_X
If NCIC07_EVENT_CNT = NETCORE_EVENT_CNT_TMP Then
If NETCORE_EVENT_CNT_X = "" Then
Var NETCORE_EVENT_CNT_X = 0
EndIf
Var NETCORE_EVENT_CNT_X = NETCORE_EVENT_CNT_X + 1
If NETCORE_EVENT_CNT_X = 30 Then
DEBUGVAR NETCORE_EVENT_CNT_X
EndIf
If NETCORE_EVENT_CNT_X = 90 Then
DEBUGVAR NETCORE_EVENT_CNT_X
EndIf
If NETCORE_EVENT_CNT_X > 3600 Then
Var stop_now = "true"
Var stop_now_from_netcore_event = 1
Var MachineErrorDetailAll = "Netcore Lost"
SAVELOG "Netcore Lost NCIC07_EVENT_CNT"
DEBUGVAR NCIC07_EVENT_CNT
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
Else
Var NETCORE_EVENT_CNT_X = 0
Var NETCORE_EVENT_CNT_TMP = NCIC07_EVENT_CNT
EndIf
EndIf
If MachineStage = "drink-failed" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
If MachineStage = "remove-cup" Then
Open "ROOT/taobin_project/xml/page_remove_cup.xml"
EndIf
If NeedUpgrade = "true" Then
If InternationalEnable = 1 Then
Open "ROOT/taobin_project/xml/page_show_error.lxml"
Else
Open "ROOT/taobin_project/xml/page_show_error.xml"
EndIf
EndIf
If CountDownShowButton > 0 Then
Var CountDownShowButton = CountDownShowButton - 1
EndIf
DEBUGVAR 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 = 1 Then
If InvokeDiscountCMD = "true" Then
If JXMLVersionInt > 451 Then
TapScreen 30 638
EndIf
EndIf
EndIf
If CountDownPauseVideo = 0 Then
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert2.xml"
Var OpenFromPageBoard = 1
If InternationalEnable = 1 Then
; show language icon
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
RootLayoutVisible 3 "show"
Var OpenFileXML = CountryRootPath + "xml/event/script_common_for_open_promotion_xml.ev"
TRY OpenFileXML
;OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_group_recommend.lxml"
Else
If BeerTrapEnable = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_cocktail.xml"
Else
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/script_common_for_open_promotion_xml.ev"
EndIf
EndIf
Machine DoorClose
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
; Original value is 40
If CountUpReloadAll > 80 Then
Var NeedReboot = "false"
Var StartUpExt = "-"
Var CountUpReloadAll = 0
ReloadAll
EndIf
EndIf
;DEBUGVAR CupOnArm
;Var CupOnArm = "true"
If CupOnArm = "true" Then
If CheckCupStateDoorCupClose = "" Then
Var buttonRemoveCup = "Enable"
EndIf
If CheckCupStateDoorCupClose = "done" Then
Var buttonRemoveCup = "Enable"
EndIf
Else
If buttonRemoveCup = "Enable" Then
Var buttonRemoveCup = "Invisible"
EndIf
EndIf
If Seeker = "curr" Then
If DoorCupPosition = "bottom" Then
; It normal
Var EmergencyStop = "false"
Else
Var EmergencyStop = "true"
EndIf
EndIf
;DEBUGVAR CountDownCheckCamera
;DEBUGVAR Not#CameraSettingStatus
;If CountDownCheckCamera = 0 Then
;
; If Not#CameraSettingStatus = "" Then
; If CameraCount = 1 Then
;
; Var CountDownCheckCamera = 2
; CameraSetting "usbfront" "default" "Rotate=90,Resolution=1280x720,scaleX=1.0,scaleY=0.7"
; Else
; Var CountDownCheckCamera = 5
; EndIf
; Else
; Var CountDownCheckCamera = 30
; EndIf
;Else
; Var CountDownCheckCamera = CountDownCheckCamera - 1
;EndIf
Refresh
TimerReset
</EventTimeout>
<EventEnd>
SAVELOG "EVENT END"
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
If SELLSTATUS = "DEACTIVE" Then
Open "/mnt/sdcard/coffeevending/xml/main.xml"
EndIf
</EventNetDeactive>
<EventWebApp>
DEBUGVAR web_ready
If web_ready = "true" Then
If web_ref = QRCODE99x Then
Var web_readyOK = web_ready
Var web_telnumOK = web_telnum
Var web_app_prepar = "true"
; Handle penetrator
If Only18 = "true" Then
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "ROOT/taobin_project/xml/page_identity18_verification.xml"
Else
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_payment.xml"
EndIf
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>
<FilenameAlternate> "ROOT/taobin_project/video/main_page_en.mp4" </FilenameAlternate>
</Video>
<Button>
<X> 212 </X>
<Y> 1481 </Y>
<State> ShowButtonClick </State>
;<Color> "0x00BDFF" </Color>
<FilenamePress> img_press_main_page </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 SpiralOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_with_vending.xml"
Else
If InternationalEnable = 1 Then
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.lxml"
Else
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.xml"
EndIf
EndIf
EndIf
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Button>
<X> XButtonMember </X>
<Y> YButtonMember </Y>
<State> ShowButtonClick2 </State>
;<Color> "0x00BDFF" </Color>
<FilenamePress> MemberButtonFileName </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var NextPage = "-"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
If InternationalEnable = 1 Then
If CountryName = "Australia" Then
Var ChackMemberPage = CountryRootPath + "xml/page_check_member.lxml"
OpenInst 2 ChackMemberPage
Else
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_check_member.xml"
EndIf
Else
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_check_member.xml"
EndIf
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Button>
<X> 556 </X>
<Y> 1695 </Y>
<State> ButtontoTopupMenu </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>
Var PayDetail=""
Var NextPage = "-"
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>
SAVELOG "click ShowButtonClickFull"
Var NextPage = "-"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
If SpiralOnline = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_with_vending.xml"
Else
If InternationalEnable = 1 Then
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.lxml"
Else
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.xml"
EndIf
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>
<Image>
<X> 778 </X>
<Y> 632 </Y>
<State>WebAppShow</State>
<Filename> "ROOT/taobin_project/image/home/home/qr_bg.png" </Filename>
</Image>
<QRCode>
<X> 843 </X>
<Y> 98 </Y>
<Width> 150 </Width>
<Color> "0xeae6e1" </Color>
<QRColor> "0x000000" </QRColor>
<Height> 150 </Height>
<State> WebAppShow </State>
<Service> testservice </Service>
</QRCode>
<Button>
<X> 780 </X>
<Y> 630 </Y>
<State> buttonRemoveCup </State>
;<Color> "0x00BDFF" </Color>
<Interval> 500 </Interval>
<Filename> Var(RootPath + "image/main_page/bn_remove_cup.png") </Filename>
<Filename> Var(RootPath + "image/main_page/bp_remove_cup.png") </Filename>
<EventClick>
Machine RemoveCup
Machine DoorLidOpen
Var CheckCupStateDoorCupClose = "reset"
Var buttonRemoveCup = "Invisible"
</EventClick>
</Button>
<Button>
<X> 0 </X>
<Y> 1870 </Y>
<State> ShowNetworkProblem </State>
<Color> "0xFF0000" </Color>
<Width> 1080 </Width>
<Height> 60 </Height>
<EventClick>
If IgnoreNetCore = "true" Then
Var NextPage = "-"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.lxml"
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
EndIf
</EventClick>
</Button>
<Button>
<X> 0 </X>
<Y> 608 </Y>
<State> "Enable" </State>
<Width> 120 </Width>
<Height> 120 </Height>
<EventClick>
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert2.xml"
Var OpenFromPageBoard = 1
If InternationalEnable = 1 Then
; show language icon
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
RootLayoutVisible 3 "show"
Var OpenFileXML = CountryRootPath + "xml/event/script_common_for_open_promotion_xml.ev"
TRY OpenFileXML
;OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_group_recommend.lxml"
Else
If BeerTrapEnable = "true" Then
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_cocktail.xml"
Else
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/script_common_for_open_promotion_xml.ev"
EndIf
EndIf
Machine DoorClose
TopView "show"
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
</EventClick>
</Button>
<Text>
<State> ShowNetworkProblem </State>
<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>
</Page>