test save

This commit is contained in:
kong 2021-05-28 10:41:11 +07:00
parent 84ad85816a
commit 43ddc95bac
8 changed files with 408 additions and 71 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -40,6 +40,7 @@
product_code.append('12-01-02-0007')
product_code.append('12-01-02-0008')
product_code.append('12-01-02-0009')
product_code.append('11-01-02-0009')
#product_code.append('')
menu_count = len( product_code)

View file

@ -2493,6 +2493,99 @@
<State> showengText </State>
<Value> $12-01-02-0009.descriptionE </Value>
</Text>
</Block>
; button i=25 11-01-02-0009
<Block>
<MarginLeft> 33 </MarginLeft>
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> $11-01-02-0009.Button </State>
<Button>
<State> $11-01-02-0009.Button </State>
<Filename> Var( "ROOT/taobin_project/image/page_drink/" + $11-01-02-0009.image ) </Filename>
<FilenamePress> Var( "ROOT/taobin_project/image/page_drink_press/" + $11-01-02-0009.image ) " </FilenamePress>
<FilenameDisable> Var( "ROOT/taobin_project/image/page_drink_disable/" + $11-01-02-0009.image ) " </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOnClick>
Var SelectDrink = $11-01-02-0009.Self
Var NameDrink = $11-01-02-0009.NameE
Var NameDrinkTH = $11-01-02-0009.Name
Var DrinkDescriptionTH = $11-01-02-0009.description
Var DrinkDescription = $11-01-02-0009.descriptionE
Var PriceDrink = $11-01-02-0009.Price
Var PictureDrink = "ROOT/taobin_project/image/page_drink_select/" + $11-01-02-0009.image
Topping "Load" SelectDrink
SAVELOG NameDrink
Var PriceShowValue = charOfBaht + PriceDrink
Var OpenFromXML = CurrentXMLFileName2
Open "ROOT/taobin_project/xml/page_topping_alter.xml"
</EventOnClick>
</Button>
<Text>
<X> 182 </X>
<Y> 12 </Y>
<State> ShowPrice </State>
<Align> "Hurr" </Align>
<Width>150</Width>
<Size> 27 </Size>
<Font> KanitTTF </Font>
<Color> 0xB78F24 </Color>
<Value> $11-01-02-0009.Price </Value>
</Text>
<Text>
<X> 164 </X>
<Y> 12 </Y>
<State> ShowPrice </State>
<Width>20</Width>
<Size> 27 </Size>
<Font> KanitTTF </Font>
<Color> 0xB78F24 </Color>
<Value> "฿"" </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 190 </Y>
<Size> 24 </Size>
<Width>220</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<State> showthaiText </State>
<Value> $11-01-02-0009.Name </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 246 </Y>
<Size> 14 </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<State> showthaiText </State>
<Value> $11-01-02-0009.description </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 190 </Y>
<Size> 22 </Size>
<Width>220</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<State> showengText </State>
<Value> $11-01-02-0009.NameE </Value>
</Text>
<Text>
<X> 16 </X>
<Y> 246 </Y>
<Size> 14 </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<State> showengText </State>
<Value> $11-01-02-0009.descriptionE </Value>
</Text>
</Block>
</FrameScroll>

View file

@ -6,48 +6,7 @@
<Volume> SoundVolume </Volume>
<EventOpen>
; On open
Var LidState = Lid1Status
;Lid1Status
Var StarwState = "Enable"
Var LidStrawCountDown = 15
Var VideoPath = "/mnt/sdcard/coffeevending/taobin_project/animation01/"
Var VideoFileBegin = "TaoBin2_draft02_art"
Var VideoFileEnd = ".mp4"
Var PicturePath = "/mnt/sdcard/coffeevending/taobin_project/image/page_doing/"
Var PictureBegin = "txt_"
If Lid1Status = "Disable" Then
Var LidState = "Invisible"
EndIf
If show_eng = "true" Then
Var DirImage = "ROOT/taobin_project/image/page_lid_straw_en"
Var PictureEnd = "_en.png"
Var BottomText = PicturePath + "text_bottom_eng.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Wait_a_moment.mp3"
Else
Var DirImage = "ROOT/taobin_project/image/page_lid_straw"
Var PictureEnd = ".png"
Var BottomText = PicturePath + "text_bottom_thai2.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "ROOT/sounds/pleaseWait.wav"
EndIf
Var CountUpBrewing = BrewTime - CountDownBrewing
@ -80,11 +39,65 @@
Var PictureFile = PictureFile + PictureEnd
Var VideoPath = "/mnt/sdcard/coffeevending/taobin_project/animation01/"
Var VideoFileBegin = "TaoBin2_draft02_art"
Var VideoFileEnd = ".mp4"
Var PicturePath = "/mnt/sdcard/coffeevending/taobin_project/image/page_doing/"
Var PictureBegin = "txt_"
If lidAndStrawOldPageIgnore = "true" Then
Var lidAndStrawOldPageIgnore = "false"
If StarwState = "Press" Then
Machine Straw
LED LedDoorLid Blink 255 255 255 255
EndIf
If LidState = "Press" Then
Machine Lid
LED LedDoorLid Blink 255 255 255 255
EndIf
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
Var LidState = Lid1Status
;Lid1Status
Var StarwState = "Enable"
Var LidStrawCountDown = 15
If Lid1Status = "Disable" Then
Var LidState = "Invisible"
EndIf
If show_eng = "true" Then
Var DirImage = "ROOT/taobin_project/image/page_lid_straw_en"
Var PictureEnd = "_en.png"
Var BottomText = PicturePath + "text_bottom_eng.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Wait_a_moment.mp3"
Else
Var DirImage = "ROOT/taobin_project/image/page_lid_straw"
Var PictureEnd = ".png"
Var BottomText = PicturePath + "text_bottom_thai2.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "ROOT/sounds/pleaseWait.wav"
EndIf
STRCONTAIN "9701" BrewParam IgnoreLidStraw
DEBUGVAR BrewParam

View file

@ -38,14 +38,6 @@
DEBUGVAR LidState
If StarwState = "Press" Then
Machine Straw
LED LedDoorLid Blink 255 255 255 255
EndIf
If LidState = "Press" Then
Machine Lid
LED LedDoorLid Blink 255 255 255 255
EndIf
</EventOpen>

View file

