add enable credit for mys
This commit is contained in:
parent
88964df4ca
commit
3449fcc9cb
3 changed files with 371 additions and 0 deletions
327
xml/page_enable_credit_card.xml
Normal file
327
xml/page_enable_credit_card.xml
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
<Page>
|
||||
<X> 0 </X>
|
||||
<Y> 380 </Y>
|
||||
<Width> 1080 </Width>
|
||||
<Height> 1920 </Height>
|
||||
<Background> "0xeae6e1" </Background>
|
||||
<Volume> SoundVolume </Volume>
|
||||
|
||||
<EventOpen>
|
||||
|
||||
Var PassPhrase = ""
|
||||
Var showStatusText = ""
|
||||
|
||||
;try cache
|
||||
|
||||
If EnableCreditCard = "" Then
|
||||
CacheVarStr "get" EnableCreditCard
|
||||
Else
|
||||
CacheVarStr "put" EnableCreditCard
|
||||
EndIf
|
||||
|
||||
If EnableCreditCard = "true" Then
|
||||
Var showStatusText = "OK"
|
||||
Else
|
||||
Var showStatusText = "OFF"
|
||||
EndIf
|
||||
|
||||
</EventOpen>
|
||||
|
||||
|
||||
<Timeout>1000</Timeout>
|
||||
<EventTimeout>
|
||||
Var Timeout = Timeout + 1
|
||||
|
||||
If Timeout > 20 Then
|
||||
|
||||
Var showStatusText = ""
|
||||
|
||||
Open "ROOT/taobin_project/xml/vending_info.xml"
|
||||
EndIf
|
||||
|
||||
Refresh
|
||||
TimerReset
|
||||
</EventTimeout>
|
||||
|
||||
; back
|
||||
<Button>
|
||||
<X> 19 </X>
|
||||
<Y> 420 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/page2/bn_back_arrow.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/page2/bn_back_arrow.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Open "ROOT/taobin_project/xml/vending_info.xml"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Image>
|
||||
<X> 158 </X>
|
||||
<Y> 465 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/img_popup1.png" </Filename>
|
||||
</Image>
|
||||
|
||||
<Button>
|
||||
<X> 333 </X>
|
||||
<Y> 886 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_1.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_1.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "1"
|
||||
TimerReset
|
||||
Refresh
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 477 </X>
|
||||
<Y> 886 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_2.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_2.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "2"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 620 </X>
|
||||
<Y> 886 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_3.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_3.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "3"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 333 </X>
|
||||
<Y> 1030 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_4.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_4.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "4"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 477 </X>
|
||||
<Y> 1030 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_5.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_5.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "5"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 620 </X>
|
||||
<Y> 1030 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_6.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_6.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "6"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 333 </X>
|
||||
<Y> 1173 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_7.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_7.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "7"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 477 </X>
|
||||
<Y> 1173 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_8.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_8.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "8"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 620 </X>
|
||||
<Y> 1173 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_9.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_9.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "9"
|
||||
TimerReset
|
||||
Refresh
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 477 </X>
|
||||
<Y> 1317 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_0.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_0.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Var PassPhrase = PassPhrase + "0"
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> 620 </X>
|
||||
<Y> 1317 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/collectiing/bn_back-1.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collectiing/bp_back-1.png" </FilenamePress>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
|
||||
Var Timeout = 0
|
||||
Var showStatusText = ""
|
||||
Trim PassPhrase -1
|
||||
|
||||
StrLen PassPhrase PassLen
|
||||
|
||||
If PassLen < 10 Then
|
||||
;Var Tel_Confirm_State = "Invisible"
|
||||
EndIf
|
||||
|
||||
|
||||
If PassLen = 0 Then
|
||||
Var ShowTextNumber = "Enable"
|
||||
EndIf
|
||||
|
||||
Refresh
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 577 </X>
|
||||
<Y> 1471 </Y>
|
||||
<State> "Enable" </State>
|
||||
<Filename> "ROOT/taobin_project/image/collect_point1_en/bn_positive.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/collect_point1_en/bp_positive.png" </FilenamePress>
|
||||
<FilenameDisable> "ROOT/taobin_project/image/collect_point1_en/bn_positive.png" </FilenameDisable>
|
||||
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
|
||||
; Validate
|
||||
|
||||
If PassPhrase = "16583" Then
|
||||
Var EnableCreditCard = "true"
|
||||
Var showStatusText = "OK"
|
||||
|
||||
Refresh
|
||||
Else
|
||||
|
||||
If PassPhrase = "38561" Then
|
||||
Var EnableCreditCard = ""
|
||||
Var showStatusText = "OFF"
|
||||
|
||||
Refresh
|
||||
|
||||
Else
|
||||
|
||||
Var Timeout = 0
|
||||
Var showStatusText = "Incorrect"
|
||||
Var PassPhrase = ""
|
||||
TimerReset
|
||||
Refresh
|
||||
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
<Text>
|
||||
<X> 0 </X>
|
||||
<Y> 673 </Y>
|
||||
<Width> 1080 </Width>
|
||||
<Align> Center </Align>
|
||||
<Size> 62 </Size>
|
||||
<Font> RobotoBlack </Font>
|
||||
<Color> 0x513C2F </Color>
|
||||
<Value> PassPhrase </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
<Text>
|
||||
<X> 0 </X>
|
||||
<Y> 473 </Y>
|
||||
<Width> 1080 </Width>
|
||||
<Align> Center </Align>
|
||||
<Size> 72 </Size>
|
||||
<Font> RobotoBlack </Font>
|
||||
<Color> 0xFF0000 </Color>
|
||||
<Value> showStatusText </Value>
|
||||
</Text>
|
||||
|
||||
</Page>
|
||||
|
|
@ -451,6 +451,15 @@
|
|||
__CMD "prepar-cup-from-order" 0 "-" "-"
|
||||
|
||||
;Var PayState5 = "Enable"
|
||||
|
||||
|
||||
If EnableCreditCard = "true" Then
|
||||
Var PayState5 = "Enable"
|
||||
Else
|
||||
Var PayState5 = "Disable"
|
||||
EndIf
|
||||
|
||||
|
||||
DEBUGVAR PayState5
|
||||
;Open "ROOT/taobin_project/xml/page_page_camera.xml"
|
||||
|
||||
|
|
|
|||
|
|
@ -805,6 +805,41 @@
|
|||
</Text>
|
||||
|
||||
|
||||
<Image>
|
||||
<X> info2_startX </X>
|
||||
<Y> info_12Y </Y>
|
||||
<Filename> "ROOT/taobin_project/image/tab_1.png" </Filename>
|
||||
<State> eval(
|
||||
If CountryName = "Malaysia" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
) </State>
|
||||
<EventClick>
|
||||
|
||||
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_enable_credit_card.xml"
|
||||
|
||||
</EventClick>
|
||||
</Image>
|
||||
|
||||
<Text>
|
||||
<X> info2_text_startX </X>
|
||||
<Y> info_text_12Y </Y>
|
||||
<Size> 30 </Size>
|
||||
<Font> fontType1 </Font>
|
||||
<Color> 0x000000 </Color>
|
||||
<State> eval(
|
||||
If CountryName = "Malaysia" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
) </State>
|
||||
<Value> "Enable CreditCard" </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
;<QRCode>
|
||||
;<X> 930 </X>
|
||||
;<Y> info_cancel_y </Y>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue