Coffee-Multi
This commit is contained in:
parent
6190f8ad3a
commit
7b8d71b08a
62 changed files with 3674 additions and 177 deletions
933
xml/page_brewing3Multi.xml
Normal file
933
xml/page_brewing3Multi.xml
Normal file
|
|
@ -0,0 +1,933 @@
|
|||
<Popup>
|
||||
<Cache> "Enable" </Cache>
|
||||
<Width> 1080 </Width>
|
||||
<Height> 1920 </Height>
|
||||
<Background> "0xeae6e1" </Background>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventOpen>
|
||||
|
||||
; On open move from page_brewing3.xml
|
||||
|
||||
If CART_INDEX = 1 Then
|
||||
|
||||
Var ServiceAmount2 = CART1_PRICE
|
||||
Var SelectDrink = CART1_PDCODE
|
||||
Var ExtendData = CART1_ONTOP
|
||||
|
||||
EndIf
|
||||
|
||||
If CART_INDEX = 2 Then
|
||||
|
||||
Var ServiceAmount2 = CART2_PRICE
|
||||
Var SelectDrink = CART2_PDCODE
|
||||
Var ExtendData = CART2_ONTOP
|
||||
|
||||
EndIf
|
||||
|
||||
If CART_INDEX = 3 Then
|
||||
|
||||
Var ServiceAmount2 = CART3_PRICE
|
||||
Var SelectDrink = CART3_PDCODE
|
||||
Var ExtendData = CART3_ONTOP
|
||||
|
||||
EndIf
|
||||
|
||||
Var SessionID2 = "" + CART_INDEX
|
||||
Var SessionID2 = SessionID2 + ":"
|
||||
Var SessionID2 = SessionID2 + ExtendData
|
||||
|
||||
|
||||
|
||||
Var countClick2 = 0
|
||||
|
||||
Var Timeout = 0
|
||||
|
||||
Var PrintCoinAmount = 0
|
||||
|
||||
|
||||
If show_eng = "true" Then
|
||||
;Var DirImage = "ROOT/taobin_project/image/collect_point1_en"
|
||||
Play "ROOT/taobin_project/sound_eng/Wait_a_moment.mp3"
|
||||
Else
|
||||
;Var DirImage = "ROOT/taobin_project/image/collect_point1"
|
||||
Play "ROOT/taobin_project/sound_thai/thankyou.mp3"
|
||||
EndIf
|
||||
|
||||
Var waitAckPay = 0
|
||||
Var VendingTSIDTmp = ""
|
||||
Var VendingTSIDProblem = ""
|
||||
|
||||
|
||||
|
||||
|
||||
If PayWithQR = 1 Then
|
||||
Var VendingTSIDTmp = VendingTSID
|
||||
|
||||
If TNumberTaobinCredit = "" Then
|
||||
Var TelephoneNumber = "0899999999"
|
||||
Var PayO2 = ""
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinCredit
|
||||
Var PayO2 = CoffeePinNumber
|
||||
EndIf
|
||||
|
||||
Var PayType = ""
|
||||
|
||||
If ChangeFlag2 = 1 Then
|
||||
Var TelephoneNumber = "0899999999"
|
||||
Var PayO2 = ""
|
||||
Var VendingDiscount = 0
|
||||
Var VendingCampaign = 0
|
||||
Var ServiceType = "credit"
|
||||
Var SessionID2 = SelectDrink
|
||||
Var ServiceCredit = "coffee"
|
||||
Var PayReferenceTmp = PayReference
|
||||
Var PayReference = ""
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
Var PayReference = PayReferenceTmp
|
||||
Else
|
||||
|
||||
If StoreCreditFlag = 1 Then
|
||||
If CoinAmount > 0 Then
|
||||
Var VendingDiscount = 0
|
||||
Var VendingCampaign = 0
|
||||
Var ServiceType = "credit"
|
||||
Var SessionID2 = SelectDrink
|
||||
Var ServiceCredit = "coffee"
|
||||
Var PayReferenceTmp = PayReference
|
||||
Var PayReference = ""
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
Var PayReference = PayReferenceTmp
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If TNumberTaobinCredit = "" Then
|
||||
|
||||
If TNumberTaobinMember = "" Then
|
||||
Var TelephoneNumberProblem = ""
|
||||
Else
|
||||
Var TelephoneNumberProblem = TNumberTaobinMember
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var TelephoneNumberProblem = TNumberTaobinCredit
|
||||
EndIf
|
||||
|
||||
If TelephoneNumberProblem = "" Then
|
||||
;Var TelephoneNumberProblem = ""
|
||||
Var ShowTextNumber = "Enable"
|
||||
Var Tel_Confirm_State = "Disable"
|
||||
Else
|
||||
Var ShowTextNumber = "Invisible"
|
||||
Var Tel_Confirm_State = "Enable"
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
If TNumberTaobinMember = "" Then
|
||||
|
||||
Else
|
||||
If PayWithQR = 1 Then
|
||||
Var VendingTSID = VendingTSIDTmp
|
||||
Else
|
||||
Var VendingTSID = ""
|
||||
EndIf
|
||||
|
||||
|
||||
Var BmiYear = PointTaobinStr
|
||||
Var PointCrm = ""
|
||||
If FromConsent = 1 Then
|
||||
Var PointCrm = "pdpa1"
|
||||
EndIf
|
||||
Var GetScore = VendingTSID
|
||||
|
||||
If AddPointFlag = 0 Then
|
||||
Var AddPointFlag = 1
|
||||
If TaobinErrorNetwork = 0 Then
|
||||
AddData 11 TNumberTaobinMember BmiYear PointCrm GetScore
|
||||
Else
|
||||
Var PointCrm = ""
|
||||
AddData 14 TNumberTaobinMember BmiYear PointCrm GetScore
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
Var VendingTSID = ""
|
||||
EndIf
|
||||
|
||||
|
||||
If GetFreeFromError = 1 Then
|
||||
;Var GetFreeFromError = 0
|
||||
Var TelephoneNumberProblem = TelephoneNumberGOTFree
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
If LedLidBlink = "true" Then
|
||||
Var LedLidBlink = "no"
|
||||
LED LedDoorLid Blink 255 255 255 255
|
||||
EndIf
|
||||
|
||||
|
||||
Var PayType = "multi"
|
||||
|
||||
|
||||
</EventOpen>
|
||||
|
||||
|
||||
<EventActionOk>
|
||||
|
||||
|
||||
If ActionOKCase = 1 Then
|
||||
If CodeChannel = 1 Then
|
||||
Var SessionID2 = SelectSlot + ":"
|
||||
Var SessionID2 = SessionID2 + ExtendData
|
||||
|
||||
Var CreditAmount1 = ""
|
||||
Var ServiceAmountFlow = ""
|
||||
Var TelephoneNumber2 = "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 + "C00"
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + CodeNumber
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + "C"
|
||||
Var ServiceParameter = "max"
|
||||
Var ServiceCharge = 0
|
||||
Var AccountType = "new"
|
||||
Var testservice = "kbank"
|
||||
Var tc = ""
|
||||
Var GetScore = ""
|
||||
Var OperatorName = ""
|
||||
Var SessionID = ""
|
||||
|
||||
GetPayInfo TelephoneNumber2 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_drinkfail2Multi.xml"
|
||||
|
||||
Else
|
||||
|
||||
SAVELOG "back_to_main from line > 147."
|
||||
Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
EndIf
|
||||
|
||||
Else
|
||||
|
||||
|
||||
|
||||
EndIf
|
||||
|
||||
If waitAckPay = 1 Then
|
||||
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
|
||||
EndIf
|
||||
|
||||
</EventActionOk>
|
||||
|
||||
<EventActionError>
|
||||
If ActionOKCase = 1 Then
|
||||
If CodeChannel = 1 Then
|
||||
Var SessionID2 = SelectSlot + ":"
|
||||
Var SessionID2 = SessionID2 + ExtendData
|
||||
|
||||
Var CreditAmount1 = ""
|
||||
Var ServiceAmountFlow = ""
|
||||
Var TelephoneNumber2 = "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 + "C00"
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + CodeNumber
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + "C"
|
||||
Var ServiceParameter = "max"
|
||||
Var ServiceCharge = 0
|
||||
Var AccountType = "new"
|
||||
Var testservice = "kbank"
|
||||
Var tc = ""
|
||||
Var GetScore = ""
|
||||
Var OperatorName = ""
|
||||
Var SessionID = ""
|
||||
|
||||
GetPayInfo TelephoneNumber2 ECommerce ServiceType ServiceParameter SessionID OperatorName CreditAmount1 ServiceAmountFlow GetScore tc
|
||||
;Var Timeout = 0
|
||||
Var ActionOKCase = 2
|
||||
|
||||
SAVELOG "back_to_main from line > 204."
|
||||
Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
|
||||
Else
|
||||
SAVELOG "back_to_main from line > 173."
|
||||
Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
EndIf
|
||||
|
||||
Else
|
||||
|
||||
|
||||
|
||||
EndIf
|
||||
</EventActionError>
|
||||
|
||||
|
||||
<Timeout> 1000 </Timeout>
|
||||
<EventTimeout>
|
||||
|
||||
Var Timeout = Timeout + 1
|
||||
|
||||
If CountDownBrewing > 0 Then
|
||||
Var CountDownBrewing = CountDownBrewing - 1
|
||||
EndIf
|
||||
|
||||
If Simulation = "true" Then
|
||||
If CountDownBrewing = 0 Then
|
||||
;Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If Timeout = 4 Then
|
||||
PlayLong "/mnt/sdcard/coffeevending/taobin_project/sounds/music1.mp3"
|
||||
EndIf
|
||||
|
||||
; run test;
|
||||
;If CountDownBrewing = 40 Then
|
||||
; Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
;EndIf
|
||||
If CountDownBrewing = 0 Then
|
||||
;Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
EndIf
|
||||
|
||||
Var ShowCountDownBrewing = CountDownBrewing
|
||||
|
||||
|
||||
If Timeout > 540 Then
|
||||
SAVELOG "back_to_main from line > 217."
|
||||
Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
EndIf
|
||||
|
||||
|
||||
If Timeout > 480 Then
|
||||
Var MachineState_Result = 2
|
||||
EndIf
|
||||
|
||||
If ChangeFlag = 1 Then
|
||||
Var ChangeTimeout = ChangeTimeout + 1
|
||||
EndIf
|
||||
|
||||
If waitAckPay = 1 Then
|
||||
If Timeout > 60 Then
|
||||
Var VendingTSID = ""
|
||||
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If waitAckPay = 2 Then
|
||||
If Timeout > 10 Then
|
||||
|
||||
If CodeChannel = 1 Then
|
||||
Var SessionID2 = SelectSlot + ":"
|
||||
Var SessionID2 = SessionID2 + ExtendData
|
||||
|
||||
Var CreditAmount1 = ""
|
||||
Var ServiceAmountFlow = ""
|
||||
Var TelephoneNumber2 = "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 + "C00"
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + CodeNumber
|
||||
Var ECommerce = ECommerce + "/"
|
||||
Var ECommerce = ECommerce + "C"
|
||||
Var ServiceParameter = "max"
|
||||
Var ServiceCharge = 0
|
||||
Var AccountType = "new"
|
||||
Var testservice = "kbank"
|
||||
Var tc = ""
|
||||
Var GetScore = ""
|
||||
Var OperatorName = ""
|
||||
Var SessionID = ""
|
||||
|
||||
GetPayInfo TelephoneNumber2 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_drinkfail2Multi.xml"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If ChangeOK = 2 Then
|
||||
If ActionOKCase = 0 Then
|
||||
|
||||
If TNumberTaobinCredit = "" Then
|
||||
Var TelephoneNumber = "0899999999"
|
||||
Var PayO2 = ""
|
||||
|
||||
If TNumberTaobinMember = "" Then
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinMember
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinCredit
|
||||
Var PayO2 = CoffeePinNumber
|
||||
EndIf
|
||||
|
||||
|
||||
Var PayDetail = "1/" + HURR_FOREVER
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + SAMESALARY
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + NOBONUS
|
||||
|
||||
|
||||
|
||||
;Var PayDetail="1/F:404/500/1:430|1001:12|1002:15|1020:7|1042:5|1050:50|9501:1|9502:1|9701:1|9702:1"
|
||||
|
||||
Var ServiceType = "coffee"
|
||||
Var ServiceCredit = SelectDrink
|
||||
Var SuggestID = ""
|
||||
Var SessionID2 = ""
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
|
||||
|
||||
;If CodeChannel = 0 Then
|
||||
; SAVELOG "back_to_main from line > 315."
|
||||
; Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
;EndIf
|
||||
|
||||
Var waitAckPay = 2
|
||||
Var Timeout = 5
|
||||
Var ActionOKCase = 1
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If ChangeTimeout > 30 Then
|
||||
If ActionOKCase = 0 Then
|
||||
If TNumberTaobinCredit = "" Then
|
||||
Var TelephoneNumber = "0899999999"
|
||||
Var PayO2 = ""
|
||||
|
||||
If TNumberTaobinMember = "" Then
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinMember
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinCredit
|
||||
Var PayO2 = CoffeePinNumber
|
||||
EndIf
|
||||
|
||||
Var PayDetail = "1/" + HURR_FOREVER
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + SAMESALARY
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + NOBONUS
|
||||
|
||||
;Var PayDetail="1/F:404/500/1:430|1001:12|1002:15|1020:7|1042:5|1050:50|9501:1|9502:1|9701:1|9702:1"
|
||||
|
||||
|
||||
Var ServiceType = "coffee"
|
||||
Var ServiceCredit = SelectDrink
|
||||
Var SuggestID = ""
|
||||
Var SessionID2 = ""
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
|
||||
;If CodeChannel = 0 Then
|
||||
; SAVELOG "back_to_main from line > 357."
|
||||
; Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
;EndIf
|
||||
|
||||
Var waitAckPay = 2
|
||||
Var Timeout = 5
|
||||
Var ActionOKCase = 1
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If MachineState_Result = 1 Then
|
||||
If waitAckPay = 0 Then
|
||||
|
||||
Var waitAckPay = 0
|
||||
Var Timeout = 0
|
||||
|
||||
Var ProcessText = ""
|
||||
|
||||
If TNumberTaobinCredit = "" Then
|
||||
Var TelephoneNumber = "0899999999"
|
||||
Var PayO2 = ""
|
||||
|
||||
If TNumberTaobinMember = "" Then
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinMember
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var TelephoneNumber = TNumberTaobinCredit
|
||||
Var PayO2 = CoffeePinNumber
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
Var ServiceType = "coffee"
|
||||
Var ServiceCredit = SelectDrink
|
||||
Var SuggestID = ""
|
||||
|
||||
Var PayDetail = "1/" + HURR_FOREVER
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + SAMESALARY
|
||||
Var PayDetail = PayDetail + "/"
|
||||
Var PayDetail = PayDetail + NOBONUS
|
||||
|
||||
|
||||
;Var PayDetail="1/S:0/500/1:430|1001:12|1002:15|1020:7|1042:5|1050:50|9501:1|9502:1|9701:1|9702:1"
|
||||
|
||||
If GetFreeFromError = 1 Then
|
||||
Var CodeChannel = 1
|
||||
Var VendingCode = "C48"
|
||||
Var CodeNumber = "0000000000"
|
||||
Var VendingCampaign = ServiceAmount2
|
||||
EndIf
|
||||
|
||||
If PayWithQR = 0 Then
|
||||
If CodeChannel = 1 Then
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + CodeNumber
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + VendingCode
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + SelectDrink
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + BoxID
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + "S"
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + CodeNumber
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
Else
|
||||
If CodeChannel = 2 Then
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + ""
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + VendingCode
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + SelectDrink
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + BoxID
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + "S"
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
Var SessionID2 = SessionID2 + CodeNumber
|
||||
Var SessionID2 = SessionID2 + "/"
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
Else
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
Else
|
||||
|
||||
Pay ServiceType TelephoneNumber ServiceCredit SuggestID SessionID2 ServiceAmount2 ServiceCharge Donate
|
||||
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
Var ServiceSuccess = "yes"
|
||||
If waitAckPay = 0 Then
|
||||
|
||||
|
||||
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
If MachineState_Result = 2 Then
|
||||
If ErrTimeout = 0 Then
|
||||
Var ErrTimeout = 1
|
||||
|
||||
|
||||
If PayWithQR = 0 Then
|
||||
If CodeChannel = 0 Then
|
||||
If ChangeFlag = 0 Then
|
||||
Var ChangeFlag = 1
|
||||
|
||||
If StoreCreditFlag = 1 Then
|
||||
Var ChangeOK = 2
|
||||
Else
|
||||
Change ServiceAmount2
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
Else
|
||||
|
||||
If CoinAmount > 0 Then
|
||||
|
||||
If ChangeFlag = 0 Then
|
||||
Var ChangeFlag = 1
|
||||
Var ServiceAmount3 = ServiceAmount2 - IntVendingCampaign
|
||||
|
||||
If StoreCreditFlag = 1 Then
|
||||
Var ChangeOK = 2
|
||||
Else
|
||||
Change ServiceAmount3
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
Else
|
||||
Var ChangeOK = 2
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Var ChangeOK = 2
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_drinkfail.xml"
|
||||
|
||||
;OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
|
||||
|
||||
;OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/test_video_loop.xml"
|
||||
;Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_list.xml"
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If MachineStage = "show-menu" Then
|
||||
If MachineState_Result = 0 Then
|
||||
SAVELOG "back_to_main from line > 655."
|
||||
;Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
Var MachineState_Result = 1
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If MachineStage = "close-maintenance" Then
|
||||
If MachineState_Result = 0 Then
|
||||
SAVELOG "back_to_main from line > 663."
|
||||
Var MachineState_Result = 2
|
||||
;Open "ROOT/taobin_project/xml/page_drinkfail2Multi.xml"
|
||||
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
|
||||
Var MachineState_Result = 2
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
DEBUGVAR CountUpBrewing
|
||||
; animation video loop
|
||||
If AnimationOn = "true" Then
|
||||
Var CountUpBrewing = CountUpBrewing + 1
|
||||
|
||||
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
|
||||
|
||||
|
||||
If IgnoreNetCore = "true" Then
|
||||
If CountDownBrewing = 0 Then
|
||||
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
Refresh
|
||||
TimerReset
|
||||
|
||||
</EventTimeout>
|
||||
|
||||
<EventMachine>
|
||||
|
||||
;If MachineStage = "drink-success" Then
|
||||
; Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
;EndIf
|
||||
;If MachineStage = "drink-failed" Then
|
||||
; Open "ROOT/taobin_project/xml/page_drinkfail.xml"
|
||||
;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
|
||||
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>
|
||||
|
||||
<Video>
|
||||
<X> 0 </X>
|
||||
<Y> 380 </Y>
|
||||
<Width> 1080</Width>
|
||||
<Height> 840 </Height>
|
||||
<Refresh> "Reload" </Refresh>
|
||||
<Loop> "true" </Loop>
|
||||
<Filename> VideoPlayFile </Filename>
|
||||
</Video>
|
||||
|
||||
;<Image>
|
||||
;<X> 0 </X>
|
||||
;<Y> 0 </Y>
|
||||
;<Filename> "ROOT/taobin_project/image/ad_medium_2.png" </Filename>
|
||||
;</Image>
|
||||
|
||||
<Video>
|
||||
<X> 0 </X>
|
||||
<Y> 0 </Y>
|
||||
<Width> 1080</Width>
|
||||
<Height> 380 </Height>
|
||||
<Loop> "true" </Loop>
|
||||
<Filename> video_menu_0 </Filename>
|
||||
</Video>
|
||||
|
||||
|
||||
|
||||
<Image>
|
||||
<X> 60 </X>
|
||||
<Y> 1290 </Y>
|
||||
<Filename> PictureFile</Filename>
|
||||
</Image>
|
||||
|
||||
<Image>
|
||||
<X> 60 </X>
|
||||
<Y> 1649 </Y>
|
||||
<Filename> BottomText </Filename>
|
||||
</Image>
|
||||
|
||||
|
||||
|
||||
;
|
||||
<Image>
|
||||
<X> 751 </X>
|
||||
<Y> 413 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/page_doing/img2.png" </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>
|
||||
|
||||
;<Text>
|
||||
;<X> 100 </X>
|
||||
;<Y> 470 </Y>
|
||||
;<Align> End </Align>
|
||||
;<Width> 153 </Width>
|
||||
;<Size> 30 </Size>
|
||||
;<Font> RobotoBold </Font>
|
||||
;<Color> 0x513C2F </Color>
|
||||
;<Value> MachineStage </Value>
|
||||
;</Text>
|
||||
;
|
||||
|
||||
|
||||
;<Text>
|
||||
;<X> 0 </X>
|
||||
;<Y> 1880 </Y>
|
||||
;<Size> 30 </Size>
|
||||
;<Align> Center </Align>
|
||||
;<Width> 1080 </Width>
|
||||
;<Font> KanitThinTTF </Font>
|
||||
;<Color> 0x513C2F </Color>
|
||||
;<Value> MachineStage </Value>
|
||||
;</Text>
|
||||
|
||||
|
||||
;<Button>
|
||||
;<X> 0 </X>
|
||||
;<Y> 1860 </Y>
|
||||
;<Width> 200 </Width>
|
||||
;<Height> 50 </Height>
|
||||
;<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
;<Volume> SoundVolume </Volume>
|
||||
;<EventClick>
|
||||
; Var countClick = countClick + 1
|
||||
; If countClick = 3 Then
|
||||
;
|
||||
; EndIf
|
||||
;
|
||||
; If countClick = 5 Then
|
||||
; Var countClick = 0
|
||||
; MainMenu
|
||||
; EndIf
|
||||
; Refresh
|
||||
;</EventClick>
|
||||
;</Button>
|
||||
|
||||
<Button>
|
||||
<X> 870 </X>
|
||||
<Y> 1860 </Y>
|
||||
<Width> 200 </Width>
|
||||
<Height> 50 </Height>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var countClick2 = countClick2 + 1
|
||||
If countClick2 = 3 Then
|
||||
|
||||
EndIf
|
||||
|
||||
If countClick2 = 5 Then
|
||||
Var countClick2 = 0
|
||||
Var HaveCup = "true"
|
||||
Var MachineStage = "drink-success"
|
||||
Open "ROOT/taobin_project/xml/page_drinkok.xml"
|
||||
EndIf
|
||||
Refresh
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
</Popup>
|
||||
Loading…
Add table
Add a link
Reference in a new issue