1014 lines
39 KiB
Python
1014 lines
39 KiB
Python
if current_file_name == "page_catalog_group_recommend.skt":
|
|
touch_less_gen = True
|
|
else:
|
|
touch_less_gen = False
|
|
|
|
out_xml('<FrameScroll> \r\n')
|
|
if touch_less_gen == True:
|
|
out_xml('<Max> 16 </Max>\r\n')
|
|
out_xml('<X> 10 </X>\r\n')
|
|
out_xml('<Y> 497 </Y>\r\n')
|
|
out_xml('<Width> 1080 </Width>\r\n')
|
|
out_xml('<ScrollHeight> "auto" </ScrollHeight>\r\n')
|
|
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
|
|
out_xml('<Column> 4 </Column>\r\n')
|
|
out_xml('<Script>\r\n')
|
|
|
|
print("current_file_name " + current_file_name)
|
|
|
|
|
|
if touch_less_gen == False:
|
|
|
|
out_xml('\t Var block_index_override = 0\r\n')
|
|
out_xml('\t Var block_index_move = 0\r\n')
|
|
else:
|
|
|
|
out_xml('\t Var block_index_override = 4\r\n')
|
|
out_xml('\t Var block_index_move = 1\r\n')
|
|
|
|
|
|
out_xml('\tIf Seeker = "curr" Then\r\n')
|
|
out_xml('\t\tVar TouchLessStg = "Enable"\r\n')
|
|
out_xml('\t\tVar TouchLessQrStg = "Enable"\r\n')
|
|
out_xml('\tElse\r\n')
|
|
out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
|
out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
|
out_xml('\tEndIf\r\n')
|
|
|
|
out_xml('\tIf WebAppShow = "Invisible" Then\r\n')
|
|
out_xml('\t\tVar TouchLessStg = "Disable"\r\n')
|
|
out_xml('\t\tVar TouchLessQrStg = "Invisible"\r\n')
|
|
out_xml('\tEndIf\r\n')
|
|
|
|
|
|
out_xml('</Script>\r\n')
|
|
|
|
pd_code_available = '##-##-##-####'
|
|
count = 0
|
|
count_test = 0
|
|
if touch_less_gen == True:
|
|
out_xml( '<Block>\r\n')
|
|
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
|
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
|
out_xml('\t<Width> 225 </Width>\r\n')
|
|
out_xml('\t<Height> 296 </Height>\r\n')
|
|
out_xml('\t<State> "Enable" </State> \r\n')
|
|
out_xml('\t<Image>\r\n')
|
|
out_xml('\t<X> 0 </X>\r\n')
|
|
out_xml('\t<Y> 0 </Y>\r\n')
|
|
out_xml('\t<State> TouchLessStg </State> \r\n')
|
|
out_xml('\t<Filename> Var( DirImage + "/touch_less_order.png" )</Filename>\r\n')
|
|
out_xml('\t<FilenameDisable> Var( DirImage + "/touch_less_order_db.png" )</FilenameDisable>\r\n')
|
|
out_xml('\t</Image>\r\n')
|
|
out_xml('\t<QRCode>\r\n')
|
|
out_xml('\t<X> 40 </X>\r\n')
|
|
out_xml('\t<Y> 153 </Y>\r\n')
|
|
out_xml('\t<Width> 150 </Width>\r\n')
|
|
out_xml('\t<Color> "0xeae6e1" </Color>\r\n')
|
|
out_xml('\t<QRColor> "0x513C2F" </Color>\r\n')
|
|
out_xml('\t<Height> 150 </Height>\r\n')
|
|
|
|
#out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
|
#out_xml('\t<Service> "Herr" </Service>\r\n')
|
|
out_xml('\t<State> TouchLessQrStg </State>\r\n')
|
|
out_xml('\t<Service> testservice </Service>\r\n')
|
|
|
|
out_xml('\t</QRCode>\r\n')
|
|
out_xml('</Block>\r\n')
|
|
|
|
out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
|
|
for spl in menu_new_list:
|
|
#product_code = s
|
|
if spl[0] == "IGNORE":
|
|
continue
|
|
|
|
out_xml( '\t; ==================> Len = ' + str(len(spl)) + '\r\n')
|
|
menu_img = spl[7]
|
|
out_xml( '\t; '+ spl[4] + ' ' + spl[5] + ' ' + spl[6]+ ' \r\n')
|
|
out_xml( '<Block>\r\n')
|
|
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
|
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
|
out_xml('\t<Width> 225 </Width>\r\n')
|
|
out_xml('\t<Height> 296 </Height>\r\n')
|
|
str_con = ""
|
|
str_con_var = ""
|
|
if spl[4] != '-':
|
|
str_con += spl[4] + '.Button,'
|
|
if spl[5] != '-':
|
|
str_con += spl[5] + '.Button,'
|
|
if spl[6] != '-':
|
|
str_con += spl[6] + '.Button,'
|
|
|
|
if spl[4] != '-':
|
|
str_con_var += spl[4] + '-'
|
|
if spl[5] != '-':
|
|
str_con_var += spl[5] + '-'
|
|
if spl[6] != '-':
|
|
str_con_var += spl[6] + '-'
|
|
|
|
str_con_var = str_con_var.replace("-", "")
|
|
if touch_less_gen == True:
|
|
str_con += "Disable=Invisible,"
|
|
|
|
str_con += "$Sum" + str_con_var
|
|
|
|
out_xml( '\t<State> Flag( '+ str_con + ') </State> \r\n')
|
|
|
|
pd_code_1 = spl[4]
|
|
pd_stage1 = '$' + spl[4] + '.Button'
|
|
if spl[4] == "-" or len(spl[4]) == 0 :
|
|
pd_code_1 = pd_code_available
|
|
pd_stage1 = '"Disable2"'
|
|
|
|
pd_code_2 = spl[5]
|
|
pd_stage2 = '$' + spl[5] + '.Button'
|
|
if spl[5] == "-" or len(spl[5]) == 0:
|
|
pd_code_2 = pd_code_available
|
|
pd_stage2 = '"Disable2"'
|
|
|
|
pd_code_3 = spl[6]
|
|
pd_stage3 = '$' + spl[6] + '.Button'
|
|
if spl[6] == "-" or len(spl[6]) == 0:
|
|
pd_code_3 = pd_code_available
|
|
pd_stage3 = '"Disable2"'
|
|
|
|
|
|
|
|
|
|
out_xml( '\t<Button>\r\n')
|
|
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
|
out_xml( '\t<Filename> "' + new_default_dir + '/'+ menu_img +'" </Filename>\r\n')
|
|
out_xml( '\t<FilenamePress> "' + new_default_dir_press + '/'+ menu_img +'" </FilenamePress>\r\n')
|
|
out_xml( '\t<FilenameDisable> "' + new_default_dir_disable + '/'+ menu_img +'" </FilenameDisable>\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<EventOnClick> \r\n')
|
|
|
|
# Default
|
|
out_xml( '\t\tVar NameDrink = "' + spl[1].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar NameDrinkTH = "' + spl[0].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar DrinkDescriptionTH = "' + spl[2].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar DrinkDescription = "' + spl[3].replace("\\n", " ") + '"\r\n')
|
|
|
|
out_xml( '\t\tVar PictureDrink = "' + new_default_dir2 + '" + \"' + menu_img + '\"\r\n')
|
|
|
|
out_xml( '\t\tVar OpenFromXML = CurrentXMLFileName2\r\n')
|
|
|
|
out_xml( '\t\tVar PriceD1 = $' + spl[4] + '.Price\r\n')
|
|
out_xml( '\t\tVar PriceD2 = $' + spl[5] + '.Price\r\n')
|
|
out_xml( '\t\tVar PriceD3 = $' + spl[6] + '.Price\r\n')
|
|
|
|
out_xml( '\t\tVar PD_CODE1 = "' + pd_code_1 + '"\r\n')
|
|
out_xml( '\t\tVar PD_CODE2 = "' + pd_code_2 + '"\r\n')
|
|
out_xml( '\t\tVar PD_CODE3 = "' + pd_code_3 + '"\r\n')
|
|
|
|
out_xml( '\t\tVar PD_STAGE_1 = ' + pd_stage1 + '\r\n')
|
|
out_xml( '\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\r\n')
|
|
out_xml( '\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\r\n')
|
|
|
|
|
|
out_xml( '\t\tVar SelectCountDrinkType = 0\r\n')
|
|
out_xml( '\t\tVar DefaultDrinkType = 0\r\n')
|
|
|
|
out_xml( '\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 1\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 2\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_3 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 3\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
|
#out_xml( '\t\t\tVar PD_STAGE_2 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[5] +'"\r\n')
|
|
out_xml( '\t\tElse\r\n')
|
|
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
|
#out_xml( '\t\t\t\tVar PD_STAGE_1 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[4] +'"\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
#out_xml( '\t\t\t\tVar PD_STAGE_3 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[6] +'"\r\n')
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t\tVar menu_name_eng_hot = $' + pd_code_1 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_hot = $' + pd_code_1 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_hot = $' + pd_code_1 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_hot = $' + pd_code_1 + '.description\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tVar menu_name_eng_cold = $' + pd_code_2 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_cold = $' + pd_code_2 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_cold = $' + pd_code_2 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_cold = $' + pd_code_2 + '.description\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tVar menu_name_eng_blender = $' + pd_code_3 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_blender = $' + pd_code_3 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_blender = $' + pd_code_3 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_blender = $' + pd_code_3 + '.description\r\n')
|
|
|
|
|
|
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_1\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_2\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_3\r\n')
|
|
out_xml( '\t\tVar SelectDrinkType = 0\r\n')
|
|
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
if "inter" in param:
|
|
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select5.xml"\r\n')
|
|
else:
|
|
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select4.xml"\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t</EventOnClick>\r\n')
|
|
out_xml( '\t</Button>\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 164 </Y>\r\n')
|
|
out_xml( '\t<Size> 24 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
|
out_xml( '\t<State> showthaiText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[0].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 220 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<State> showthaiText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[2].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 164 </Y>\r\n')
|
|
out_xml( '\t<Size> 22 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
|
out_xml( '\t<State> showengText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[1].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 220 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<State> showengText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[3].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
ice_tab_hot_show = True
|
|
shw = "$" + spl[4] + ".Button"
|
|
if spl[4] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_hot_show = False
|
|
|
|
if len(spl[4]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_hot_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
if "inter" in param:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 50 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
else:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 50 </X>\r\n')
|
|
out_xml( '\t<Y> 265 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
|
|
#out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
|
|
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[4] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
ice_tab_ice_show = True
|
|
|
|
shw = "$" + spl[5] + ".Button"
|
|
if spl[5] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_ice_show = False
|
|
|
|
if len(spl[5]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_ice_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 81 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
if "inter" in param:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 115 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
else:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 115 </X>\r\n')
|
|
out_xml( '\t<Y> 265 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[5] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
ice_tab_blend_show = True
|
|
|
|
shw = "$" + spl[6] + ".Button"
|
|
if spl[6] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_blend_show = False
|
|
|
|
if len(spl[6]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_blend_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 146 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
if "inter" in param:
|
|
out_xml( '\t<X> 180 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitRegularTTF </Font>\r\n')
|
|
#out_xml( '\t<Align> end </Align>\r\n')
|
|
|
|
else:
|
|
out_xml( '\t<X> 183 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[6] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 81 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<State> \r\n')
|
|
out_xml( '\t\teval( \r\n')
|
|
out_xml( '\t\tIf ICE_PROCESS_STATUS = 2 Then\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
if ice_tab_hot_show == True:
|
|
|
|
#out_xml( '\t\t\tDEBUGVAR $Sum' + str_con_var +'\r\n')
|
|
out_xml( '\t\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n')
|
|
out_xml( '\t\t\t\tVar ice_tab_process_show = "Disable"\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
out_xml( '\t\t\t\tVar ice_tab_process_show = "Enable"\r\n')
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
else:
|
|
out_xml( '\t\t\tVar ice_tab_process_show = "Invisible"\r\n')
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tElse\r\n')
|
|
out_xml( '\t\t\tVar ice_tab_process_show = "Invisible"\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
out_xml( '\t\tVar return = ice_tab_process_show\r\n')
|
|
out_xml( '\t\t)\r\n')
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 49 </X>\r\n')
|
|
out_xml( '\t<Y> 117 </Y>\r\n')
|
|
out_xml( '\t<State> \r\n')
|
|
out_xml( '\t\teval( \r\n')
|
|
out_xml( '\t\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_1 + '.TAG tag1_is_disable\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_2 + '.TAG tag2_is_disable\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_3 + '.TAG tag3_is_disable\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_1 + '.TAG\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_2 + '.TAG\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_3 + '.TAG\r\n')
|
|
out_xml( '\t\t\t\tVar return = "Invisible"\r\n')
|
|
out_xml( '\t\t\t\tIf tag1_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\t\tIf tag2_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\t\tIf tag3_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Invisible"\r\n')
|
|
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
|
|
out_xml( '\t\t)\r\n')
|
|
if param == "old":
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image//img_menu_err.png" </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
else:
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 84 </X>\r\n')
|
|
out_xml( '\t<Y> 266 </Y>\r\n')
|
|
out_xml( '\t<Size> 10 </Size>\r\n')
|
|
out_xml( '\t<Font> OpunMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0xDE794E </Color>\r\n')
|
|
out_xml( '\t<State> ice_tab_process_show </State>\r\n')
|
|
out_xml( '\t<Value> ice_show_open </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
|
|
if param == "old":
|
|
print(";param=" + param)
|
|
else:
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 48 </X>\r\n')
|
|
out_xml( '\t<Y> 116 </Y>\r\n')
|
|
out_xml( '\t<Size> 32 </Size>\r\n')
|
|
out_xml( '\t<Width>128</Width>\r\n')
|
|
out_xml( '\t<Height>64</Height>\r\n')
|
|
out_xml( '\t<Font> MITRegularTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x5A5A5A </Color>\r\n')
|
|
out_xml( '\t<Mode> "disable-show" </Mode>\r\n')
|
|
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
|
out_xml( '\t<Value> text_unavailable </Value>\r\n')
|
|
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
|
|
out_xml( '</Block>\r\n')
|
|
|
|
###############################################################################
|
|
out_xml( '\t; '+ spl[8] + ' ' + spl[9] + ' ' + spl[10]+ ' \r\n')
|
|
if spl[8] != '-' or spl[9] != '-' or spl[10] != '-':
|
|
menu_img = spl[7]
|
|
out_xml( '<Block>\r\n')
|
|
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
|
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
|
out_xml('\t<Width> 225 </Width>\r\n')
|
|
out_xml('\t<Height> 296 </Height>\r\n')
|
|
str_con = ""
|
|
str_con_var = ""
|
|
if spl[8] != '-':
|
|
str_con += spl[8] + '.Button,'
|
|
if spl[9] != '-':
|
|
str_con += spl[9] + '.Button,'
|
|
if spl[6] != '-':
|
|
str_con += spl[10] + '.Button,'
|
|
|
|
if spl[8] != '-':
|
|
str_con_var += spl[8] + '-'
|
|
if spl[9] != '-':
|
|
str_con_var += spl[9] + '-'
|
|
if spl[10] != '-':
|
|
str_con_var += spl[10] + '-'
|
|
|
|
str_con_var = str_con_var.replace("-", "")
|
|
if touch_less_gen == True:
|
|
str_con += "Disable=Invisible,"
|
|
|
|
str_con += "$Sum" + str_con_var
|
|
|
|
out_xml( '\t<State> Flag( '+ str_con + ') </State> \r\n')
|
|
|
|
pd_code_1 = spl[8]
|
|
pd_stage1 = '$' + spl[8] + '.Button'
|
|
if spl[8] == "-" or len(spl[8]) == 0 :
|
|
pd_code_1 = pd_code_available
|
|
pd_stage1 = '"Disable2"'
|
|
|
|
pd_code_2 = spl[9]
|
|
pd_stage2 = '$' + spl[9] + '.Button'
|
|
if spl[9] == "-" or len(spl[9]) == 0:
|
|
pd_code_2 = pd_code_available
|
|
pd_stage2 = '"Disable2"'
|
|
|
|
pd_code_3 = spl[10]
|
|
pd_stage3 = '$' + spl[10] + '.Button'
|
|
if spl[10] == "-" or len(spl[10]) == 0:
|
|
pd_code_3 = pd_code_available
|
|
pd_stage3 = '"Disable2"'
|
|
|
|
|
|
|
|
|
|
out_xml( '\t<Button>\r\n')
|
|
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
|
out_xml( '\t<Filename> "' + new_default_dir + '/'+ menu_img +'" </Filename>\r\n')
|
|
out_xml( '\t<FilenamePress> "' + new_default_dir_press + '/'+ menu_img +'" </FilenamePress>\r\n')
|
|
out_xml( '\t<FilenameDisable> "' + new_default_dir_disable + '/'+ menu_img +'" </FilenameDisable>\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<EventOnClick> \r\n')
|
|
|
|
# Default
|
|
out_xml( '\t\tVar NameDrink = "' + spl[1].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar NameDrinkTH = "' + spl[0].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar DrinkDescriptionTH = "' + spl[2].replace("\\n", " ") + '"\r\n')
|
|
out_xml( '\t\tVar DrinkDescription = "' + spl[3].replace("\\n", " ") + '"\r\n')
|
|
|
|
out_xml( '\t\tVar PictureDrink = "' + new_default_dir2 + '" + \"' + menu_img + '\"\r\n')
|
|
|
|
out_xml( '\t\tVar OpenFromXML = CurrentXMLFileName2\r\n')
|
|
|
|
out_xml( '\t\tVar PriceD1 = $' + spl[8] + '.Price\r\n')
|
|
out_xml( '\t\tVar PriceD2 = $' + spl[9] + '.Price\r\n')
|
|
out_xml( '\t\tVar PriceD3 = $' + spl[10] + '.Price\r\n')
|
|
|
|
out_xml( '\t\tVar PD_CODE1 = "' + pd_code_1 + '"\r\n')
|
|
out_xml( '\t\tVar PD_CODE2 = "' + pd_code_2 + '"\r\n')
|
|
out_xml( '\t\tVar PD_CODE3 = "' + pd_code_3 + '"\r\n')
|
|
|
|
out_xml( '\t\tVar PD_STAGE_1 = ' + pd_stage1 + '\r\n')
|
|
out_xml( '\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\r\n')
|
|
out_xml( '\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\r\n')
|
|
|
|
|
|
out_xml( '\t\tVar SelectCountDrinkType = 0\r\n')
|
|
out_xml( '\t\tVar DefaultDrinkType = 0\r\n')
|
|
|
|
out_xml( '\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 1\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 2\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_3 = "Enable" Then\r\n')
|
|
out_xml( '\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\r\n')
|
|
out_xml( '\t\t\tVar DefaultDrinkType = 3\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n')
|
|
#out_xml( '\t\t\tVar PD_STAGE_2 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[9] +'"\r\n')
|
|
out_xml( '\t\tElse\r\n')
|
|
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\r\n')
|
|
#out_xml( '\t\t\t\tVar PD_STAGE_1 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[8] +'"\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
#out_xml( '\t\t\t\tVar PD_STAGE_3 = "Enable"\r\n')
|
|
out_xml( '\t\t\tTopping "Load" "'+ spl[10] +'"\r\n')
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t\tVar menu_name_eng_hot = $' + pd_code_1 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_hot = $' + pd_code_1 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_hot = $' + pd_code_1 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_hot = $' + pd_code_1 + '.description\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tVar menu_name_eng_cold = $' + pd_code_2 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_cold = $' + pd_code_2 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_cold = $' + pd_code_2 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_cold = $' + pd_code_2 + '.description\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tVar menu_name_eng_blender = $' + pd_code_3 + '.NameE\r\n')
|
|
out_xml( '\t\tVar menu_desc_eng_blender = $' + pd_code_3 + '.descriptionE\r\n')
|
|
out_xml( '\t\tVar menu_name_thai_blender = $' + pd_code_3 + '.Name\r\n')
|
|
out_xml( '\t\tVar menu_desc_thai_blender = $' + pd_code_3 + '.description\r\n')
|
|
|
|
|
|
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_1\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_2\r\n')
|
|
out_xml( '\t\tDEBUGVAR PD_STAGE_3\r\n')
|
|
out_xml( '\t\tVar SelectDrinkType = 0\r\n')
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
if "inter" in param:
|
|
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select6.xml"\r\n')
|
|
else:
|
|
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select4.xml"\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t</EventOnClick>\r\n')
|
|
out_xml( '\t</Button>\r\n')
|
|
|
|
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 164 </Y>\r\n')
|
|
out_xml( '\t<Size> 24 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
|
out_xml( '\t<State> showthaiText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[0].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 220 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<State> showthaiText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[2].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 164 </Y>\r\n')
|
|
out_xml( '\t<Size> 22 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
|
out_xml( '\t<State> showengText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[1].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 220 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<State> showengText </State>\r\n')
|
|
out_xml( '\t<Value> "' + spl[3].replace("\\n", "\n") + '" </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
ice_tab_hot_show = True
|
|
shw = "$" + spl[8] + ".Button"
|
|
if spl[4] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_hot_show = False
|
|
|
|
if len(spl[8]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_hot_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 16 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
if "inter" in param:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 50 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
else:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 50 </X>\r\n')
|
|
out_xml( '\t<Y> 265 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[8] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[8] + '.Price ) </Value>\r\n')
|
|
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
ice_tab_ice_show = True
|
|
|
|
shw = "$" + spl[9] + ".Button"
|
|
if spl[9] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_ice_show = False
|
|
|
|
if len(spl[9]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_ice_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 81 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
if "inter" in param:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 115 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
else:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 115 </X>\r\n')
|
|
out_xml( '\t<Y> 265 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[9] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[9] + '.Price ) </Value>\r\n')
|
|
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
ice_tab_blend_show = True
|
|
|
|
shw = "$" + spl[10] + ".Button"
|
|
if spl[10] == "-" :
|
|
shw = '"Invisible"'
|
|
ice_tab_blend_show = False
|
|
|
|
if len(spl[10]) == 0 :
|
|
shw = '"Invisible"'
|
|
ice_tab_blend_show = False
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 146 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
if "inter" in param:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 183 </X>\r\n')
|
|
out_xml( '\t<Y> TextPriceMenuY </Y>\r\n')
|
|
out_xml( '\t<Size> TextPriceMenuSize </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
else:
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 183 </X>\r\n')
|
|
out_xml( '\t<Y> 265 </Y>\r\n')
|
|
out_xml( '\t<Size> 14 </Size>\r\n')
|
|
out_xml( '\t<Width>220</Width>\r\n')
|
|
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
|
out_xml( '\t<ColorDisable> 0xEAE6E1 </ColorDisable>\r\n')
|
|
out_xml( '\t<State> ' + shw + ' </State>\r\n')
|
|
if "inter" in param:
|
|
if "free" in param:
|
|
out_xml( '\t<Value> "Free" </Value>\r\n')
|
|
else:
|
|
out_xml( '\t<Value> StringFmt( $' + spl[10] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
|
|
else:
|
|
out_xml( '\t<Value> Var( "฿" + $' + spl[10] + '.Price ) </Value>\r\n')
|
|
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 81 </X>\r\n')
|
|
out_xml( '\t<Y> 264 </Y>\r\n')
|
|
out_xml( '\t<State> \r\n')
|
|
out_xml( '\t\teval( \r\n')
|
|
out_xml( '\t\tIf ICE_PROCESS_STATUS = 2 Then\r\n')
|
|
out_xml( '\t\t\r\n')
|
|
if ice_tab_hot_show == True:
|
|
|
|
#out_xml( '\t\t\tDEBUGVAR $Sum' + str_con_var +'\r\n')
|
|
out_xml( '\t\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n')
|
|
out_xml( '\t\t\t\tVar ice_tab_process_show = "Disable"\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
out_xml( '\t\t\t\tVar ice_tab_process_show = "Enable"\r\n')
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
else:
|
|
out_xml( '\t\t\tVar ice_tab_process_show = "Invisible"\r\n')
|
|
|
|
out_xml( '\t\t\r\n')
|
|
out_xml( '\t\tElse\r\n')
|
|
out_xml( '\t\t\tVar ice_tab_process_show = "Invisible"\r\n')
|
|
out_xml( '\t\tEndIf\r\n')
|
|
out_xml( '\t\tVar return = ice_tab_process_show\r\n')
|
|
out_xml( '\t\t)\r\n')
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>\r\n')
|
|
out_xml( '\t<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
|
|
out_xml( '\t<Image>\r\n')
|
|
out_xml( '\t<X> 49 </X>\r\n')
|
|
out_xml( '\t<Y> 117 </Y>\r\n')
|
|
out_xml( '\t<State> \r\n')
|
|
out_xml( '\t\teval( \r\n')
|
|
out_xml( '\t\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_1 + '.TAG tag1_is_disable\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_2 + '.TAG tag2_is_disable\r\n')
|
|
out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_3 + '.TAG tag3_is_disable\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_1 + '.TAG\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_2 + '.TAG\r\n')
|
|
#out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_3 + '.TAG\r\n')
|
|
out_xml( '\t\t\t\tVar return = "Invisible"\r\n')
|
|
out_xml( '\t\t\t\tIf tag1_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\t\tIf tag2_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\t\tIf tag3_is_disable = "true" Then\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Enable"\r\n')
|
|
out_xml( '\t\t\t\tEndIf\r\n')
|
|
out_xml( '\t\t\tElse\r\n')
|
|
out_xml( '\t\t\t\t\tVar return = "Invisible"\r\n')
|
|
|
|
out_xml( '\t\t\tEndIf\r\n')
|
|
|
|
out_xml( '\t\t)\r\n')
|
|
if param == "old":
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image//img_menu_err.png" </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
else:
|
|
out_xml( '\t</State>\r\n')
|
|
out_xml( '\t<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>\r\n')
|
|
out_xml( '\t</Image>\r\n')
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 84 </X>\r\n')
|
|
out_xml( '\t<Y> 266 </Y>\r\n')
|
|
out_xml( '\t<Size> 10 </Size>\r\n')
|
|
out_xml( '\t<Font> OpunMediumTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0xDE794E </Color>\r\n')
|
|
out_xml( '\t<State> ice_tab_process_show </State>\r\n')
|
|
out_xml( '\t<Value> ice_show_open </Value>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
|
|
if param == "old":
|
|
print("param=" + param)
|
|
else:
|
|
|
|
out_xml( '\t<Text>\r\n')
|
|
out_xml( '\t<X> 48 </X>\r\n')
|
|
out_xml( '\t<Y> 116 </Y>\r\n')
|
|
out_xml( '\t<Size> 32 </Size>\r\n')
|
|
out_xml( '\t<Width>128</Width>\r\n')
|
|
out_xml( '\t<Height>64</Height>\r\n')
|
|
out_xml( '\t<Font> MITRegularTTF </Font>\r\n')
|
|
out_xml( '\t<Color> 0x5A5A5A </Color>\r\n')
|
|
out_xml( '\t<Mode> "disable-show" </Mode>\r\n')
|
|
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
|
out_xml( '\t<Value> text_unavailable </Value>\r\n')
|
|
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
|
out_xml( '\t</Text>\r\n')
|
|
|
|
out_xml( '</Block>\r\n')
|
|
|
|
count_test = count_test + 1
|
|
#if count_test > 8 :
|
|
# break
|
|
|
|
|
|
|
|
out_xml('</FrameScroll>\r\n')
|
|
|
|
|
|
out_xml('; Cart\r\n')
|
|
out_xml('<Button>\r\n')
|
|
out_xml('<X> 915 </X>\r\n')
|
|
out_xml('<Y> 1769 </Y>\r\n')
|
|
out_xml('<State> showCart </State>\r\n')
|
|
out_xml('<Filename> cart_image_bn </Filename>\r\n')
|
|
out_xml('<FilenamePress> cart_image_bp </FilenamePress>\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('\tOpen "ROOT/taobin_project/xml/page_payment_multi.xml"\r\n')
|
|
out_xml('</EventClick>\r\n')
|
|
out_xml('</Button>\r\n')
|
|
|
|
|