@ -10,6 +10,9 @@
DEBUGVAR video_menu_0
Var DisableUsingCode = "false"
Var ShowLidStraw = "Invisible"
Var ShowLidOnly = "Invisible"
Var ShowCollagenOnly = "Invisible"
; On open
Var lidAndStrawOldPageIgnore = "true"
@ -36,8 +39,9 @@
Var topping1 = "1"
Var topping2 = "31"
Var topping3 = "31"
Var BugFlag = 0
@ -95,13 +99,15 @@
</EventOpen>
<Timeout> 2000 </Timeout>
<EventTimeout>
DEBUGVAR Timeout
Var Timeout = Timeout + 1
If Timeout > 10 Then
If Timeout > 20 Then
Var Timeout = 0
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
TimerReset
</EventTimeout>
@ -205,6 +211,9 @@
DEBUGVAR toppingID3Default
DEBUGVAR toppingID2price2
DEBUGVAR toppingID3price2
DEBUGVAR BrewParam
If BugFlag = 1 Then
@ -335,15 +344,15 @@
Var SugarState4 = "Enable"
Var SugarState5 = "Enable"
If toppingID1index3 = toppingID1Default Then
If toppingID1index1 = toppingID1Default Then
Var SugarState3 = "PressForever"
EndIf
If toppingID1index4 = toppingID1Default Then
If toppingID1index2 = toppingID1Default Then
Var SugarState4 = "PressForever"
EndIf
If toppingID1index5 = toppingID1Default Then
If toppingID1index3 = toppingID1Default Then
Var SugarState5 = "PressForever"
EndIf
@ -377,7 +386,7 @@
Var ShowCollagenOnly = "Enable"
Var BugFlag = 1
@ -394,16 +403,25 @@
EndIf
Refresh
Var collagenShow = "true"
;-BEGIN shot layout
Var topping3 = toppingID3Default
Var shot_h_layout = 218
If TOPPING2 = "shot coffee" Then
Var ShotCoffeeBG = "Enable"
Var showShotEnable = "Enable"
DEBUGVAR TOPPING3
If TOPPING3 = "Collagen" Then
DEBUGVAR TOPPING2
Var ShowCollagenOnly = "Invisible"
Var backGroundAddExtra = DirImage + "/img_ontop_shot_col.png"
Var shot_h_layout = 310
EndIf
Refresh
EndIf
@ -422,10 +440,25 @@
Var ShotCoffeePremium = "Enable"
Var showShotEnable = "Enable"
If TOPPING3 = "Collagen" Then
Var ShowCollagenOnly = "Invisible"
Var backGroundAddExtra = DirImage + "/img_ontop_shot_col.png"
Var shot_h_layout = 310
EndIf
DEBUGVAR TOPPING2
Refresh
EndIf
;-END
If TOPPING3 = "Collagen" Then
Var CollagenState = "Enable"
Else
Var CollagenState = "Invisible"
Var ShowCollagenOnly = "Invisible"
EndIf
SAVELOG ToppingGotoPayment
@ -766,7 +799,7 @@
;-BEGIN shot layout
<Block>
<Width> 986 </Width>
<Height> 224 </Height>
<Height> shot_h_layout </Height>
<MarginTop> 5 </MarginTop>
<State> ShotCoffeeBG </State>
<Image>
@ -788,7 +821,7 @@
If showShotEnable = "Press" Then
Var showShotEnable = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID2price2
Var topping2 = toppingID2index1
Var DisableUsingCode = "false"
Else
@ -798,6 +831,7 @@
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkNoTop = PriceDrinkTmp
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
SAVELOG PriceDrinkTmp
@ -821,16 +855,19 @@
If showShotEnable = "Press" Then
Var showShotEnable = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID2price2
Var topping2 = toppingID2index1
Var DisableUsingCode = "false"
Else
Var showShotEnable = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID2price2
Var topping2 = toppingID2index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkNoTop = PriceDrinkTmp
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
@ -839,6 +876,69 @@
</EventClick>
</Button>
; Collagen left
<Button>
<X> 48 </X>
<Y> 186 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_img_collagen.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_img_collagen.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID3price2
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
Var PriceDrinkNoTop = PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
<Button>
<X> 881 </X>
<Y> 189 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_checkbox.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_checkbox.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID3price2
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
Var PriceDrinkNoTop = PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
</Block>
;-END
;
@ -875,7 +975,7 @@
If showShotEnable = "Press" Then
Var showShotEnable = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID2price2
Var topping2 = toppingID2index1
Var DisableUsingCode = "false"
Else
@ -885,6 +985,8 @@
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkNoTop = PriceDrinkTmp
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
SAVELOG PriceDrinkTmp
@ -908,7 +1010,7 @@
If showShotEnable = "Press" Then
Var showShotEnable = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID2price2
Var topping2 = toppingID2index1
Var DisableUsingCode = "false"
Else
@ -918,6 +1020,8 @@
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkNoTop = PriceDrinkTmp
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
@ -926,6 +1030,68 @@
</EventClick>
</Button>
; Collagen left
<Button>
<X> 48 </X>
<Y> 186 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_img_collagen.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_img_collagen.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID3price2
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
Var PriceDrinkNoTop = PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
<Button>
<X> 881 </X>
<Y> 189 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_checkbox.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_checkbox.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop - toppingID3price2
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
Var PriceDrinkNoTop = PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
</Block>
;-END
;
@ -937,13 +1103,85 @@
;
;
;
;-BEGIN Collagen
<Block>
<Width> 986 </Width>
<Height> 242 </Height>
<MarginTop> 5 </MarginTop>
<State> ShowCollagenOnly </State>
<Image>
<State> "Enable" </State>
<Filename> Var( DirImage + "/img_ontop_collagen.png" ) </Filename>
</Image>
; straw left
<Button>
<X> 48 </X>
<Y> 110 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_img_collagen.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_img_collagen.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
<Button>
<X> 881 </X>
<Y> 105 </Y>
<State> CollagenState </State>
<Mode> "No" </Mode>
<Filename> "ROOT/taobin_project/image/topping/bn_checkbox.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/topping/bp_checkbox.png" </FilenamePress>
<EventClick>
SAVELOG CollagenState
If CollagenState = "Press" Then
Var CollagenState = "Enable"
Var PriceDrinkTmp = PriceDrinkNoTop
Var topping3 = toppingID3index1
Var DisableUsingCode = "false"
Else
Var CollagenState = "Press"
Var PriceDrinkTmp = PriceDrinkNoTop + toppingID3price2
Var topping3 = toppingID3index2
Var DisableUsingCode = "true"
EndIf
Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp
DEBUGVAR PriceDrinkTmp
Refresh
</EventClick>
</Button>
</Block>
;- END
;
;
;
;-BEGIN Lid straw
<Block>
<Width> 986 </Width>
<Height> 232 </Height>
<MarginTop> 5 </MarginTop>
<MarginTop> 10 </MarginTop>
<State> ShowLidOnly </State>
<Image>
<State> "Enable" </State>
@ -1004,7 +1242,7 @@
<Block>
<Width> 986 </Width>
<Height> 274 </Height>
<MarginTop> 5 </MarginTop>
<MarginTop> 10 </MarginTop>
<State> ShowLidStraw </State>
<Image>
<Filename> Var( DirImage + "/block_strawlid.png" ) </Filename>