420 lines
8.4 KiB
XML
420 lines
8.4 KiB
XML
<Popup>
|
|
<Cache> "Enable" </Cache>
|
|
<Width> 1080 </Width>
|
|
<Height> 1920 </Height>
|
|
<Background> "0xeae6e1" </Background>
|
|
<Sound> "ROOT/taobin_project/sounds/chaching.mp3" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventOpen>
|
|
; This page Seeker must curr
|
|
; On open
|
|
Var CountDownThankyou = 4
|
|
Var CountDownBrewing = BrewTime
|
|
Var CountUpBrewing = 0
|
|
SAVELOG BrewTime
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
Var Timeout = 0
|
|
Var ChangeFlag = 0
|
|
Var ErrTimeout = 0
|
|
Var ActionOKCase = 0
|
|
Var ChangeTimeout = 0
|
|
Var ChangeOK = 0
|
|
|
|
Var buttonRemoveCup = "Invisible"
|
|
|
|
Var MachineState_Result = 0
|
|
|
|
Var FailedCount = 0
|
|
Var ChangeAmountSum = 0
|
|
|
|
Var Tel_Confirm_Flag = 0
|
|
Var LastMakeDrinkResult = "-"
|
|
|
|
DEBUGVAR MIGGAZE2
|
|
DEBUGVAR MachineStage
|
|
DEBUGVAR NextOrderStatus
|
|
|
|
|
|
|
|
If show_eng = "true" Then
|
|
Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2_eng.png"
|
|
Var show_btp = "ROOT/taobin_project/image/bn_thai_lang_press.png"
|
|
Var show_btn = "ROOT/taobin_project/image/bn_thai_lang.png"
|
|
|
|
Var BottomText = PicturePath + "text_bottom_eng.png"
|
|
Else
|
|
Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2.png"
|
|
Var show_btp = "ROOT/taobin_project/image/bn_eng_lang_press.png"
|
|
Var show_btn = "ROOT/taobin_project/image/bn_eng_lang.png"
|
|
Var BottomText = PicturePath + "text_bottom_thai2.png"
|
|
EndIf
|
|
|
|
;DEBUGVAR StarwState
|
|
;DEBUGVAR LidState
|
|
DEBUGVAR BottomText
|
|
|
|
;If StarwState = "Press" Then
|
|
; Machine StrawWithDelay
|
|
; LED LedDoorLid Blink 255 255 255 255
|
|
;EndIf
|
|
;If LidState = "Press" Then
|
|
; Machine LidWithDelay
|
|
; LED LedDoorLid Blink 255 255 255 255
|
|
;EndIf
|
|
|
|
|
|
DEBUGVAR Seeker.TNumberTaobinCredit
|
|
DEBUGVAR TelephoneNumber
|
|
DEBUGVAR Seeker.StoreCreditFlag
|
|
|
|
|
|
|
|
Var SaveTheWorldST = "Invisible"
|
|
Var SaveTheWorldCount = 0
|
|
|
|
If Seeker = "curr" Then
|
|
SAVELOG "Call from thankyou Conti"
|
|
|
|
|
|
If PaySuccessWithDaemonTask = 1 Then
|
|
|
|
Else
|
|
If Seeker.get_a_straw = "Press" Then
|
|
Machine StrawOrder
|
|
Var LedLidBlink = "true"
|
|
Var SaveTheWorldCount = SaveTheWorldCount + 1
|
|
|
|
Var bg_lidProblem_ST = "Invisible"
|
|
EndIf
|
|
|
|
If Seeker.get_a_lid = "Press" Then
|
|
Machine LidOrder
|
|
Var LedLidBlink = "true"
|
|
Var SaveTheWorldCount = SaveTheWorldCount + 1
|
|
|
|
Var bg_lidProblem_ST = "Enable"
|
|
EndIf
|
|
|
|
Topping "Select" Seeker.selected_a_drink
|
|
|
|
; Set option toppinng and pack
|
|
Topping "Select1-ID" Seeker.topping1
|
|
Topping "Select2-ID" Seeker.topping2
|
|
Topping "Select3-ID" Seeker.topping3
|
|
|
|
Topping "Select6-ID" Seeker.topping6
|
|
|
|
; Pack
|
|
Topping "Pack" ExtendDataCurr
|
|
|
|
|
|
Topping "ClearNextOrder" "-"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
DEBUGVAR LastMakeDrinkResult
|
|
DEBUGVAR MachineStage
|
|
DEBUGVAR NextOrderStatus
|
|
|
|
; Show text and button for remove CUP.
|
|
If show_eng = "true" Then
|
|
Var DirImage2 = "ROOT/taobin_project/image/complete_en/"
|
|
Else
|
|
Var DirImage2 = "ROOT/taobin_project/image/complete/"
|
|
EndIf
|
|
|
|
Var txtDrinkOKState = "Invisible"
|
|
Var buttonRemoveCup = "Invisible"
|
|
|
|
Var CountUpDoorCupOpen = 0
|
|
|
|
Machine DoorClose
|
|
|
|
Var Timeout2 = 0
|
|
</EventOpen>
|
|
<Timeout> 1000 </Timeout>
|
|
<EventTimeout>
|
|
Var CountDownBrewing = CountDownBrewing - 1
|
|
|
|
DEBUGVAR MachineStage
|
|
DEBUGVAR HaveCup
|
|
DEBUGVAR CHECKCUP
|
|
DEBUGVAR CupChecking
|
|
DEBUGVAR MaybeHaveCup
|
|
DEBUGVAR DoorCupPosition
|
|
DEBUGVAR CountUpDoorCupOpen
|
|
DEBUGVAR Timeout
|
|
DEBUGVAR Timeout2
|
|
|
|
|
|
If PaySuccessWithDaemonTask = 1 Then
|
|
If MakeContinue = 1 Then
|
|
Var MakeContinue = 0
|
|
|
|
Var NextOrder = "false"
|
|
|
|
TransferVar "next" "curr"
|
|
Var Seeker = "curr"
|
|
SAVELOG "go to next order by MakeContinue = 1"
|
|
|
|
Var CountDownBrewing = BrewTime
|
|
Var CountUpBrewing = 0
|
|
SAVELOG BrewTime
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
|
|
Open "ROOT/taobin_project/xml/page_brewing3.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
Var Timeout2 = Timeout2 + 1
|
|
|
|
; Timeout2 10*60*2
|
|
If Timeout2 > 900 Then
|
|
SAVELOG "Timeout2 900"
|
|
|
|
SAVELOG "Make next order by take-cup with close-maintenance 2"
|
|
|
|
Var error_code_stop_now = 1221
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
|
|
Else
|
|
Var error_code_stop_now = 1296
|
|
EndIf
|
|
|
|
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
If HaveCup = "true" Then
|
|
Var Timeout = 0
|
|
Else
|
|
If CupOnArm = "true" Then
|
|
Var Timeout = 0
|
|
Else
|
|
If MaybeHaveCup = "true" Then
|
|
Var Timeout = 0
|
|
Else
|
|
Var Timeout = Timeout + 1
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
; detect cup
|
|
If DoorCupPosition = "bottom" Then
|
|
If HaveCup = "true" Then
|
|
If MaybeHaveCup = "true" Then
|
|
|
|
Else
|
|
If CupChecking = "true" Then
|
|
|
|
Else
|
|
Var buttonRemoveCup = "Enable"
|
|
Var txtDrinkOKState = "Enable"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
If CupOnArm = "true" Then
|
|
If MaybeHaveCup = "true" Then
|
|
|
|
Else
|
|
If CupChecking = "true" Then
|
|
|
|
Else
|
|
Var buttonRemoveCup = "Enable"
|
|
Var txtDrinkOKState = "Enable"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
Else
|
|
Var buttonRemoveCup = "Invisible"
|
|
|
|
Var Timeout = 0
|
|
|
|
Var CountUpDoorCupOpen = CountUpDoorCupOpen + 1
|
|
If CountUpDoorCupOpen > 80 Then
|
|
Var CountUpDoorCupOpen = 60
|
|
Machine DoorClose
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If MachineStage = "remove-cup" Then
|
|
Var buttonRemoveCup = "Enable"
|
|
Var txtDrinkOKState = "Enable"
|
|
EndIf
|
|
|
|
|
|
If MachineStage = "close-maintenance" Then
|
|
If stop_now = "true" Then
|
|
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
If RejectOrder = "true" Then
|
|
SAVELOG "RejectOrder page_thankyouConti"
|
|
|
|
Var error_code_stop_now = 1221
|
|
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
|
|
|
|
EndIf
|
|
|
|
If Timeout = 2 Then
|
|
|
|
|
|
Var VideoPlayFile = VideoPath
|
|
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
|
|
Var VideoPlayFile = VideoPlayFile + "1"
|
|
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
|
|
|
|
Var PictureFile = PicturePath
|
|
Var PictureFile = PictureFile + PictureBegin
|
|
Var PictureFile = PictureFile + "1"
|
|
Var PictureFile = PictureFile + PictureEnd
|
|
|
|
If CART_INDEX = 0 Then
|
|
DEBUGVAR Seeker.selected_a_drink
|
|
If NextOrderStatus = "Disable" Then
|
|
Var LastMakeDrinkResult = "fail"
|
|
Else
|
|
|
|
Var CountDownThankyou = 0
|
|
EndIf
|
|
Else
|
|
;Cart "MakeID" CART_INDEX
|
|
EndIf
|
|
|
|
|
|
|
|
EndIf
|
|
|
|
|
|
; run test;
|
|
If CountDownThankyou = 0 Then
|
|
|
|
; reset all var
|
|
DEBUGVAR MachineStage
|
|
SAVELOG "CountDownThankyou = 0"
|
|
|
|
Var CountDownBrewing = BrewTime
|
|
Var CountUpBrewing = 0
|
|
SAVELOG BrewTime
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
Var MachineState_Result = 0
|
|
If MachineStage = "show-menu" Then
|
|
If PaySuccessWithDaemonTask = 1 Then
|
|
|
|
Else
|
|
Var LastMakeDrinkResult = "-"
|
|
MakeDrinkV1 Seeker.selected_a_drink SelectSugarID
|
|
|
|
EndIf
|
|
Open "ROOT/taobin_project/xml/page_brewing3.xml"
|
|
EndIf
|
|
|
|
|
|
EndIf
|
|
|
|
If IceCleanStatus = "wait" Then
|
|
Var MachineMessageEnable = "Enable"
|
|
If IceCleanCount > 0 Then
|
|
Var MachineMessageValue = "กำลังเตรียมเครื่อง " + IceCleanCount
|
|
Else
|
|
Var MachineMessageValue = "กำลังเตรียมเครื่อง "
|
|
EndIf
|
|
Else
|
|
Var MachineMessageEnable = "Invisible"
|
|
EndIf
|
|
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
Refresh
|
|
TimerReset
|
|
</EventTimeout>
|
|
|
|
;<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> 375 </X>
|
|
<Y> 623 </Y>
|
|
<Width> 331 </Width>
|
|
<Height> 435 </Height>
|
|
<Filename> Seeker.PictureDrink </Filename>
|
|
</Image>
|
|
|
|
<Text>
|
|
<X> 0 </X>
|
|
<Y> 938 </Y>
|
|
<Width> 1080</Width>
|
|
<Align> Center </Align>
|
|
<Size> 72 </Size>
|
|
<Font> KanitMediumTTF </Font>
|
|
<Color> 0x513C2F </Color>
|
|
<Value> Seeker.showname </Value>
|
|
</Text>
|
|
|
|
<EventChangeStatus>
|
|
If ChangeStatus = "payout-end" Then
|
|
|
|
EndIf
|
|
</EventChangeStatus>
|
|
|
|
|
|
<Image>
|
|
<X> 77 </X>
|
|
<Y> 1378 </Y>
|
|
<State> txtDrinkOKState </State>
|
|
<Filename> Var( DirImage2 + "/txtDrinkOK.png" ) </Filename>
|
|
</Image>
|
|
|
|
|
|
<Button>
|
|
<X> 160 </X>
|
|
<Y> 1673 </Y>
|
|
<State> buttonRemoveCup </State>
|
|
;<Color> "0x00BDFF" </Color>
|
|
<Interval> 500 </Interval>
|
|
<Filename> Var( DirImage2 + "/bn_open_door.png" ) </Filename>
|
|
<FilenamePress> Var( DirImage2 + "/bp_open_door.png" ) </FilenamePress>
|
|
<EventClick>
|
|
Var buttonRemoveCup = "Invisible"
|
|
Machine RemoveCup
|
|
Machine DoorLidOpen
|
|
Refresh
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
<Text>
|
|
<X> 5 </X>
|
|
<Y> 1868 </Y>
|
|
<State> MachineMessageEnable</State>
|
|
<Size> 24 </Size>
|
|
<Align> Center </Align>
|
|
<Width> 1080 </Width>
|
|
<Font> RobotoRegular </Font>
|
|
<Color> 0xDE794E </Color>
|
|
<Value> MachineMessageValue </Value>
|
|
</Text>
|
|
|
|
|
|
</Popup>
|