taobin_project/xml/menu_list_show_less.pml
2020-09-14 15:09:29 +07:00

1021 lines
15 KiB
Promela

<?hurr
menu_count = 40
x_start_menu = 15
y_start_menu = 32
row1x = x_start_menu
row2x = row1x + 212
row3x = row2x + 212
row4x = row3x + 212
row5x = row4x + 212
row6x = row5x + 212
row7x = row6x + 212
row1y = y_start_menu
row2y = row1y + 222
row3y = row2y + 222
row4y = row3y + 222
row5y = row4y + 222
row6y = row5y + 222
row7y = row6y + 222
row8y = row7y + 222
x_button = [
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x,
row1x,
row2x,
row3x,
row4x,
row5x
]
y_button = [
row1y,
row1y,
row1y,
row1y,
row1y,
row2y,
row2y,
row2y,
row2y,
row2y,
row3y,
row3y,
row3y,
row3y,
row3y,
row4y,
row4y,
row4y,
row4y,
row4y,
row5y,
row5y,
row5y,
row5y,
row5y,
row6y,
row6y,
row6y,
row6y,
row6y,
row7y,
row7y,
row7y,
row7y,
row7y,
row8y,
row8y,
row8y,
row8y,
row8y
]
textrow1y = 300
rowT1x = x_start_menu
rowT2x = rowT1x + 212
rowT3x = rowT2x + 212
rowT4x = rowT3x + 212
rowT5x = rowT4x + 212
rowT6x = rowT5x + 212
rowT7x = rowT6x + 212
rowT8x = rowT7x + 212
rowT1y = y_start_menu
rowT2y = rowT1y + 222
rowT3y = rowT2y + 222
rowT4y = rowT3y + 222
rowT5y = rowT4y + 222
rowT6y = rowT5y + 222
rowT7y = rowT6y + 222
rowT8y = rowT7y + 222
rowT1y += 140
rowT2y += 140
rowT3y += 140
rowT4y += 140
rowT5y += 140
rowT6y += 140
rowT7y += 140
rowT8y += 140
rowP1y = y_start_menu
rowP2y = rowP1y + 222
rowP3y = rowP2y + 222
rowP4y = rowP3y + 222
rowP5y = rowP4y + 222
rowP6y = rowP5y + 222
rowP7y = rowP6y + 222
rowP8y = rowP7y + 222
rowP1y += 170
rowP2y += 170
rowP3y += 170
rowP4y += 170
rowP5y += 170
rowP6y += 170
rowP7y += 170
rowP8y += 170
rowD1x = x_start_menu
rowD2x = rowD1x + 212
rowD3x = rowD2x + 212
rowD4x = rowD3x + 212
rowD5x = rowD4x + 212
rowD6x = rowD5x + 212
rowD7x = rowD6x + 212
rowD8x = rowD7x + 212
rowD1x += 120
rowD2x += 120
rowD3x += 120
rowD4x += 120
rowD5x += 120
rowD6x += 120
rowD7x += 120
rowD8x += 120
# 222
rowD1y = y_start_menu
rowD2y = rowD1y + 222
rowD3y = rowD2y + 222
rowD4y = rowD3y + 222
rowD5y = rowD4y + 222
rowD6y = rowD5y + 222
rowD7y = rowD6y + 222
rowD8y = rowD7y + 222
rowD1y += 170
rowD2y += 170
rowD3y += 170
rowD4y += 170
rowD5y += 170
rowD6y += 170
rowD7y += 170
rowD8y += 170
rowR1y = y_start_menu
rowR2y = rowR1y + 222
rowR3y = rowR1y + 222
rowR4y = rowR1y + 222
rowR5y = rowR1y + 222
rowR6y = rowR1y + 222
rowR7y = rowR1y + 222
rowR8y = rowR1y + 222
rowR1y += 180
rowR2y += 180
rowR3y += 180
rowR4y += 180
rowR5y += 180
rowR6y += 180
rowR7y += 180
rowR8y += 180
# 212
rowS1x = x_start_menu
rowS2x = rowS1x + 212
rowS3x = rowS2x + 212
rowS4x = rowS3x + 212
rowS5x = rowS4x + 212
rowS6x = rowS5x + 212
rowS7x = rowS6x + 212
rowS8x = rowS7x + 212
rowS1x += 70
rowS2x += 70
rowS3x += 70
rowS4x += 70
rowS5x += 70
rowS6x += 70
rowS7x += 70
rowS8x += 70
rowS1y = y_start_menu + 160
rowS2y = rowS1y + 222
rowS3y = rowS2y + 222
rowS4y = rowS3y + 222
rowS5y = rowS4y + 222
rowS6y = rowS5y + 222
rowS7y = rowS6y + 222
rowS8y = rowS7y + 222
rowS1y += 160
rowS2y += 160
rowS3y += 160
rowS4y += 160
rowS5y += 160
rowS6y += 160
rowS7y += 160
rowS8y += 160
x_text_1 = [
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x,
rowT1x,
rowT2x,
rowT3x,
rowT4x,
rowT5x
]
y_text_1 = [
rowT1y,
rowT1y,
rowT1y,
rowT1y,
rowT1y,
rowT2y,
rowT2y,
rowT2y,
rowT2y,
rowT2y,
rowT3y,
rowT3y,
rowT3y,
rowT3y,
rowT3y,
rowT4y,
rowT4y,
rowT4y,
rowT4y,
rowT4y,
rowT5y,
rowT5y,
rowT5y,
rowT5y,
rowT5y,
rowT6y,
rowT6y,
rowT6y,
rowT6y,
rowT6y,
rowT7y,
rowT7y,
rowT7y,
rowT7y,
rowT7y,
rowT8y,
rowT8y,
rowT8y,
rowT8y,
rowT8y
]
y_text_2 = [
rowP1y,
rowP1y,
rowP1y,
rowP1y,
rowP1y,
rowP2y,
rowP2y,
rowP2y,
rowP2y,
rowP2y,
rowP3y,
rowP3y,
rowP3y,
rowP3y,
rowP3y,
rowP4y,
rowP4y,
rowP4y,
rowP4y,
rowP4y,
rowP5y,
rowP5y,
rowP5y,
rowP5y,
rowP5y,
rowP6y,
rowP6y,
rowP6y,
rowP6y,
rowP6y,
rowP7y,
rowP7y,
rowP7y,
rowP7y,
rowP7y,
rowP8y,
rowP8y,
rowP8y,
rowP8y,
rowP8y
]
xs_text = [
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x,
rowS1x,
rowS2x,
rowS3x,
rowS4x,
rowS5x
]
ys_text = [
rowS1y,
rowS1y,
rowS1y,
rowS1y,
rowS1y,
rowS2y,
rowS2y,
rowS2y,
rowS2y,
rowS2y,
rowS3y,
rowS3y,
rowS3y,
rowS3y,
rowS3y,
rowS4y,
rowS4y,
rowS4y,
rowS4y,
rowS4y,
rowS5y,
rowS5y,
rowS5y,
rowS5y,
rowS5y,
rowS6y,
rowS6y,
rowS6y,
rowS6y,
rowS6y,
rowS7y,
rowS7y,
rowS7y,
rowS7y,
rowS7y,
rowS8y,
rowS8y,
rowS8y,
rowS8y,
rowS8y
]
dx_text = [
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x,
rowD1x,
rowD2x,
rowD3x,
rowD4x,
rowD5x
]
dy_text = [
rowD1y,
rowD1y,
rowD1y,
rowD1y,
rowD1y,
rowD2y,
rowD2y,
rowD2y,
rowD2y,
rowD2y,
rowD3y,
rowD3y,
rowD3y,
rowD3y,
rowD3y,
rowD4y,
rowD4y,
rowD4y,
rowD4y,
rowD4y,
rowD5y,
rowD5y,
rowD5y,
rowD5y,
rowD5y,
rowD6y,
rowD6y,
rowD6y,
rowD6y,
rowD6y,
rowD7y,
rowD7y,
rowD7y,
rowD7y,
rowD7y,
rowD8y,
rowD8y,
rowD8y,
rowD8y,
rowD8y
]
ry_text = [
rowR1y,
rowR1y,
rowR1y,
rowR1y,
rowR1y,
rowR2y,
rowR2y,
rowR2y,
rowR2y,
rowR2y,
rowR3y,
rowR3y,
rowR3y,
rowR3y,
rowR3y,
rowR4y,
rowR4y,
rowR4y,
rowR4y,
rowR4y,
rowR5y,
rowR5y,
rowR5y,
rowR5y,
rowR5y,
rowR6y,
rowR6y,
rowR6y,
rowR6y,
rowR6y,
rowR7y,
rowR7y,
rowR7y,
rowR7y,
rowR7y,
rowR8y,
rowR8y,
rowR8y,
rowR8y,
rowR8y
]
?>
<Popup>
<Cache> "Enable|ALL" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "/mnt/sdcard/coffeevending/cache1.png" </Background>
<Sound> "ROOT/sounds/selectDrink.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOpen>
TopView "show"
; On open
Var ServiceSuccess = "no"
Var SelectOnTop1 = 0
Var p6OpenBG = "ROOT/image/BG_Menu_Page6_Open.bmp"
Var p6OpenGIF = "ROOT/image/Page6_Open.gif"
Var pCleanBG = "ROOT/image/BG_Clean.bmp"
Var pCleanGIF = "ROOT/image/CleanMachine.gif"
Var pUpgradeBG = "ROOT/image/BG_Clean.bmp"
Var pUpgradeGIF = "ROOT/image/UpgradeMachine.gif"
Var pMaintenanceBG = "ROOT/image/BG_CloseMaintenance.jpg"
Var p7LidGIF = "ROOT/image/gif_thank_lid.gif"
Var DiscountDrink = 0
Var SelectSlot = "0"
Var rootMenu = "ROOT/image/"
<?hurr
# for x in range( menu_count):
# i = str(x + 1)
# out_xml( '\t\r\n')
#
# out_xml( '\t; Init Var index = '+ i +'\r\n')
# out_xml( '\tVar PriceColor' + i + ' = 0xFF0000 \r\n')
# out_xml( '\tVar DiscountPriceStr' + i + ' = "" \r\n')
# out_xml( '\tVar SlashSt' + i + ' = "Invisible" \r\n')
# out_xml( '\t\r\n')
# out_xml( '\t; Init Var Menu = '+ i +'\r\n')
# out_xml( '\t\r\n')
# out_xml( '\t\r\n')
#
# out_xml( '\tVar MenuState' + i + ' = "true" \r\n')
# out_xml( '\tVar Menu' + i + 'Sale = "true" \r\n')
#
# out_xml( '\tVar Menu'+ i +'NameEngShow = Menu'+ i +'NameThai\r\n')
#
# out_xml( '\tVar Menu' + i + 'PriceShow = "" \r\n')
# out_xml( '\t\r\n')
# out_xml( '\tIf Menu' + i + 'Enable = "true" Then\r\n')
# out_xml( '\t If Menu' + i + 'Sale = "true" Then\r\n')
# out_xml( '\t Var MenuState' + i + ' = "Enable"\r\n')
# out_xml( '\t \r\n')
# out_xml( '\t \r\n')
# out_xml( '\t if Menu' + i + 'Discount > 0 Then\r\n')
# out_xml( '\t Var MenuTempShow = Menu' + i + 'Price - Menu' + i + 'Discount\r\n')
# out_xml( '\t Var PriceColor' + i + ' = 0xFFFFFF\r\n')
# out_xml( '\t Var DiscountPriceStr' + i + ' = " " + MenuTempShow\r\n')
# out_xml( '\t Var SlashSt' + i + ' = "Enable"\r\n')
# out_xml( '\t EndIf\r\n')
# out_xml( '\t Var Menu' + i + 'PriceShow = Menu' + i + 'Price\r\n')
# out_xml( '\t \r\n')
# out_xml( '\t EndIf\r\n')
# out_xml( '\tEndIf\r\n')
#
# out_xml( '\t\r\n')
?>
Var Timeout = 0
Var TMenuLang = 0
Var SugarPreMixSel = 0
If MenuLangTH = 0 Then
Var ButtonThaiSelEnable = "Disable"
Var ButtonEngSelEnable = "Enable"
Else
Var ButtonThaiSelEnable = "Enable"
Var ButtonEngSelEnable = "Disable"
EndIf
</EventOpen>
<Timeout> 5000 </Timeout>
<EventTimeout>
;Open "/mnt/sdcard/coffeevending/xml/menu_board.xml"
Var TMenuLang = TMenuLang + 1
Var Timeout = Timeout + 1
If TMenuLang = 20 Then
Refresh
EndIf
TimerReset
</EventTimeout>
<?hurr
for x in range( menu_count):
i = str(x + 1)
out_xml('\r\n')
out_xml('<Button>\r\n')
out_xml('<X> ' + str(x_button[x]) + '</X>\r\n')
out_xml('<Y> ' + str(y_button[x]) + '</Y>\r\n')
out_xml('<Width> 202 </Width>\r\n')
out_xml('<Height> 214 </Height>\r\n')
out_xml('<State> MenuState' + i + ' </State>\r\n')
#out_xml('<Filename> nMenu' + i + ' </Filename>\r\n')
out_xml('<FilenamePress> pMenu' + i + ' </FilenamePress>\r\n')
#out_xml('<FilenameDisable> dMenu' + i + ' </FilenameDisable>\r\n')
out_xml('<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
out_xml('<Volume> SoundVolume </Volume>\r\n')
out_xml('<EventClick>\r\n')
out_xml('Var SelectDrink = Menu' + i + 'ProductCode\r\n')
out_xml('Var NameDrink = Menu' + i + 'NameEng\r\n')
out_xml('Var NameDrinkTH = Menu' + i + 'NameThai\r\n')
out_xml('Var PriceDrink = Menu' + i + 'Price - Menu' + i + 'Discount\r\n')
out_xml('Var DiscountDrink = Menu1Discount\r\n')
out_xml('Var PictureDrink = "ROOT/image/" + Menu' + i + 'ProductCode\r\n')
out_xml('Var PictureDrink = PictureDrink + ".bmp"\r\n')
out_xml('Var SelectSlot = "' + i + '"\r\n')
out_xml('Var NHaveDrink = Menu' + i + 'HaveDrink\r\n')
#out_xml('Var SugarPreMixSel = Menu' + i + 'SugarPreMixed\r\n')
#out_xml('Var SelectOnTop1 = Menu' + i + 'SugarRecommendID\r\n')
out_xml('Topping "Load" Menu' + i + 'ProductCode\r\n')
out_xml('OpenInst 1 "/mnt/sdcard/coffeevending/xml/test_video_loop.xml"\r\n')
out_xml('MainOpen "/mnt/sdcard/coffeevending/xml/menu_topping_alter.xml"\r\n')
out_xml('Open "/mnt/sdcard/coffeevending/xml/menu_list_original.xml"\r\n')
out_xml('</EventClick>\r\n')
out_xml('</Button>\r\n')
out_xml('\r\n')
?>
<?hurr
for x in range( menu_count):
i = str(x + 1)
out_xml('\r\n')
out_xml('<Text>\r\n')
out_xml('<X> ' + str(x_text_1[x]) + ' </X>\r\n')
out_xml('<Y> ' + str(y_text_1[x]) + ' </Y>\r\n')
out_xml('<Width>202</Width>\r\n')
out_xml('<Align> Center </Align>\r\n')
out_xml('<Size> 20 </Size>\r\n')
#out_xml('<Font> fontType1 </Font>\r\n')
out_xml('<Color> 0xFFFFFF </Color>\r\n')
out_xml('<Value> Menu' + i + 'NameEngShow </Value>\r\n')
out_xml('</Text>\r\n')
out_xml('\r\n')
?>
<?hurr
for x in range( menu_count):
i = str(x + 1)
out_xml('\r\n')
out_xml('<Text>\r\n')
out_xml('<X> ' + str(x_text_1[x]) + ' </X>\r\n')
out_xml('<Y> ' + str(y_text_2[x]) + ' </Y>\r\n')
out_xml('<Width>202</Width>\r\n')
out_xml('<Align> Center </Align>\r\n')
out_xml('<Size> 25 </Size>\r\n')
#out_xml('<Font> fontType1 </Font>\r\n')
out_xml('<Color> PriceColor' + i + ' </Color>\r\n')
out_xml('<Value> Menu' + i + 'PriceShow </Value>\r\n')
out_xml('</Text>\r\n')
out_xml('\r\n')
?>
<?hurr
#for x in range( menu_count):
# i = str(x + 1)
# out_xml('\r\n')
# out_xml('<Button>\r\n')
# out_xml('<X> ' + str(xs_text[x]) + ' </X>\r\n')
# out_xml('<Y> ' + str(ys_text[x]) + '</Y>\r\n')
# out_xml('<State> SlashSt' + i + ' </State>\r\n')
# out_xml('<Filename> "ROOT/image/Slash.png" </Filename>\r\n')
# out_xml('</Button>\r\n')
# out_xml('\r\n')
?>
<?hurr
#for x in range( menu_count):
# i = str(x + 1)
# out_xml('\r\n')
# out_xml('<Button>\r\n')
# out_xml('<X> ' + str(dx_text[x]) + ' </X>\r\n')
# out_xml('<Y> ' + str(ry_text[x]) + ' </Y>\r\n')
# out_xml('<State> SlashSt' + i + ' </State>\r\n')
# out_xml('<Filename> "ROOT/image/Right.png" </Filename>\r\n')
# out_xml('</Button>\r\n')
# out_xml('\r\n')
?>
<?hurr
#for x in range( menu_count):
# i = str(x + 1)
# out_xml('\r\n')
# out_xml('<Text>\r\n')
# out_xml('<X> ' + str(dx_text[x]) + ' </X>\r\n')
# out_xml('<Y> ' + str(dy_text[x]) + ' </Y>\r\n')
# out_xml('<Width>202</Width>\r\n')
# out_xml('<Size> 30 </Size>\r\n')
# #out_xml('<Font> fontType1 </Font>\r\n')
# out_xml('<Color> 0xFF0000 </Color>\r\n')
# out_xml('<Value> DiscountPriceStr' + i + ' </Value>\r\n')
# out_xml('</Text>\r\n')
# out_xml('\r\n')
?>
<EventMachine>
If HaveCup = "true" Then
Open "ROOT/xml/BG_Menu_Page6_OpenOpen.xml"
EndIf
If MachineStage = "close-maintenance" Then
Open "ROOT/xml/menu_closeMaintenance.xml"
EndIf
If MachineStage = "clean-machine" Then
Open "ROOT/xml/menu_cleanMachine.xml"
EndIf
</EventMachine>
<EventSecurity>
Open "/media/bt/xml/security_alarm.xml"
</EventSecurity>
<Button>
<X> 439 </X>
<Y> 1823 </Y>
<State> ButtonEngSelEnable </state>
<Filename> "ROOT/image/BN_eng_sel.bmp" </Filename>
<FilenamePress> "ROOT/image/BP_eng_sel.bmp" </FilenamePress>
<FilenameDisable>"ROOT/image/BD_eng_sel.bmp"</FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var MenuLangTH = 0
<?hurr
for x in range( menu_count):
i = str(x + 1)
out_xml( '\t\t\tIf Menu'+ i +'Enable = "true" Then\r\n')
out_xml( '\t\t\t Var Menu'+ i +'NameEngShow = Menu'+ i +'NameEng\r\n')
out_xml( '\t\t\tEndIf\r\n')
out_xml( '\t\r\n')
?>
Var ButtonThaiSelEnable = "Enable"
Var ButtonEngSelEnable = "Disable"
Refresh
</EventClick>
</Button>
<Button>
<X> 225 </X>
<Y> 1823 </Y>
<State> ButtonThaiSelEnable </state>
<Filename> "ROOT/image/BN_thai_sel.bmp" </Filename>
<FilenamePress> "ROOT/image/BP_thai_sel.bmp" </FilenamePress>
<FilenameDisable> "ROOT/image/BD_thai_sel.bmp" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var MenuLangTH = 1
<?hurr
for x in range( menu_count):
i = str(x + 1)
out_xml( '\t\t\tIf Menu'+ i +'Enable = "true" Then\r\n')
out_xml( '\t\t\t Var Menu'+ i +'NameEngShow = Menu'+ i +'NameThai\r\n')
out_xml( '\t\t\tEndIf\r\n')
out_xml( '\t\r\n')
?>
Var ButtonThaiSelEnable = "Disable"
Var ButtonEngSelEnable = "Enable"
Refresh
</EventClick>
</Button>
<Button>
<X> 654 </X>
<Y> 1823 </Y>
<Filename> "ROOT/image/BN_goto_topup.bmp" </Filename>
<FilenamePress> "ROOT/image/BP_goto_topup.bmp" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
OpenInst 1 "/mnt/sdcard/coffeevending/xml/test_video_loop.xml"
MainOpen "ROOT/xml/service_menu.xml"
Open "/mnt/sdcard/coffeevending/xml/menu_list_original.xml"
</EventClick>
</Button>
</Popup>