1609 lines
37 KiB
XML
1609 lines
37 KiB
XML
<Popup>
|
|
<Cache> "Enable" </Cache>
|
|
<Width> 1080 </Width>
|
|
<Height> 1920 </Height>
|
|
<Background> "0xeae6e1" </Background>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventOpen>
|
|
|
|
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/process/payext_setup.ev"
|
|
|
|
Var SendNotiPaySuccess = 2
|
|
|
|
Var GetMoreStrawCount = 2
|
|
|
|
Var CountUpWhenBREW_CNT = 0
|
|
DEBUGVAR TxRef1
|
|
|
|
SAVELOG "page_brewing3.xml"
|
|
DEBUGVAR MachineStage
|
|
|
|
Var PictureFileTextDesctionState = "Enable"
|
|
|
|
|
|
If CART_COUNT >= 1 Then
|
|
Open "ROOT/taobin_project/xml/page_brewing3Multi.xml"
|
|
Else
|
|
Var PayReference = ""
|
|
Var PayType = "newpay"
|
|
EndIf
|
|
|
|
Var SelectDrink = Seeker.selected_a_drink
|
|
Var ExtendData = Seeker.ExtendData
|
|
|
|
Var ServiceAmount2 = Seeker.ServiceAmount2
|
|
Var PriceDrink = Seeker.ServiceAmount2
|
|
|
|
DEBUGVAR Seeker
|
|
DEBUGVAR Seeker.selected_a_drink
|
|
DEBUGVAR Seeker.ServiceAmount2
|
|
|
|
DEBUGVAR Seeker.CodeNumber
|
|
|
|
Var SessionID2 = SelectSlot + ":"
|
|
Var SessionID2 = SessionID2 + ExtendData
|
|
|
|
; On open move from page_brewing3.xml
|
|
Var countClick2 = 0
|
|
|
|
Var Timeout = 0
|
|
|
|
Var PrintCoinAmount = 0
|
|
|
|
WRITE_FILE "/mnt/sdcard/coffeevending/log/drink-success" "--"
|
|
|
|
|
|
If show_eng = "true" Then
|
|
|
|
Var IMG_CNT = "ROOT/taobin_project/image/page_doing/img2_eng.png"
|
|
|
|
Play "ROOT/taobin_project/sound_eng/Wait_a_moment.mp3"
|
|
|
|
Var bnGetMoreStrawFileName = "ROOT/taobin_project/image/page_doing/bn_get_more_straw.png"
|
|
Var bpGetMoreStrawFileName = "ROOT/taobin_project/image/page_doing/bp_get_more_straw.png"
|
|
|
|
Var bnStrawProblemReport = "ROOT/taobin_project/image/page_doing/bn_send_report_straw_en.png"
|
|
Var bpStrawProblemReport = "ROOT/taobin_project/image/page_doing/bp_send_report_straw_en.png"
|
|
|
|
Var bnLidProblemReport = "ROOT/taobin_project/image/page_doing/bn_send_report_lid_en.png"
|
|
Var bpLidProblemReport = "ROOT/taobin_project/image/page_doing/bp_send_report_lid_en.png"
|
|
|
|
|
|
;Var bn_get_lid_image = "ROOT/taobin_project/image/page_doing/bn_get_lid_en.png"
|
|
;Var bp_get_lid_image = "ROOT/taobin_project/image/page_doing/bp_get_lid_en.png"
|
|
Var bn_get_lid_image = "ROOT/taobin_project/image/page_doing/bn_get_lid.png"
|
|
Var bp_get_lid_image = "ROOT/taobin_project/image/page_doing/bp_get_lid.png"
|
|
|
|
Var brew_txt2 = "ROOT/taobin_project/video/brewing_txt_adv3_en.png"
|
|
Var brew_txt1 = "ROOT/taobin_project/video/brewing_txt_adv1_en.png"
|
|
|
|
Var XStraw = 142
|
|
Else
|
|
Var PlaySoundLag = "ROOT/taobin_project/sound_thai/thankyou.mp3"
|
|
|
|
; Play Sound #zone
|
|
If SoundBackToSchoolEnable = 1 Then
|
|
|
|
If SoundBackToSchoolType = 1 Then
|
|
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/boy/"
|
|
EndIf
|
|
If SoundBackToSchoolType = 2 Then
|
|
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/girl/"
|
|
EndIf
|
|
Var PlaySoundLag = RootPathSoundBackToSchool + "thankyou.wav"
|
|
EndIf
|
|
|
|
Play PlaySoundLag
|
|
|
|
Var IMG_CNT = "ROOT/taobin_project/image/page_doing/img2.png"
|
|
|
|
|
|
Var bnGetMoreStrawFileName = "ROOT/taobin_project/image/page_doing/bn_get_more_straw.png"
|
|
Var bpGetMoreStrawFileName = "ROOT/taobin_project/image/page_doing/bp_get_more_straw.png"
|
|
|
|
Var bnStrawProblemReport = "ROOT/taobin_project/image/page_doing/bn_send_report_straw.png"
|
|
Var bpStrawProblemReport = "ROOT/taobin_project/image/page_doing/bp_send_report_straw.png"
|
|
|
|
Var bnLidProblemReport = "ROOT/taobin_project/image/page_doing/bn_send_report_lid.png"
|
|
Var bpLidProblemReport = "ROOT/taobin_project/image/page_doing/bp_send_report_lid.png"
|
|
|
|
|
|
Var bn_get_lid_image = "ROOT/taobin_project/image/page_doing/bn_get_lid.png"
|
|
Var bp_get_lid_image = "ROOT/taobin_project/image/page_doing/bp_get_lid.png"
|
|
|
|
Var brew_txt2 = "ROOT/taobin_project/video/brewing_txt_adv3.png"
|
|
Var brew_txt1 = "ROOT/taobin_project/video/brewing_txt_adv1.png"
|
|
|
|
Var XStraw = 142
|
|
EndIf
|
|
|
|
Var waitAckPay = 0
|
|
Var VendingTSIDTmp = ""
|
|
Var VendingTSIDProblem = ""
|
|
Var CreditReference = ""
|
|
Var PayCredit = 0
|
|
|
|
If Seeker.TNumberTaobinCredit = "" Then
|
|
|
|
If Seeker.TNumberTaobinMember = "" Then
|
|
Var TelephoneNumberProblem = ""
|
|
Else
|
|
Var TelephoneNumberProblem = Seeker.TNumberTaobinMember
|
|
EndIf
|
|
|
|
Else
|
|
Var TelephoneNumberProblem = Seeker.TNumberTaobinCredit
|
|
EndIf
|
|
|
|
DEBUGVAR Seeker.TNumberTaobinMember
|
|
DEBUGVAR Seeker.PointTaobinStr
|
|
|
|
|
|
If GetFreeFromError = 1 Then
|
|
Var TelephoneNumberProblem = TelephoneNumberGOTFree
|
|
EndIf
|
|
|
|
|
|
If LedLidBlink = "true" Then
|
|
Var LedLidBlink = "no"
|
|
LED LedDoorLid Blink 255 255 255 255
|
|
EndIf
|
|
|
|
|
|
If show_eng = "true" Then
|
|
Var DirImage = "ROOT/taobin_project/image/page_payment_en/page_payment"
|
|
Var DirImage2 = "ROOT/taobin_project/image/topping2_en"
|
|
Else
|
|
Var DirImage = "ROOT/taobin_project/image/page_payment"
|
|
Var DirImage2 = "ROOT/taobin_project/image/topping2"
|
|
EndIf
|
|
|
|
DEBUGVAR show_eng
|
|
|
|
Var next_pic_bn = DirImage + "/bn_add_order.png"
|
|
Var next_pic_bp = DirImage + "/bp_add_order.png"
|
|
Var text_next_order = DirImage + "/text_next_order.png"
|
|
Var bg_strawlid = DirImage2 + "/bg_strawlidSmall.png"
|
|
|
|
Var topup_credit_bn = DirImage + "/bn_topup_credit.png"
|
|
Var topup_credit_bp = DirImage + "/bp_topup_credit.png"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
|
|
Var Seeker.strawAction = 0
|
|
Var Seeker.lidAction = 0
|
|
|
|
If Seeker.thankLidFlag = 1 Then
|
|
Var bg_strawlid = DirImage2 + "/bg_strawSmall.png"
|
|
Var LidStateX = "Invisible"
|
|
Var Seeker.lidAction = 2
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR LastMakeDrinkResult
|
|
|
|
If LastMakeDrinkResult = "success" Then
|
|
Var MachineState_Result = 1
|
|
EndIf
|
|
|
|
If LastMakeDrinkResult = "fail" Then
|
|
SAVELOG "LastMakeDrinkResult is 2"
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR VendingCampaign
|
|
|
|
|
|
If MachineState_Result > 0 Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Else
|
|
Var SelectMenuBetweenBrewEnable1 = "Enable"
|
|
Var EnableTopupCreditBetweenBrew = "Enable"
|
|
EndIf
|
|
|
|
If GetFreeFromError = 1 Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If DisableFromPowerup = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1Text = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If SelectMenuBetweenBrewEnable1 = "Enable" Then
|
|
Var EnableGetMoreStrawFileName = "Enable"
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Enable"
|
|
Else
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
|
|
Var EnableGetMoreStrawFileName = "Invisible"
|
|
EndIf
|
|
|
|
|
|
; Hide
|
|
Var bg_strawProblem_ST = "Invisible"
|
|
Var StrawProblemStatus = 1
|
|
Var StrawStateX = "Invisible"
|
|
Var LidStateX = "Invisible"
|
|
|
|
; Override from config
|
|
If StrawGetMoreState = "Invisible" Then
|
|
Var bg_strawProblem_ST = "Enable"
|
|
Var EnableGetMoreStrawFileName = "Invisible"
|
|
EndIf
|
|
|
|
If RoadShow = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
EndIf
|
|
|
|
If Seeker.CreditCard = 1 Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If NeedUpgrade = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If NeedReboot = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If SELLSTATUS = "DEACTIVE" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
DEBUGVAR NeedUpgrade
|
|
DEBUGVAR NeedReboot
|
|
DEBUGVAR SELLSTATUS
|
|
|
|
|
|
DEBUGVAR bg_lidProblem_ST
|
|
|
|
|
|
If bg_lidProblem_ST = "Invisible" Then
|
|
Var GetLidButtonState = "Enable"
|
|
;Var XStraw = 265
|
|
EndIf
|
|
|
|
If IgnoreLidStraw = "true" Then
|
|
Var GetLidButtonState = "Invisible"
|
|
Var IgnoreLidStraw = "false"
|
|
EndIf
|
|
|
|
Var CreditCardVoid = 0
|
|
If InternationalEnable = 1 Then
|
|
Var adver_brewing_en = 0
|
|
RootLayoutVisible 3 "hide"
|
|
EndIf
|
|
|
|
If adver_brewing_en = 1 Then
|
|
Var adver_brewing_playing = 1
|
|
Var adver_brewing_play_index = 2
|
|
Var adver_brewing_count_down = 10
|
|
Var VideoPlayFile = "ROOT/taobin_project/image/page_doing/tao_adv1.png"
|
|
Var PictureFile = brew_txt1
|
|
EndIf
|
|
|
|
Var CampaignEnable = 0
|
|
|
|
|
|
Var GetLidButtonCountDown = 0
|
|
|
|
; language instance
|
|
|
|
|
|
If bg_lidProblem_ST = "Enable" Then
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
Var EnableGetMore
|
|
EndIf
|
|
|
|
If bg_strawProblem_ST = "Enable" Then
|
|
Var EnableGetMoreStrawFileName = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR SelectMenuBetweenBrewEnable1
|
|
DEBUGVAR SelectMenuBetweenBrewEnable2
|
|
|
|
Var SelectMenuBetweenBrewEnable1Text = SelectMenuBetweenBrewEnable1
|
|
|
|
|
|
; echo 1 > /mnt/sdcard/game_enable
|
|
READ_FILE "/mnt/sdcard/game_enable" game_mode_str
|
|
STRCONTAIN "1" game_mode_str game_mode_enable
|
|
DEBUGVAR game_mode_enable
|
|
|
|
|
|
If GameEnableFromTrickerEv = 1 Then
|
|
Var game_mode_enable = "true"
|
|
EndIf
|
|
|
|
If GameOverrideDisable = 1 Then
|
|
Var game_mode_enable = "false"
|
|
EndIf
|
|
|
|
READ_FILE "/mnt/sdcard/game_disable" game_mode_str
|
|
STRCONTAIN "1" game_mode_str game_mode_disable
|
|
DEBUGVAR game_mode_disable
|
|
|
|
If game_mode_disable = "true" Then
|
|
Var game_mode_enable = "false"
|
|
EndIf
|
|
|
|
DEBUGVAR GameEnableFromTrickerEv
|
|
DEBUGVAR GameOverrideDisable
|
|
|
|
DEBUGVAR Seeker
|
|
If game_mode_enable = "true" Then
|
|
|
|
|
|
DEBUGVAR GameInstalled
|
|
|
|
If GameInstalled = "true" Then
|
|
If Seeker.TNumberTaobinCredit = "" Then
|
|
Var TelephoneNumber = "0899999999"
|
|
|
|
If Seeker.TNumberTaobinMember = "" Then
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinMember
|
|
EndIf
|
|
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinCredit
|
|
EndIf
|
|
|
|
StrLen TelephoneNumber TelNumLen
|
|
|
|
DEBUGVAR TelephoneNumber
|
|
DEBUGVAR TelNumLen
|
|
|
|
If TelNumLen = 10 Then
|
|
|
|
; reset
|
|
WRITE_FILE "/mnt/sdcard/config_taobingame.yaml" ""
|
|
;APPEND_FILE "/mnt/sdcard/config_taobingame.yaml" "API_ENDPOINT: "http://10.0.16.233:30487/taobingame"\r\n"
|
|
APPEND_FILE "/mnt/sdcard/config_taobingame.yaml" "API_ENDPOINT: "http://10.0.16.231:30460"\r\n"
|
|
|
|
If TelephoneNumber = "0899999999" Then
|
|
; Coupon or customer not input phone number.
|
|
Var ACCString !assigned SprintFmt("ACC: ""\r\n", "")
|
|
Else
|
|
|
|
Var ACCString !assigned SprintFmt("ACC: "%s"\r\n", TelephoneNumber)
|
|
EndIf
|
|
|
|
DEBUGVAR ACCString
|
|
|
|
If show_eng = "true" Then
|
|
Var LangString = "LANG: "EN"\r\n"
|
|
Else
|
|
Var LangString = "LANG: "TH"\r\n"
|
|
EndIf
|
|
|
|
Var BoxIDString !assigned SprintFmt("BOX_ID: "%s"\r\n", BoxID)
|
|
|
|
; reset
|
|
WRITE_FILE "/mnt/sdcard/taobingame_acc.yaml" ""
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" ACCString
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" LangString
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" BoxIDString
|
|
|
|
;
|
|
|
|
Var Game01Enable = 1
|
|
Else
|
|
; reset
|
|
WRITE_FILE "/mnt/sdcard/config_taobingame.yaml" ""
|
|
;APPEND_FILE "/mnt/sdcard/config_taobingame.yaml" "API_ENDPOINT: "http://10.0.16.233:30487/taobingame"\r\n"
|
|
APPEND_FILE "/mnt/sdcard/config_taobingame.yaml" "API_ENDPOINT: "http://10.0.16.231:30460"\r\n"
|
|
|
|
Var ACCString !assigned SprintFmt("ACC: ""\r\n", "")
|
|
DEBUGVAR ACCString
|
|
|
|
If show_eng = "true" Then
|
|
Var LangString = "LANG: "EN"\r\n"
|
|
Else
|
|
Var LangString = "LANG: "TH"\r\n"
|
|
EndIf
|
|
|
|
Var BoxIDString !assigned SprintFmt("BOX_ID: "%s"\r\n", BoxID)
|
|
|
|
; reset
|
|
WRITE_FILE "/mnt/sdcard/taobingame_acc.yaml" ""
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" ACCString
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" LangString
|
|
APPEND_FILE "/mnt/sdcard/taobingame_acc.yaml" BoxIDString
|
|
|
|
;
|
|
|
|
Var Game01Enable = 1
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
DEBUGVAR Game01Enable
|
|
DEBUGVAR BREW_CNT
|
|
If Game01Enable = 1 Then
|
|
If BREW_CNT > 75 Then
|
|
Var ButtonGameCountDown = BREW_CNT - 60
|
|
If ButtonGameCountDown > 10 Then
|
|
Var ButtonGameCountDown = 10
|
|
EndIf
|
|
|
|
Var ButtonGameCountDownState = "PressForever"
|
|
Else
|
|
Var Game01Enable = 0
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
|
|
Var ButtonGameCountDown = 0
|
|
EndIf
|
|
|
|
Else
|
|
Var ButtonGameCountDown = 0
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
EndIf
|
|
|
|
DEBUGVAR ButtonGameCountDown
|
|
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
|
|
|
|
|
|
; BREW_CNT > 15 ( pre-time ) + 60 ( Game Time ) Game01Enable
|
|
; BREW_CNT > 15 ( pre-time ) + 50 ( Game Time ) + 10 (Debound Time) Game01Enable
|
|
|
|
If Game01Enable = 1 Then
|
|
|
|
If ButtonGameCountDownState = "Enable" Then
|
|
If BREW_CNT < 75 Then
|
|
If Game01Enable = 1 Then
|
|
SAVELOG "Game01Enable set zero event open 2"
|
|
EndIf
|
|
Var Game01Enable = 0
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
EndIf
|
|
EndIf
|
|
|
|
If BREW_CNT > 70 Then
|
|
|
|
Else
|
|
If Game01Enable = 1 Then
|
|
SAVELOG "Game01Enable set zero event open 1"
|
|
EndIf
|
|
Var Game01Enable = 0
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
</EventOpen>
|
|
<EventLanguageOnChange>
|
|
Var XPosiShowCountDownBrew = 768
|
|
Refresh
|
|
</EventLanguageOnChange>
|
|
|
|
<EventActionOk>
|
|
|
|
If CreditCardVoid = 1 Then
|
|
Var ChangeOK = 2
|
|
EndIf
|
|
|
|
|
|
If ActionOKCase = 1 Then
|
|
If Seeker.CodeChannel = 1 Then
|
|
Var SessionID2 = SelectSlot + ":"
|
|
Var SessionID2 = SessionID2 + ExtendData
|
|
|
|
DEBUGVAR SessionID2
|
|
|
|
Var CreditAmount1 = ""
|
|
Var ServiceAmountFlow = ""
|
|
Var TelephoneNumber = "0899999999"
|
|
Var ServiceType = "coffee"
|
|
Var ECommerce = ""
|
|
Var ECommerce = ECommerce + PriceDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + DiscountDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SessionID2
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SelectDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.VendingCode
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.CodeNumber
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + "C:"
|
|
Var ECommerce = ECommerce + Seeker.IntVendingCampaign
|
|
Var ServiceParameter = "max"
|
|
Var ServiceCharge = 0
|
|
Var AccountType = "new"
|
|
Var testservice = "kbank"
|
|
Var tc = ""
|
|
Var GetScore = ""
|
|
Var OperatorName = ""
|
|
Var SessionID = ""
|
|
|
|
GetPayInfo TelephoneNumber ECommerce ServiceType ServiceParameter SessionID OperatorName CreditAmount1 ServiceAmountFlow GetScore tc
|
|
;Var Timeout = 0
|
|
Var ActionOKCase = 2
|
|
|
|
SAVELOG "back_to_main from line > 142."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
|
|
Else
|
|
|
|
SAVELOG "back_to_main from line > 147."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
EndIf
|
|
Else
|
|
EndIf
|
|
|
|
</EventActionOk>
|
|
|
|
<EventActionError>
|
|
If ActionOKCase = 1 Then
|
|
If Seeker.CodeChannel = 1 Then
|
|
Var SessionID2 = SelectSlot + ":"
|
|
Var SessionID2 = SessionID2 + ExtendData
|
|
|
|
DEBUGVAR SessionID2
|
|
|
|
Var CreditAmount1 = ""
|
|
Var ServiceAmountFlow = ""
|
|
Var TelephoneNumber = "0899999999"
|
|
Var ServiceType = "coffee"
|
|
Var ECommerce = ""
|
|
Var ECommerce = ECommerce + PriceDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + DiscountDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SessionID2
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SelectDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.VendingCode
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.CodeNumber
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + "C:"
|
|
Var ECommerce = ECommerce + Seeker.IntVendingCampaign
|
|
Var ServiceParameter = "max"
|
|
Var ServiceCharge = 0
|
|
Var AccountType = "new"
|
|
Var testservice = "kbank"
|
|
Var tc = ""
|
|
Var GetScore = ""
|
|
Var OperatorName = ""
|
|
Var SessionID = ""
|
|
|
|
GetPayInfo TelephoneNumber ECommerce ServiceType ServiceParameter SessionID OperatorName CreditAmount1 ServiceAmountFlow GetScore tc
|
|
;Var Timeout = 0
|
|
Var ActionOKCase = 2
|
|
|
|
SAVELOG "back_to_main from line > 142."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
|
|
Else
|
|
|
|
SAVELOG "back_to_main from line > 147."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
EndIf
|
|
Else
|
|
EndIf
|
|
</EventActionError>
|
|
|
|
|
|
<Timeout> 1000 </Timeout>
|
|
<EventTimeout>
|
|
|
|
|
|
Var Timeout = Timeout + 1
|
|
|
|
If Timeout < 2 Then
|
|
If Game01Enable = 0 Then
|
|
If game_mode_enable = "true" Then
|
|
If BREW_CNT > 75 Then
|
|
SAVELOG "Button game enable from EventTimeout"
|
|
Var Game01Enable = 1
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
Var ButtonGamePressToPlayState = "Enable"
|
|
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
DEBUGVAR MachineState_Result
|
|
DEBUGVAR BREW_COUNT_DOWN_FROM_APP
|
|
|
|
|
|
If MOVE_CUP_TO_DOOR = "true" Then
|
|
Var MOVE_CUP_TO_DOOR = "false"
|
|
EndIf
|
|
|
|
Var CountDownBrewing = BREW_CNT
|
|
|
|
|
|
|
|
If SelectMenuBetweenBrewEnable1 = "Enable" Then
|
|
If Timeout = 5 Then
|
|
If show_eng = "true" Then
|
|
PlayLong "/mnt/sdcard/coffeevending/taobin_project/sound_eng/next_drink.mp3"
|
|
Else
|
|
|
|
Var PlaySoundLag = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/next_drink.mp3"
|
|
|
|
; Play Sound #zone
|
|
If SoundBackToSchoolEnable = 1 Then
|
|
|
|
If SoundBackToSchoolType = 1 Then
|
|
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/boy/"
|
|
EndIf
|
|
If SoundBackToSchoolType = 2 Then
|
|
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/girl/"
|
|
EndIf
|
|
Var PlaySoundLag = RootPathSoundBackToSchool + "next_drink.wav"
|
|
EndIf
|
|
|
|
PlayLong PlaySoundLag
|
|
EndIf
|
|
EndIf
|
|
If Timeout = 9 Then
|
|
If OpenFromCollectPoint3 = 0 Then
|
|
PlayLong "/mnt/sdcard/coffeevending/taobin_project/sounds/music1.mp3"
|
|
EndIf
|
|
EndIf
|
|
Else
|
|
If Timeout = 4 Then
|
|
If OpenFromCollectPoint3 = 0 Then
|
|
PlayLong "/mnt/sdcard/coffeevending/taobin_project/sounds/music1.mp3"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
; run test;
|
|
;I f CountDownBrewing = 40 Then
|
|
; Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
|
;EndIf
|
|
;I f CountDownBrewing = 0 Then
|
|
; ;Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
|
;EndIf
|
|
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
|
|
DEBUGVAR EnableDoubleCupNoError
|
|
DEBUGVAR HURR_FOREVER
|
|
If EnableDoubleCupNoError = 1 Then
|
|
If HURR_FOREVER = "F:1028" Then
|
|
Var SavePayDetail = HURR_FOREVER
|
|
Open "ROOT/taobin_project/xml/page_pickup_cup_from_error.xml"
|
|
EndIf
|
|
If HURR_FOREVER = "F:1029" Then
|
|
Var SavePayDetail = HURR_FOREVER
|
|
Open "ROOT/taobin_project/xml/page_pickup_cup_from_error.xml"
|
|
EndIf
|
|
If HURR_FOREVER = "F:1030" Then
|
|
Var SavePayDetail = HURR_FOREVER
|
|
Open "ROOT/taobin_project/xml/page_pickup_cup_from_error.xml"
|
|
EndIf
|
|
If HURR_FOREVER = "F:1031" Then
|
|
Var SavePayDetail = HURR_FOREVER
|
|
Open "ROOT/taobin_project/xml/page_pickup_cup_from_error.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If Timeout > 540 Then
|
|
SAVELOG "back_to_main from line > 217."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
EndIf
|
|
|
|
|
|
If BREW_CNT = 0 Then
|
|
If CountUpWhenBREW_CNT > 56 Then
|
|
Var CountUpWhenBREW_CNT = 0
|
|
Var drink_success_set = "-"
|
|
READ_FILE "/mnt/sdcard/coffeevending/log/drink-success" drink_success_set
|
|
DEBUGVAR drink_success_set
|
|
If drink_success_set = "1" Then
|
|
Var MachineState_Result = 1
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
Var CountUpWhenBREW_CNT = CountUpWhenBREW_CNT + 1
|
|
|
|
EndIf
|
|
|
|
If Timeout > 480 Then
|
|
SAVELOG " Timeout > 480"
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
|
|
If ChangeFlag = 1 Then
|
|
Var ChangeTimeout = ChangeTimeout + 1
|
|
EndIf
|
|
|
|
If waitAckPay = 2 Then
|
|
If Timeout > 10 Then
|
|
|
|
If Seeker.CodeChannel = 1 Then
|
|
Var SessionID2 = SelectSlot + ":"
|
|
Var SessionID2 = SessionID2 + ExtendData
|
|
|
|
DEBUGVAR SessionID2
|
|
|
|
Var CreditAmount1 = ""
|
|
Var ServiceAmountFlow = ""
|
|
Var TelephoneNumber = "0899999999"
|
|
Var ServiceType = "coffee"
|
|
Var ECommerce = ""
|
|
Var ECommerce = ECommerce + PriceDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + DiscountDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SessionID2
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + SelectDrink
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.VendingCode
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + Seeker.CodeNumber
|
|
Var ECommerce = ECommerce + "/"
|
|
Var ECommerce = ECommerce + "C:"
|
|
Var ECommerce = ECommerce + Seeker.IntVendingCampaign
|
|
Var ServiceParameter = "max"
|
|
Var ServiceCharge = 0
|
|
Var AccountType = "new"
|
|
Var testservice = "kbank"
|
|
Var tc = ""
|
|
Var GetScore = ""
|
|
Var OperatorName = ""
|
|
Var SessionID = ""
|
|
|
|
GetPayInfo TelephoneNumber ECommerce ServiceType ServiceParameter SessionID OperatorName CreditAmount1 ServiceAmountFlow GetScore tc
|
|
;Var Timeout = 0
|
|
EndIf
|
|
SAVELOG "back_to_main from line > 309."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If ChangeOK = 2 Then
|
|
If ActionOKCase = 0 Then
|
|
|
|
If Seeker.TNumberTaobinCredit = "" Then
|
|
Var TelephoneNumber = "0899999999"
|
|
Var PayO2 = ""
|
|
|
|
If Seeker.TNumberTaobinMember = "" Then
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinMember
|
|
EndIf
|
|
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinCredit
|
|
Var PayO2 = Seeker.CoffeePinNumber
|
|
EndIf
|
|
|
|
Var ServiceType = "coffee-refund"
|
|
Var ServiceCredit = SelectDrink
|
|
Var SuggestID = ""
|
|
Var SessionID2 = ""
|
|
|
|
Var PayDetail = ""
|
|
Var PayDetail2 = ""
|
|
Var VendingOrderID = Seeker.ORDER_ID
|
|
Var ServiceRefund = 0
|
|
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceRefund ServiceCharge Donate
|
|
|
|
Var waitAckPay = 2
|
|
Var Timeout = 5
|
|
Var ActionOKCase = 1
|
|
SAVELOG "ActionOKCase = change OK 2"
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
If ChangeTimeout > 30 Then
|
|
If ActionOKCase = 0 Then
|
|
|
|
If Seeker.TNumberTaobinCredit = "" Then
|
|
Var TelephoneNumber = "0899999999"
|
|
Var PayO2 = ""
|
|
|
|
If Seeker.TNumberTaobinMember = "" Then
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinMember
|
|
EndIf
|
|
|
|
Else
|
|
Var TelephoneNumber = Seeker.TNumberTaobinCredit
|
|
Var PayO2 = Seeker.CoffeePinNumber
|
|
EndIf
|
|
|
|
Var ServiceType = "coffee-refund"
|
|
Var ServiceCredit = SelectDrink
|
|
Var SuggestID = ""
|
|
Var SessionID2 = ""
|
|
|
|
Var PayDetail = ""
|
|
Var PayDetail2 = ""
|
|
Var VendingOrderID = Seeker.ORDER_ID
|
|
Var ServiceRefund = 0
|
|
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceRefund ServiceCharge Donate
|
|
|
|
Var waitAckPay = 2
|
|
Var Timeout = 5
|
|
Var ActionOKCase = 1
|
|
SAVELOG "ActionOKCase = change time out"
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
If ChangeOK = 3 Then
|
|
If ActionOKCase = 0 Then
|
|
|
|
Var ActionOKCase = 1
|
|
SAVELOG "ActionOKCase = change OK 3"
|
|
If Seeker.CodeChannel = 0 Then
|
|
SAVELOG "back_to_main from line > 391."
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
EndIf
|
|
|
|
Var waitAckPay = 2
|
|
Var Timeout = 5
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
If MachineState_Result = 1 Then
|
|
;Var MachineState_Result = 2
|
|
EndIf
|
|
|
|
If MachineState_Result = 1 Then
|
|
DEBUGVAR PaySuccessWithDaemonTask
|
|
|
|
If waitAckPay = 0 Then
|
|
|
|
Var waitAckPay = 0
|
|
Var Timeout = 0
|
|
|
|
If Seeker.PayWithQR = 0 Then
|
|
|
|
If Seeker.CreditCard = 1 Then
|
|
CashlessReq SUCCESS
|
|
EndIf
|
|
|
|
Else
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
__CMD "clear-stock-data" 0 "-" "-"
|
|
|
|
|
|
Var ServiceSuccess = "yes"
|
|
If waitAckPay = 0 Then
|
|
SAVELOG "waitAckPay=0"
|
|
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
If MachineState_Result = 2 Then
|
|
|
|
SAVELOG MachineStage
|
|
|
|
If ErrTimeout = 0 Then
|
|
Var ErrTimeout = 1
|
|
|
|
If Seeker.PayWithQR = 0 Then
|
|
|
|
If Seeker.CreditCard = 1 Then
|
|
CashlessReq FAIL
|
|
Var ChangeFlag = 1
|
|
Var CreditCardVoid = 1
|
|
Else
|
|
|
|
If Seeker.CodeChannel = 0 Then
|
|
If ChangeFlag = 0 Then
|
|
Var ChangeFlag = 1
|
|
|
|
If Seeker.StoreCreditFlag = 1 Then
|
|
Var ChangeOK = 2
|
|
Else
|
|
If GetFreeFromError = 1 Then
|
|
Var ChangeOK = 2
|
|
Else
|
|
Change ServiceAmount2
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
Else
|
|
|
|
If ChangeFlag = 0 Then
|
|
Var ChangeFlag = 1
|
|
Var ServiceAmount3 = ServiceAmount2 - Seeker.IntVendingCampaign
|
|
|
|
If Seeker.StoreCreditFlag = 1 Then
|
|
Var ChangeOK = 2
|
|
Else
|
|
Change ServiceAmount3
|
|
EndIf
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
Else
|
|
Var ChangeOK = 3
|
|
EndIf
|
|
|
|
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If MachineStage = "close-maintenance" Then
|
|
If MachineState_Result = 0 Then
|
|
SAVELOG "back_to_main from line > 663."
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
EndIf
|
|
|
|
If MachineStage = "drink-success" Then
|
|
Var MachineState_Result = 1
|
|
EndIf
|
|
|
|
If MachineStage = "drink-failed" Then
|
|
If RoadShow = "true" Then
|
|
Open "ROOT/taobin_project/xml/page_back_to_error.xml"
|
|
Else
|
|
SAVELOG " drink-failed...."
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
EndIf
|
|
|
|
If MachineState_Result > 0 Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1Text = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
; Close next button.
|
|
If CLOSE_ORDER_NOW = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1Text = "Invisible"
|
|
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
|
|
EndIf
|
|
|
|
If DisableFromPowerup = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1 = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1Text = "Invisible"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
EndIf
|
|
|
|
If SelectMenuBetweenBrewEnable1 = "Enable" Then
|
|
If SelectMenuBetweenBrewEnable1Blink = "Enable" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Else
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Enable"
|
|
EndIf
|
|
|
|
Else
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
|
|
EndIf
|
|
|
|
DEBUGVAR CountUpBrewing
|
|
|
|
; animation video loop
|
|
If AnimationOn = "true" Then
|
|
|
|
|
|
If adver_brewing_playing = 1 Then
|
|
|
|
DEBUGVAR adver_brewing_play_index
|
|
If adver_brewing_play_index = 2 Then
|
|
DEBUGVAR adver_brewing_count_down
|
|
|
|
If adver_brewing_count_down > 0 Then
|
|
Var adver_brewing_count_down = adver_brewing_count_down - 1
|
|
|
|
|
|
Var PictureFile = brew_txt1
|
|
|
|
EndIf
|
|
|
|
If adver_brewing_count_down = 0 Then
|
|
|
|
|
|
Var adver_brewing_play_index = 1
|
|
Var adver_brewing_count_down = 0
|
|
|
|
; Next video follow script.
|
|
TRY "ROOT/taobin_project/video/script3_brew.ev"
|
|
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
If adver_brewing_play_index = 1 Then
|
|
DEBUGVAR adver_brewing_count_down
|
|
DEBUGVAR brew_vdo2
|
|
|
|
If adver_brewing_count_down > 0 Then
|
|
Var adver_brewing_count_down = adver_brewing_count_down - 1
|
|
|
|
If brew_vdo2 = "" Then
|
|
Var VideoPlayFile = "ROOT/taobin_project/video/brewing_adv3.mp4"
|
|
Else
|
|
Var VideoPlayFile = brew_vdo2
|
|
EndIf
|
|
Var PictureFile = brew_txt2
|
|
|
|
EndIf
|
|
|
|
If adver_brewing_count_down = 0 Then
|
|
Var adver_brewing_play_index = 0
|
|
If adver_brewing_video_full_file_name = "" Then
|
|
Var adver_brewing_playing = 0
|
|
Else
|
|
Var adver_brewing_playing = 2
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
Else
|
|
If adver_brewing_playing = 2 Then
|
|
DEBUGVAR adver_brewing_video_full_file_name
|
|
If adver_brewing_video_full_file_name = "" Then
|
|
Var adver_brewing_playing = 0
|
|
Else
|
|
Var VideoPlayFile = adver_brewing_video_full_file_name
|
|
Var PictureFile = brew_txt2
|
|
Var PictureFileTextDesctionState = "Invisible"
|
|
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
Var SelectMenuBetweenBrewEnable1Text = "Invisible"
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
Else
|
|
|
|
Var CountUpBrewing = CountUpBrewing + 1
|
|
|
|
;CampaignEnable
|
|
Var SlotVideo = CountUpBrewing / AnimationVideoPlayTime
|
|
|
|
If PreviseStepVideo = SlotVideo Then
|
|
;SAVELOG SlotVideo
|
|
Else
|
|
Var PreviseStepVideo = SlotVideo
|
|
;SAVELOG PreviseStepVideo
|
|
;SAVELOG SlotVideo
|
|
;SAVELOG CountUpBrewing
|
|
|
|
;Var CountDownVideoTime = CountDownVideoTimeReload
|
|
|
|
Var StepVideo = SlotVideo + 2
|
|
|
|
;SAVELOG StepVideo
|
|
|
|
If StepVideo = 1 Then
|
|
Var videoID = VideoID1
|
|
EndIf
|
|
If StepVideo = 2 Then
|
|
Var videoID = VideoID2
|
|
EndIf
|
|
If StepVideo = 3 Then
|
|
Var videoID = VideoID3
|
|
EndIf
|
|
If StepVideo = 4 Then
|
|
Var videoID = VideoID4
|
|
EndIf
|
|
If StepVideo = 5 Then
|
|
Var videoID = VideoID5
|
|
EndIf
|
|
If StepVideo = 6 Then
|
|
Var videoID = VideoID6
|
|
EndIf
|
|
If StepVideo = 7 Then
|
|
Var videoID = VideoID7
|
|
EndIf
|
|
If StepVideo = 8 Then
|
|
Var videoID = VideoID8
|
|
EndIf
|
|
If StepVideo = 9 Then
|
|
Var videoID = VideoID9
|
|
EndIf
|
|
|
|
;SAVELOG videoID
|
|
|
|
If videoID = 0 Then
|
|
|
|
Else
|
|
If videoID = "---" Then
|
|
|
|
Else
|
|
|
|
Var VideoPlayFile = VideoPath
|
|
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
|
|
Var VideoPlayFile = VideoPlayFile + videoID
|
|
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
|
|
|
|
Var PictureFile = PicturePath
|
|
Var PictureFile = PictureFile + PictureBegin
|
|
Var PictureFile = PictureFile + videoID
|
|
Var PictureFile = PictureFile + PictureEnd
|
|
|
|
DEBUGVAR VideoPlayFile
|
|
DEBUGVAR PictureFile
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
; CampaignEnable
|
|
EndIf
|
|
; AnimationOn = true
|
|
|
|
|
|
If IgnoreNetCore = "true" Then
|
|
If CountDownBrewing = 0 Then
|
|
SAVELOG "CountDownBrewing=0"
|
|
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If RoadShow = "true" Then
|
|
Var SelectMenuBetweenBrewEnable1Blink = "Invisible"
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR EnableGetMoreStrawFileName
|
|
|
|
If EnableGetMoreStrawFileName = "PressForever" Then
|
|
DEBUGVAR GetMoreStrawCount
|
|
If GetMoreStrawCount > 0 Then
|
|
If EnableGetMoreStrawFileNameCountDown > 0 Then
|
|
Var EnableGetMoreStrawFileNameCountDown = EnableGetMoreStrawFileNameCountDown - 1
|
|
|
|
If EnableGetMoreStrawFileNameCountDown = 0 Then
|
|
Var EnableGetMoreStrawFileName = "Enable"
|
|
EndIf
|
|
EndIf
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
If GetMoreStrawCount <= 0 Then
|
|
If StrawProblemStatus = 1 Then
|
|
Var StrawProblemStatus = 2
|
|
|
|
|
|
Var bg_strawProblem_ST = "Enable"
|
|
|
|
|
|
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
Var EnableGetMoreStrawFileName = "Invisible"
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
If GetLidButtonCountDown > 0 Then
|
|
Var GetLidButtonCountDown = GetLidButtonCountDown - 1
|
|
DEBUGVAR GetLidButtonCountDown
|
|
EndIf
|
|
|
|
If DoorLidSensorDetect = "true" Then
|
|
Var DoorLidSensorDetect = "-"
|
|
Var GetLidButtonState = "Invisible"
|
|
Var bg_lidProblem_ST = "Invisible"
|
|
Var GetLidButtonCountDown = 0
|
|
EndIf
|
|
|
|
|
|
|
|
If GetLidButtonCountDown = 1 Then
|
|
Var GetLidButtonState = "Invisible"
|
|
Var bg_lidProblem_ST = "Enable"
|
|
Var EnableTopupCreditBetweenBrew = "Invisible"
|
|
;Var XStraw = 356
|
|
|
|
If EnableGetMoreStrawFileName = "Enable" Then
|
|
Var XStraw = 280
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
If ButtonGameCountDown > 0 Then
|
|
If ButtonGameCountDown = 1 Then
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
Var ButtonGamePressToPlayState = "Enable"
|
|
EndIf
|
|
Var ButtonGameCountDown = ButtonGameCountDown - 1
|
|
|
|
EndIf
|
|
|
|
|
|
If ButtonGameCountDownState = "Enable" Then
|
|
If BREW_CNT < 85 Then
|
|
If Game01Enable = 1 Then
|
|
SAVELOG "Game01Enable set zero event timeout 2"
|
|
EndIf
|
|
Var Game01Enable = 0
|
|
Var ButtonGameCountDownState = "Invisible"
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR ButtonGamePressToPlayState
|
|
DEBUGVAR BREW_CNT
|
|
If BREW_CNT > 60 Then
|
|
|
|
Else
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
If Game01Enable = 1 Then
|
|
SAVELOG "Game01Enable set zero event timeout"
|
|
EndIf
|
|
Var Game01Enable = 0
|
|
EndIf
|
|
|
|
|
|
|
|
Refresh
|
|
TimerReset
|
|
|
|
</EventTimeout>
|
|
|
|
<EventMachine>
|
|
|
|
|
|
If MachineStage = "drink-success" Then
|
|
Var MachineState_Result = 1
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR MachineStage
|
|
|
|
If MachineStage = "drink-failed" Then
|
|
If RoadShow = "true" Then
|
|
Open "ROOT/taobin_project/xml/page_back_to_error.xml"
|
|
Else
|
|
SAVELOG "Event Machine drink fail"
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
EndIf
|
|
|
|
Refresh
|
|
|
|
</EventMachine>
|
|
|
|
; this copy in file menu_brew2.xml and menu_lid_straw.xml
|
|
<EventChangeStatus>
|
|
If ChangeStatus = "payout-end" Then
|
|
If ChangeFlag = 1 Then
|
|
Var ChangeOK = 2
|
|
EndIf
|
|
EndIf
|
|
</EventChangeStatus>
|
|
|
|
|
|
|
|
<Image>
|
|
<X> 60 </X>
|
|
<Y> 1290 </Y>
|
|
<State> PictureFileTextDesctionState </State>
|
|
<Filename> PictureFile</Filename>
|
|
</Image>
|
|
|
|
|
|
<Video>
|
|
<X> 0 </X>
|
|
<Y> 380 </Y>
|
|
<Refresh> "Reload" </Refresh>
|
|
<Loop> "true" </Loop>
|
|
<Filename> VideoPlayFile </Filename>
|
|
</Video>
|
|
|
|
;include="ROOT/taobin_project/inc/video.inc"
|
|
|
|
|
|
|
|
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 1655 </Y>
|
|
<State> SelectMenuBetweenBrewEnable1Text </State>
|
|
<Filename> text_next_order </Filename>
|
|
</Image>
|
|
|
|
|
|
|
|
|
|
<Image>
|
|
<X> 835 </X>
|
|
<Y> 1735 </Y>
|
|
<State>SelectMenuBetweenBrewEnable1Blink</State>
|
|
<Filename> "ROOT/taobin_project/image/page_payment/arrow_1.png" </Filename>
|
|
<Image>
|
|
|
|
|
|
|
|
; zone show time remaining
|
|
<Image>
|
|
<X> 751 </X>
|
|
<Y> 413 </Y>
|
|
<Filename> IMG_CNT </Filename>
|
|
</Image>
|
|
;
|
|
<Text>
|
|
<X> XPosiShowCountDownBrew </X>
|
|
<Y> 470 </Y>
|
|
<Align> End </Align>
|
|
<Width> 153 </Width>
|
|
<Size> 88 </Size>
|
|
<Font> RobotoBold </Font>
|
|
<Color> 0x513C2F </Color>
|
|
<Value> ShowCountDownBrewing </Value>
|
|
</Text>
|
|
|
|
|
|
|
|
<EventUnitTest1>
|
|
Var BREW_COUNT_DOWN_FROM_APP = "off"
|
|
Var CountDownBrewing = 121
|
|
</EventUnitTest1>
|
|
<EventUnitTest2>
|
|
Var BREW_COUNT_DOWN_FROM_APP = "off"
|
|
Var CountDownBrewing = 2
|
|
</EventUnitTest2>
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
; Next Order
|
|
;
|
|
<Button>
|
|
<X> 792 </X>
|
|
<Y> 1787 </Y>
|
|
<State>SelectMenuBetweenBrewEnable1</State>
|
|
<Filename> next_pic_bn </Filename>
|
|
<FilenamePress> next_pic_bp </FilenamePress>
|
|
<EventClick>
|
|
If MachineState_Result = 0 Then
|
|
|
|
SAVELOG "User click next button"
|
|
|
|
Var Seeker = "next"
|
|
Var MultiPayEnable = "false"
|
|
;CoinPause
|
|
|
|
Open "ROOT/taobin_project/xml/page_catalog.xml"
|
|
EndIf
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 262 </X>
|
|
<Y> 1787 </Y>
|
|
<State>EnableTopupCreditBetweenBrew</State>
|
|
<Filename> topup_credit_bn </Filename>
|
|
<FilenamePress> topup_credit_bp </FilenamePress>
|
|
<EventClick>
|
|
If MachineState_Result = 0 Then
|
|
|
|
Var TelephoneNumber = Seeker.TNumberTaobinCredit
|
|
|
|
SAVELOG "User click topup-credit button"
|
|
Var Seeker = "topupCredit"
|
|
;CoinPause
|
|
Var topupCreditWithCash = "Enable"
|
|
|
|
If TelephoneNumber = "" Then
|
|
Open "ROOT/taobin_project/xml/page_topup_credit.xml"
|
|
Else
|
|
Open "ROOT/taobin_project/xml/page_topup_credit-ChooseNumber.xml"
|
|
EndIf
|
|
|
|
|
|
|
|
EndIf
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
; Button Straw, More request and report.
|
|
;
|
|
<Button>
|
|
<X> XStraw </X>
|
|
<Y> 1787 </Y>
|
|
<State> EnableGetMoreStrawFileName </State>
|
|
<Filename> bnGetMoreStrawFileName </Filename>
|
|
<FilenamePress> bpGetMoreStrawFileName </FilenamePress>
|
|
<Mode> "No" </Mode>
|
|
<EventClick>
|
|
Var EnableGetMoreStrawFileNameCountDown = 5
|
|
Var EnableGetMoreStrawFileName = "PressForever"
|
|
Var GetMoreStrawCount = GetMoreStrawCount - 1
|
|
|
|
DEBUGVAR GetMoreStrawCount
|
|
|
|
If GetMoreStrawCount > 0 Then
|
|
Machine Straw
|
|
EndIf
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 270 </X>
|
|
<Y> 1788 </Y>
|
|
<State>bg_strawProblem_ST</State>
|
|
<Filename> bnStrawProblemReport </Filename>
|
|
<FilenamePress> bpStrawProblemReport </FilenamePress>
|
|
<EventClick>
|
|
|
|
Var strawStr = "แจ้งปัญหาไม่ได้รับหลอด"
|
|
|
|
__CMD "straw-alert-disable" 0 strawStr "-"
|
|
__CMD "send-error-code" 1231 "-" "-"
|
|
Var bg_strawProblem_ST = "Invisible"
|
|
|
|
Refresh
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
<Button>
|
|
<X> 526 </X>
|
|
<Y> 1787 </Y>
|
|
<State> ButtonGameCountDownState </State>
|
|
<Filename> "ROOT/taobin_project/image/page_doing/bn_game_cnt_down.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page_doing/bn_game_cnt_down.png" </FilenamePress>
|
|
<EventClick>
|
|
|
|
</EventClick>
|
|
<Text>
|
|
<X> 0 </X>
|
|
<Y> 0 </Y>
|
|
<Size> 64 </Size>
|
|
<Align> Center </Align>
|
|
<Width> 240 </Width>
|
|
<Font> KanitBoldTTF </Font>
|
|
<Color> 0xFFFFFF </Color>
|
|
<State> ButtonGameCountDownState </State>
|
|
<Value> ButtonGameCountDown </Value>
|
|
</Text>
|
|
</Button>
|
|
|
|
<GIF>
|
|
<X> 526 </X>
|
|
<Y> 1680 </Y>
|
|
<Width> 241 </Width>
|
|
<Height> 204 </Height>
|
|
<State> ButtonGamePressToPlayState </State>
|
|
<Filename> "ROOT/taobin_project/app/game/TAMATIAN-01.gif" </Filename>
|
|
</GIF>
|
|
|
|
<Image>
|
|
<X> 526 </X>
|
|
<Y> 1680 </Y>
|
|
<Width> 241 </Width>
|
|
<Height> 204 </Height>
|
|
<State> ButtonGamePressToPlayState </State>
|
|
<EventClick>
|
|
DEBUGVAR Game01Enable
|
|
SAVELOG "Press play game"
|
|
Var Game01Enable = 0
|
|
Var ButtonGamePressToPlayState = "Invisible"
|
|
RunApp "com.NDF.taobin"
|
|
</EventClick>
|
|
</Image>
|
|
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
;
|
|
; Lid button, Get one and report
|
|
;
|
|
<Button>
|
|
<X> 20 </X>
|
|
<Y> 1788 </Y>
|
|
<State>bg_lidProblem_ST</State>
|
|
<Filename> bnLidProblemReport </Filename>
|
|
<FilenamePress> bpLidProblemReport </FilenamePress>
|
|
<EventClick>
|
|
|
|
Var lidStr = "แจ้งปัญหาไม่ได้รับฝา"
|
|
|
|
__CMD "lid-alert-disable" 0 lidStr "-"
|
|
__CMD "send-error-code" 1343 "-" "-"
|
|
Var bg_lidProblem_ST = "Invisible"
|
|
|
|
Refresh
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 22 </X>
|
|
<Y> 1787 </Y>
|
|
<State>GetLidButtonState</State>
|
|
<Mode> "No" </Mode>
|
|
<Filename> bn_get_lid_image </Filename>
|
|
<FilenamePress> bp_get_lid_image </FilenamePress>
|
|
<EventClick>
|
|
|
|
If GetLidButtonState = "Enable" Then
|
|
Machine Lid
|
|
Var GetLidButtonCountDown = 12
|
|
EndIf
|
|
|
|
Var GetLidButtonState = "Press"
|
|
|
|
Refresh
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
|
|
<EventUnitTest4>
|
|
; test drinkfail with phone number
|
|
Var TelephoneNumberProblem = "1234567890"
|
|
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
|
|
</EventUnitTest4>
|
|
|
|
</Popup>
|