"Enable" 1080 1920 ; "0xeae6e1" SoundVolume OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" Machine WakeUp Var BugFlag = 0 CRLFToSpace showname CRLFToSpace showdesc Var MachineEvent = 0 Var MatchineSpiralStage = "-" Var NextButtonState = "Invisible" ;- Begin Var PriceDrinkNoTop = PriceDrink Var PriceDrinkTmp = PriceDrink Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp Var Timeout = 0 ;SAVELOG PriceDrinkTmp ;- End If RoadShow = "true" Then Var PriceDrinkTmp = "Free" Var SaveSelectDrinkRoadShow = SelectDrink EndIf DEBUGVAR SaveSelectDrinkRoadShow If ShowPrice = "Invisible" Then Var PriceDrinkTmpShow = "Free" EndIf Var StateImgKeto = "Invisible" Var ToppingGotoPayment = "true" DEBUGVAR backGroundAddExtra DEBUGVAR backGroundAddShotPremium DEBUGVAR MultiPayEnable DEBUGVAR CART_COUNT Var btnAddCart = "Invisible" If MultiPayEnable = "true" Then Var btnAddCart = "Enable" If CART_COUNT = 3 Then Var btnAddCart = "Invisible" EndIf EndIf Var LidDeactiveButton = "Invisible" Var StrawDeactiveButton = "Invisible" Machine DoorClose Machine DoorLidClose Var ButtonNext = "false" Var NEW_MULTI = "Invisible" Var high_light_drink_type = "Invisible" Var text_hot_color = "0x84776F" Var text_cold_color = "0x84776F" Var text_blender_color = "0x84776F" Var PriceDrinkTmpShow = "---" Var show_select_type = "Enable" Var hot_button_state = PD_STAGE_1 Var cold_button_state = PD_STAGE_2 Var blend_button_state = PD_STAGE_3 Var normal_button_state = "Invisible" ; Protect have product-code but menu disable or invalid. If hot_button_state = "Invisible" Then Var hot_button_state = "Disable2" EndIf If cold_button_state = "Invisible" Then Var cold_button_state = "Disable2" EndIf If blend_button_state = "Invisible" Then Var blend_button_state = "Disable2" EndIf Function 2 DEBUGVAR show_select_type DEBUGVAR PriceD1 DEBUGVAR PriceD2 DEBUGVAR PriceD3 DEBUGVAR DisplayFormatFull If hot_button_state = "Disable2" Then Var text_price_d1 = "" Else Var text_price_d1 !assigned StringFmt( PriceD1 , DisplayFormatFull, PreScaleConvertShow) EndIf If cold_button_state = "Disable2" Then Var text_price_d2 = "" Else Var text_price_d2 !assigned StringFmt( PriceD2 , DisplayFormatFull, PreScaleConvertShow) EndIf If blend_button_state = "Disable2" Then Var text_price_d3 = "" Else Var text_price_d3 !assigned StringFmt( PriceD3 , DisplayFormatFull, PreScaleConvertShow) EndIf DEBUGVAR LanguageShowByIndex DEBUGVAR NameLang[0][LanguageShowByIndex] DEBUGVAR NameLang[1][LanguageShowByIndex] DEBUGVAR NameLang[2][LanguageShowByIndex] Var showname = aliasName[LanguageShowByIndex] Var showdesc = aliasName[LanguageShowByIndex] BackslashNToEnter showname BackslashNToEnter showdesc CRLFToSpace showname CRLFToSpace showdesc 1000 DEBUGVAR Timeout Var Timeout = Timeout + 1 If Timeout > 40 Then Var Timeout = 0 If Seeker = "next" Then OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" Open "ROOT/taobin_project/xml/page_brewing3Conti.xml" Else OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" Open "ROOT/taobin_project/xml/page_catalog.xml" EndIf EndIf If MultiPayEnable = "true" Then If NEW_MULTI = "Invisible" Then Var NEW_MULTI = "Enable" Else Var NEW_MULTI = "Invisible" EndIf EndIf If Seeker = "curr" Then If DoorCupPosition = "bottom" Then ; It normal Var EmergencyStop = "false" Else Var EmergencyStop = "true" EndIf EndIf If MachineEvent = 1 Then If MatchineSpiralStage = "-" Then Else If MatchineSpiralStage = "spiral-valid" Then Function 2 Else ; Verify error DEBUGVAR MachineSpiralErrorCode Open "ROOT/taobin_project/xml/page_spiral_invalid_failed.xml" EndIf EndIf EndIf Refresh TimerReset DEBUGVAR LanguageShow DEBUGVAR InternationalEnable SAVELOG "EventLanguageOnChange menu -list" If InternationalEnable = 1 Then If CountryName = "Thailand" Then Var show_eng_button_stage = "Invisible" Var LanguageButtonEnable = "Enable" EndIf If CountryName = "HongKong" Then Var show_eng_button_stage = "Invisible" Var LanguageButtonEnable = "Invisible" Var BtnLangToggleIndex = "Enable" EndIf Else Var LanguageButtonEnable = "Invisible" Var show_eng_button_stage = "Enable" EndIf If LanguageShow = "ENG" Then Var showname_max_size = 58 Var warning_image_x = 220 Var warning_image_y = 1333 Var warning_text_x = 20 Var warning_text_y = 1312 Var text_payment_next_x = 132 EndIf If LanguageShow = "THAI" Then Var showname_max_size = 68 Var warning_image_x = 335 Var warning_image_y = 1333 Var warning_text_x = 20 Var warning_text_y = 1312 Var text_payment_next_x = 142 EndIf If LanguageShow = "MSC" Then Var showname_max_size = 68 Var warning_image_x = 350 Var warning_image_y = 1333 Var warning_text_x = 20 Var warning_text_y = 1312 Var text_payment_next_x = 142 EndIf If LanguageShow = "MYANMAR" Then Var showname_max_size = 68 Var warning_image_x = 300 Var warning_image_y = 1333 Var warning_text_x = 10 Var warning_text_y = 1312 Var text_payment_next_x = 142 EndIf ;OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_frozen_fruit_select.lxml" OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" RefreshAll 0 380 1080 1540 "0xeae6e1" 1000 381 show_btn show_btp "/mnt/sdcard/coffeevending/wav/click.wav" SoundVolume ; DEBUGVAR LanguageShowByIndex DEBUGVAR LanguageShow If SelectDrinkType = 1 Then Var showname = NameLang[IndexDrinktType][LanguageShowByIndex] Var showdesc = DescLang[IndexDrinktType][LanguageShowByIndex] Else Var showname = aliasName[LanguageShowByIndex] Var showdesc = aliasName[LanguageShowByIndex] EndIf BackslashNToEnter showname BackslashNToEnter showdesc CRLFToSpace showname CRLFToSpace showdesc Var Timeout = 0 ; back If BugFlag = 1 Then Else Var MachineEvent = 1 DEBUGVAR LinkProductCodeAnotherMachine[0] DEBUGVAR LinkProductCodeAnotherMachine[1] DEBUGVAR LinkProductCodeAnotherMachine[2] Var MatchineSpiralStage = "-" GenHashWithTimeStamp SpiralRef SPIRAL_VERIFY LinkProductCodeAnotherMachine[0] SpiralRef EndIf ; same 374 752 331 436 PictureDrink 374 399 eval( If IsSmoRet = "true" Then Var return = "Enable" Else Var return = "Invisible" EndIf ) "ROOT/taobin_project/image/topping2/blender_icon.png" ; same ; Text head 0 602 1080 Center showname_max_size Auto 2 KanitMediumTTF 0x513C2F showname 0 1082 1080 Center 68 KanitMediumTTF 0xEE8C62 text_price_d3 ; same 25 1232 1080 Center 32 KanitMediumTTF 0x6F5F51 showdesc ; warning time "Enable" warning_image_x warning_image_y "ROOT/taobin_project/image/topping_inter/time.png" "Enable" warning_text_x warning_text_y 0 19 002290 Open "/media/bt/xml/security_alarm.xml" ; add cart ; next 420 1442 250 75 002291 Var img_cold_no_flag = 0 Var img_smth_no_flag = 0 If hot_button_state = "Disable2" Then If blend_button_state = "Disable2" Then Var img_cold_no_flag = 1 Else Var img_cold_no_flag = 1 Var img_smth_no_flag = 2 EndIf EndIf If PriceD1 = PriceD2 Then Var img_cold_no_flag = 1 EndIf If hot_button_state = "Disable2" Then If cold_button_state = "Disable2" Then Var img_smth_no_flag = 1 EndIf EndIf If img_cold_no_flag = 1 Then SAVELOG "Cold Image change." Var img_cold = "/bt_cold_no.png" Var img_cold_sel = "/bt_cold_selected_no.png" Var img_cold_dis = "/bt_cold_disable_no.png" Var img_cold_dis2 = "/bt_cold_disable2_no.png" Else Var img_cold = "/bt_cold.png" Var img_cold_sel = "/bt_cold_selected.png" Var img_cold_dis = "/bt_cold_disable.png" Var img_cold_dis2 = "/bt_cold_disable2.png" EndIf If img_smth_no_flag = 1 Then SAVELOG "Smoothies change img. 1" Var img_smth = "/bt_smoothie_no.png" Var img_smth_sel = "/bt_smoothie_selected_no.png" Var img_smth_dis = "/bt_smoothie_disable_no.png" Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" Else If img_smth_no_flag = 2 Then SAVELOG "Smoothies change img. 2" Var img_smth = "/bt_smoothie_sub2.png" Var img_smth_sel = "/bt_smoothie_selected_sub2.png" Var img_smth_dis = "/bt_smoothie_disable_sub2.png" Var img_smth_dis2 = "/bt_smoothie_disable2_sub2.png" Else Var img_smth = "/bt_smoothie.png" Var img_smth_sel = "/bt_smoothie_selected.png" Var img_smth_dis = "/bt_smoothie_disable.png" Var img_smth_dis2 = "/bt_smoothie_disable2.png" EndIf EndIf Var img_cold = "/bt_cold_no.png" Var img_cold_sel = "/bt_cold_selected_no.png" Var img_cold_dis = "/bt_cold_disable_no.png" Var img_cold_dis2 = "/bt_cold_disable2_no.png" Var img_smth = "/bt_smoothie_no.png" Var img_smth_sel = "/bt_smoothie_selected_no.png" Var img_smth_dis = "/bt_smoothie_disable_no.png" Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" DEBUGVAR menu_name_thai_cold SAVELOG "FUNCTION2" Var TOPPING_PRICE = 0 Var SelectDrinkType = 0 ; Set default If SelectCountDrinkType = 1 Then If DefaultDrinkType = 1 Then Var hot_button_state = "PressForever" Var IndexDrinktType = 0 EndIf If DefaultDrinkType = 2 Then Var cold_button_state = "PressForever" If PD_CODE2 = "12-05-02-0016" Then Var cold_button_state = "Invisible" Var normal_button_state = "PressForever" Var SelectDrinkType = 1 EndIf If PD_CODE2 = "51-05-02-0016" Then Var cold_button_state = "Invisible" Var normal_button_state = "PressForever" Var SelectDrinkType = 1 EndIf Var IndexDrinktType = 1 EndIf If DefaultDrinkType = 3 Then Var blend_button_state = "PressForever" Var IndexDrinktType = 2 EndIf EndIf If hot_button_state = "PressForever" Then Var PriceDrinkNoTop = PriceD1 Var UserSelectProductCode = PD_CODE1 If showShotEnable = "Disable" Then Var showShotEnable = "Enable" EndIf Var showText4 = "Invisible" Var showname = NameLang[0][LanguageShowByIndex] Var showdesc = DescLang[0][LanguageShowByIndex] Var text_hot_color = "0xFFFFFF" Var text_cold_color = "0x84776F" Var text_blender_color = "0x84776F" Var SelectDrinkType = 1 Machine PreparCup EndIf If cold_button_state = "PressForever" Then Var PriceDrinkNoTop = PriceD2 Var UserSelectProductCode = PD_CODE2 If showShotEnable = "Disable" Then Var showShotEnable = "Enable" EndIf Var showText4 = "Invisible" Var showname = NameLang[1][LanguageShowByIndex] Var showdesc = DescLang[1][LanguageShowByIndex] Var text_hot_color = "0x84776F" Var text_cold_color = "0xFFFFFF" Var text_blender_color = "0x84776F" Var SelectDrinkType = 1 Machine PreparCup EndIf If blend_button_state = "PressForever" Then Var PriceDrinkNoTop = PriceD3 Var UserSelectProductCode = PD_CODE3 If showShotEnable = "Invisible" Then Else Var showShotEnable = "Disable" EndIf Var showText4 = "Enable" Var showname = NameLang[2][LanguageShowByIndex] Var showdesc = DescLang[2][LanguageShowByIndex] Var text_hot_color = "0x84776F" Var text_cold_color = "0x84776F" Var text_blender_color = "0xFFFFFF" Var SelectDrinkType = 1 Machine PreparCup EndIf BackslashNToEnter showname BackslashNToEnter showdesc CRLFToSpace showname CRLFToSpace showdesc DEBUGVAR PriceDrinkNoTop DEBUGVAR PriceDiff DEBUGVAR showShotEnable Var TOPPING_PRICE = 0 If ShotCoffeePremium = "Press" Then If blendedState = "Press" Then Var PriceDrinkTmp = PriceDrinkNoTop EndIf Var blendedState = "Disable" Var TOPPING_PRICE = 0 Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price2 Var topping2 = toppingID2index2 Var DisableUsingCode = "true" Var showText7 = "Enable" SAVELOG "Select premi normal shot" Else If showShotEnable = "Press" Then If blendedState = "Press" Then Var PriceDrinkTmp = PriceDrinkNoTop EndIf Var blendedState = "Disable" Var TOPPING_PRICE = 0 ;Var PriceDrinkTmp = PriceDrinkNoTop + toppingID2price2 Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price2 Var topping2 = toppingID2index2 Var DisableUsingCode = "true" Var showText7 = "Enable" SAVELOG "Select add normal shot" Else If blendedState = "Disable" Then Var blendedState = "Enable" EndIf Var PriceDrinkTmp = PriceDrinkNoTop Var topping2 = toppingID2index1 Var DisableUsingCode = "false" SAVELOG "Deselect add normal shot" Var showText7 = "Invisible" EndIf EndIf DEBUGVAR showOreoAddEnable DEBUGVAR TOPPING_PRICE If showOreoAddEnable = "Press" Then Var TOPPING_PRICE = TOPPING_PRICE + toppingID6price2 Var topping6 = toppingID6index2 Var DisableUsingCode = "true" Else ;Var PriceDrinkTmp = PriceDrinkNoTop Var topping6 = toppingID6index1 Var DisableUsingCode = "false" EndIf DEBUGVAR OatMilkEnable DEBUGVAR MenuCodeName1 DEBUGVAR MenuCodeName1_State If OatMilkEnable = "Press" Then If MenuCodeName1 = "OatMilk" Then If MenuCodeName1_State = "Enable" Then Var TOPPING_PRICE = TOPPING_PRICE + OatMilkAddAmount Var UserSelectProductCode = SubMenuProductCode1 EndIf EndIf EndIf DEBUGVAR SelectDrinkType DEBUGVAR showShotEnable DEBUGVAR PriceDrinkTmpShow Var PriceDrinkTmp = PriceDrinkNoTop + TOPPING_PRICE Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp If SelectDrinkType = 0 Then Var PriceDrinkTmpShow = "---" Else Var PriceDrinkTmpShow !assigned StringFmt( PriceDrinkTmp , DisplayFormatFull, PreScaleConvertShow) EndIf SAVELOG PriceDrinkTmp If RoadShow = "true" Then Var PriceDrinkTmpShow = "Free" DEBUGVAR SelectDrink2 DEBUGVAR PriceDrinkTmpShow EndIf CRLFToSpace showname CRLFToSpace showdesc DEBUGVAR showname DEBUGVAR showdesc Var Timeout = 0 Var NextButtonState = "Enable" RefreshAll ; OpenInst 2 "ROOT/taobin_project/inter/tha/xml/multi/page_catalog.lxml"