222 lines
5.7 KiB
Promela
222 lines
5.7 KiB
Promela
<?hurr
|
|
|
|
default_dir = 'ROOT/taobin_project/image/page_drink/'
|
|
|
|
menu_count = 2
|
|
x1 = 44
|
|
x2 = 301
|
|
x3 = 558
|
|
x4 = 815
|
|
|
|
y1 = 571
|
|
y1 = 571
|
|
y1 = 571
|
|
y1 = 571
|
|
x_button = [
|
|
x1,
|
|
x2,
|
|
x3,
|
|
x4
|
|
|
|
]
|
|
y_button = [
|
|
y1,
|
|
y1,
|
|
y1,
|
|
y1
|
|
|
|
]
|
|
|
|
|
|
bt_pic = []
|
|
bt_pic.append('b#_diy.png')
|
|
bt_pic.append('b#_hot_espresso.png')
|
|
|
|
|
|
product_code = []
|
|
product_code.append('##-##-##-####')
|
|
product_code.append('11-99-01-0010')
|
|
|
|
?>
|
|
|
|
<Popup>
|
|
<Cache> "Enable" </Cache>
|
|
<Width> 1080 </Width>
|
|
<Height> 1920 </Height>
|
|
<Background> "0xeae6e1" </Background>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventOpen>
|
|
; On open
|
|
|
|
|
|
</EventOpen>
|
|
<Timeout> 1000 </Timeout>
|
|
<EventTimeout>
|
|
TimerReset
|
|
</EventTimeout>
|
|
|
|
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 0 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page2/ad_blank1.png" </Filename>
|
|
</Image>
|
|
|
|
; under line
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 517 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/tab_line_bottom.png" </Filename>
|
|
</Image>
|
|
|
|
|
|
; under line
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 380 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/bg1.png" </Filename>
|
|
</Image>
|
|
|
|
|
|
; 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/page_catalog.xml"
|
|
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 990 </X>
|
|
<Y> 438 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page2/bn_eng_lang.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page2/bn_eng_lang.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
; eng
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
;bn_bestseller
|
|
<Button>
|
|
<X> 107 </X>
|
|
<Y> 417 </Y>
|
|
<State> "PressForever" </State>
|
|
<Filename> "ROOT/taobin_project/image/page3/bn_bestseller.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page3/bp_bestseller.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
Open "ROOT/taobin_project/xml/page_catalog_choose_drink1.xml"
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 282 </X>
|
|
<Y> 417 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/bn_coffee.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page3/bp_coffee.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
Open "ROOT/taobin_project/xml/page_catalog_choose_drink2.xml"
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 456 </X>
|
|
<Y> 417 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/bn_tea.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page3/bp_tea.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
Open "ROOT/taobin_project/xml/page_catalog_choose_drink3.xml"
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 633 </X>
|
|
<Y> 417 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/bn_cho_ca.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page3/bp_cho_ca.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
Open "ROOT/taobin_project/xml/page_catalog_choose_drink4.xml"
|
|
</EventClick>
|
|
</Button>
|
|
|
|
<Button>
|
|
<X> 810 </X>
|
|
<Y> 417 </Y>
|
|
<Filename> "ROOT/taobin_project/image/page3/bn_fruit.png" </Filename>
|
|
<FilenamePress> "ROOT/taobin_project/image/page3/bp_fruit.png" </FilenamePress>
|
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventClick>
|
|
Open "ROOT/taobin_project/xml/page_catalog_choose_drink5.xml"
|
|
</EventClick>
|
|
</Button>
|
|
|
|
|
|
|
|
<?hurr
|
|
for i in range( menu_count):
|
|
i_str = str(i + 1)
|
|
out_xml( '\t; button i='+ i_str + ' ' + product_code[i]+ ' \r\n')
|
|
|
|
out_xml( '\t<Button>\r\n')
|
|
out_xml( '\t<X> ' + str(x_button[i]) + ' </X> \r\n')
|
|
out_xml( '\t<Y> ' + str(y_button[i]) + ' </Y> \r\n')
|
|
out_xml( '\t<Filename> "' + default_dir + ''+ bt_pic[i].replace('#','n') +'" </Filename>\r\n')
|
|
out_xml( '\t<FilenamePress> "' + default_dir + ''+ bt_pic[i].replace('#','p') +'" </FilenamePress>\r\n')
|
|
out_xml( '\t<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
|
|
out_xml( '\t<Volume> SoundVolume </Volume>\r\n')
|
|
out_xml( '\t<EventClick> \r\n')
|
|
|
|
out_xml( '\t\tVar SelectDrink = "'+ product_code[i] +'"\r\n')
|
|
out_xml( '\t\tVar NameDrink = ' + product_code[i] + '.Name\r\n')
|
|
out_xml( '\t\tVar NameDrinkTH = ' + product_code[i] + '.Name2\r\n')
|
|
out_xml( '\t\tVar PriceDrink = ' + product_code[i] + '.Price\r\n')
|
|
out_xml( '\t\tVar PictureDrink = "' + default_dir + '/' + bt_pic[i].replace('#','p') + '"\r\n')
|
|
out_xml( '\t\tTopping "Load" SelectDrink\r\n')
|
|
out_xml( '\t\tSAVELOG SelectDrink\r\n')
|
|
out_xml( '\t\tVar PriceShowValue = charOfBaht + PriceDrink\r\n')
|
|
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_alter.xml"\r\n')
|
|
|
|
out_xml( '\t</EventClick>\r\n')
|
|
out_xml( '\t</Button>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> ' + str(x_button[i] + 184) + ' </X>\r\n')
|
|
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
|
|
out_xml( '\t<Size> 27 </Size>\r\n')
|
|
out_xml( '\t<Font> KanitTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0xB78F24 </Color>\r\n')
|
|
out_xml( '\t<Value> $' + product_code[i] + '.Price </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> ' + str(x_button[i] + 164) + ' </X>\r\n')
|
|
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
|
|
out_xml( '\t<Size> 27 </Size>\r\n')
|
|
out_xml( '\t<Font> KanitTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0xB78F24 </Color>\r\n')
|
|
out_xml( '\t<Value> "฿"" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
</Popup>
|