Do fruit
This commit is contained in:
parent
dfa3717c22
commit
03bbd116ca
14 changed files with 143 additions and 862 deletions
BIN
inter/tha/image/page_drink_disable_n2/bn_frozen_mango.png
Normal file
BIN
inter/tha/image/page_drink_disable_n2/bn_frozen_mango.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
inter/tha/image/page_drink_n/bn_frozen_mango.png
Normal file
BIN
inter/tha/image/page_drink_n/bn_frozen_mango.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
inter/tha/image/page_drink_press_n/bn_frozen_mango.png
Normal file
BIN
inter/tha/image/page_drink_press_n/bn_frozen_mango.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
|
|
@ -126,10 +126,6 @@
|
|||
|
||||
Var LanguageButtonEnable = "Enable"
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 990
|
||||
Var ButtonLanguageCurrentYPosition = 438
|
||||
Var ButtonLanguageListXPosition = 970
|
||||
Var ButtonLanguageListYPosition = 430
|
||||
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,11 +70,12 @@ Var InstanceTabOpenFile9 = InstanceTabOpenFile9 + "/page_catalog_group_frozen_fr
|
|||
|
||||
|
||||
|
||||
Var InstanceTabOpenFile10 = "ROOT/taobin_project/inter/tha/xml/multi/tab_menu.lxml"
|
||||
|
||||
Var InstanceTabOpenFile11 = "ROOT/taobin_project/inter/tha/xml/multi/start_up_inst_dummy.lxml"
|
||||
Var InstanceTabOpenFile12 = "ROOT/taobin_project/inter/tha/xml/multi/start_up_inst_dummy.lxml"
|
||||
Var InstanceTabOpenFile13 = "ROOT/taobin_project/inter/tha/xml/multi/start_up_inst_dummy.lxml"
|
||||
Var InstanceTabOpenFile10 = "ROOT/taobin_project/inter/tha/xml/multi/start_up_inst_dummy.lxml"
|
||||
|
||||
Var InstanceTabOpenFile13 = "ROOT/taobin_project/inter/tha/xml/multi/tab_menu.lxml"
|
||||
|
||||
TabMenuVisibleInst 99
|
||||
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@
|
|||
|
||||
Var LanguageButtonEnable = "Enable"
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 1009
|
||||
Var ButtonLanguageCurrentYPosition = 458 - 38
|
||||
|
||||
Var ButtonLanguageListXPosition = 970
|
||||
Var ButtonLanguageListYPosition = 450 - 38
|
||||
|
||||
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
Var DirImageAlter = "ROOT/taobin_project/inter/hkg/image/page3_2_msc/"
|
||||
EndIf
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 1005
|
||||
Var ButtonLanguageCurrentXPosition = 1015
|
||||
Var ButtonLanguageCurrentYPosition = 458 - 38
|
||||
|
||||
Var ButtonLanguageListXPosition = 970
|
||||
Var ButtonLanguageListXPosition = 990
|
||||
Var ButtonLanguageListYPosition = 450 - 38
|
||||
|
||||
|
|
|
|||
|
|
@ -1,816 +0,0 @@
|
|||
if "v2" in param:
|
||||
def GenMenuProductCodeBlock( str_hot_product_code, str_cold_product_code, str_blend_product_code, str_date_time_start, str_date_time_end, str_product_var):
|
||||
print(" size " + str( len(spl)) + " img=" + spl[ idx_img][1] )
|
||||
out_xml( '\t; ==================> Len = ' + str(len(spl)) + '\r\n')
|
||||
menu_img = spl[ idx_img][1]
|
||||
out_xml( '\t; '+ str_hot_product_code + ' ' + str_cold_product_code + ' ' + str_blend_product_code+ ' \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 = ""
|
||||
#print("#########################################################################################################################")
|
||||
#print( str( spl))
|
||||
#print("#########################################################################################################################")
|
||||
if str_hot_product_code != '-':
|
||||
str_con += str_hot_product_code + '.Button,'
|
||||
|
||||
if str_cold_product_code != '-':
|
||||
str_con += str_cold_product_code + '.Button,'
|
||||
|
||||
if str_blend_product_code != '-':
|
||||
str_con += str_blend_product_code + '.Button,'
|
||||
|
||||
if str_date_time_start != '-':
|
||||
str_con += 'DateTimeStart="' + str_date_time_start + '",'
|
||||
|
||||
if str_date_time_end != '-':
|
||||
str_con += 'DateTimeEnd="' + str_date_time_end + '",'
|
||||
|
||||
if str_product_var != '-':
|
||||
str_con += 'Var=' + str_product_var + ','
|
||||
|
||||
if str_hot_product_code != '-':
|
||||
str_con_var += str_hot_product_code + '-'
|
||||
|
||||
if str_cold_product_code != '-':
|
||||
str_con_var += str_cold_product_code + '-'
|
||||
|
||||
if str_blend_product_code != '-':
|
||||
str_con_var += str_blend_product_code + '-'
|
||||
|
||||
# if str_date_time_start != '-':
|
||||
# str_con_var += str_date_time_start + '-'
|
||||
|
||||
# if str_date_time_end != '-':
|
||||
# str_con_var += str_date_time_end + '-'
|
||||
|
||||
# if str_product_var != '-':
|
||||
# str_con_var += str_product_var + '-'
|
||||
|
||||
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 = str_hot_product_code
|
||||
pd_stage1 = '$' + str_hot_product_code + '.Button'
|
||||
if str_hot_product_code == "-" or len(str_hot_product_code) == 0 :
|
||||
pd_code_1 = pd_code_available
|
||||
pd_stage1 = '"Disable2"'
|
||||
|
||||
pd_code_2 = str_cold_product_code
|
||||
pd_stage2 = '$' + str_cold_product_code + '.Button'
|
||||
if str_cold_product_code == "-" or len(str_cold_product_code) == 0:
|
||||
pd_code_2 = pd_code_available
|
||||
pd_stage2 = '"Disable2"'
|
||||
|
||||
pd_code_3 = str_blend_product_code
|
||||
pd_stage3 = '$' + str_blend_product_code + '.Button'
|
||||
if str_blend_product_code == "-" or len(str_blend_product_code) == 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[ idx_of_eng_des].replace("\\n", " ") + '"\r\n')
|
||||
#out_xml( '\t\tVar NameDrinkTH = "' + spl[ idx_of_eng].replace("\\n", " ") + '"\r\n')
|
||||
#out_xml( '\t\tVar DrinkDescriptionTH = "' + spl[ idx_of_thai].replace("\\n", " ") + '"\r\n')
|
||||
#out_xml( '\t\tVar DrinkDescription = "' + spl[ idx_of_thai_des].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\tGetInstanceIDMenuTab OpenFromInstMenuTab\r\n')
|
||||
out_xml( '\t\tVar PriceD1 = $' + str_hot_product_code + '.Price\r\n')
|
||||
out_xml( '\t\tVar PriceD2 = $' + str_cold_product_code + '.Price\r\n')
|
||||
out_xml( '\t\tVar PriceD3 = $' + str_blend_product_code + '.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\t; begin lang \r\n')
|
||||
for x in range( max_can_have_lang):
|
||||
if x < len( spl[ idx_name]):
|
||||
out_xml( '\t\tVar aliasName['+ str(x) +'] = "'+ spl[ idx_name][ x + 1]+'"\r\n')
|
||||
out_xml( '\t\tVar aliasDesc['+ str(x) +'] = "'+ spl[ idx_desc][ x + 1]+'"\r\n')
|
||||
|
||||
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar NameLang[0]['+ str(x) +'] = "'+ get_name_lang( pd_code_1 , x)+'"\r\n')
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar DescLang[0]['+ str(x) +'] = "'+ get_desc_lang( pd_code_1 , x)+'"\r\n')
|
||||
|
||||
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar NameLang[1]['+ str(x) +'] = "'+ get_name_lang( pd_code_2 , x)+'"\r\n')
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar DescLang[1]['+ str(x) +'] = "'+ get_desc_lang( pd_code_2 , x)+'"\r\n')
|
||||
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar NameLang[2]['+ str(x) +'] = "'+ get_name_lang( pd_code_3 , x)+'"\r\n')
|
||||
for x in range( max_can_have_lang):
|
||||
out_xml( '\t\tVar DescLang[2]['+ str(x) +'] = "'+ get_desc_lang( pd_code_3 , x)+'"\r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t\t; end lang \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" "'+ str_cold_product_code +'"\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" "'+ str_hot_product_code +'"\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" "'+ str_blend_product_code +'"\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')
|
||||
out_xml( '\t\tTabMenuVisibleInst 99\r\n')
|
||||
|
||||
out_xml( '\t\tIf RedirectToNormalVersion = 1 Then\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_eng_hot = NameLang[0][0]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_eng_hot = DescLang[0][0]\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_eng_cold = NameLang[1][0]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_eng_cold = DescLang[1][0]\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_eng_blender = NameLang[2][0]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_eng_blender = DescLang[2][0]\r\n')
|
||||
out_xml( '\t\t\t\r\n')
|
||||
out_xml( '\t\t\t\r\n')
|
||||
out_xml( '\t\t\t\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_thai_hot = NameLang[0][1]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_thai_hot = DescLang[0][1]\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_thai_cold = NameLang[1][1]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_thai_cold = DescLang[1][1]\r\n')
|
||||
out_xml( '\t\t\tVar menu_name_thai_blender = NameLang[2][1]\r\n')
|
||||
out_xml( '\t\t\tVar menu_desc_thai_blender = DescLang[2][1]\r\n')
|
||||
out_xml( '\t\t\tDEBUGVAR menu_name_thai_cold\r\n')
|
||||
out_xml( '\t\t\tDEBUGVAR menu_desc_thai_cold\r\n')
|
||||
|
||||
out_xml( '\t\t\t\tVar NameDrink = aliasName[0]\r\n')
|
||||
out_xml( '\t\t\t\tVar DrinkDescription = aliasDesc[0]\r\n')
|
||||
out_xml( '\t\t\t\tVar NameDrinkTH = aliasName[1]\r\n')
|
||||
out_xml( '\t\t\t\tVar DrinkDescriptionTH = aliasDesc[1]\r\n')
|
||||
|
||||
out_xml( '\t\tIf LanguageShow = "THAI" Then\r\n')
|
||||
out_xml( '\t\t\tVar show_eng = "false"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar show_eng = "true"\r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
|
||||
out_xml( '\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_topping_select7.xml"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_select6.lxml"\r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
out_xml( '\t\t\r\n')
|
||||
out_xml( '\t\t\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> 22 </Size>\r\n')
|
||||
out_xml( '\t<Width>222</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<LanguageGroup>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot1>' + spl[ idx_name][ idx_lang_eng] + '</LanguageSlot1>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot2>' + spl[ idx_name][ idx_lang_thai] + '</LanguageSlot2>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot3>' + spl[ idx_name][ idx_lang_china] + '</LanguageSlot3>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot4>' + spl[ idx_name][ idx_lang_thai] + '</LanguageSlot4>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot5>' + spl[ idx_name][ idx_lang_malay] + '</LanguageSlot5>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot6>' + spl[ idx_name][ idx_lang_myanmar] + '</LanguageSlot6>\r\n')
|
||||
out_xml( '\t</LanguageGroup>\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>222</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<LanguageGroup>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot1>' + spl[ idx_desc][ idx_lang_eng] + '</LanguageSlot1>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot2>' + spl[ idx_desc][ idx_lang_thai] + '</LanguageSlot2>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot3>' + spl[ idx_desc][ idx_lang_china] + '</LanguageSlot3>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot4>' + spl[ idx_desc][ idx_lang_thai] + '</LanguageSlot4>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot5>' + spl[ idx_desc][ idx_lang_malay] + '</LanguageSlot5>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot6>' + spl[ idx_desc][ idx_lang_myanmar] + '</LanguageSlot6>\r\n')
|
||||
out_xml( '\t</LanguageGroup>\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 = "$" + str_hot_product_code + ".Button"
|
||||
if str_hot_product_code == "-" :
|
||||
shw = '"Invisible"'
|
||||
ice_tab_hot_show = False
|
||||
|
||||
if len(str_hot_product_code) == 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')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> TextPriceMenuHotX </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')
|
||||
|
||||
|
||||
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> eval( \r\n')
|
||||
|
||||
out_xml( '\t\tIf $' + str_hot_product_code + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return = "฿" + $' + str_hot_product_code + '.Price \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
ice_tab_ice_show = True
|
||||
|
||||
shw = "$" + str_cold_product_code + ".Button"
|
||||
if str_cold_product_code == "-" :
|
||||
shw = '"Invisible"'
|
||||
ice_tab_ice_show = False
|
||||
|
||||
if len(str_cold_product_code) == 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')
|
||||
if pd_code_2 == "51-05-02-0016":
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "normal.png" ) </Filename>\r\n')
|
||||
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n')
|
||||
else:
|
||||
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')
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 123 </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')
|
||||
|
||||
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> eval( \r\n')
|
||||
|
||||
out_xml( '\t\tIf $' + str_cold_product_code + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return = "฿" + $' + str_cold_product_code + '.Price \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
ice_tab_blend_show = True
|
||||
|
||||
shw = "$" + str_blend_product_code + ".Button"
|
||||
if str_blend_product_code == "-" :
|
||||
shw = '"Invisible"'
|
||||
ice_tab_blend_show = False
|
||||
|
||||
if len(str_blend_product_code) == 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')
|
||||
out_xml( '\t<X> TextPriceMenuBlendX </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')
|
||||
|
||||
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> eval( \r\n')
|
||||
|
||||
out_xml( '\t\tIf $' + str_blend_product_code + '.Price = -1 Then\r\n')
|
||||
out_xml( '\t\t\tVar return = "Free"\r\n')
|
||||
out_xml( '\t\tElse\r\n')
|
||||
out_xml( '\t\t\tVar return = "฿" + $' + str_blend_product_code + '.Price \r\n')
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t) </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')
|
||||
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')
|
||||
|
||||
OldVersion = False
|
||||
if OldVersion :
|
||||
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<Mode> "disable-show" </Mode>\r\n')
|
||||
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
||||
out_xml( '\t<Language>\r\n')
|
||||
#out_xml( '\t\t<ID> $Sum' + str_con_var +'.MenuText </ID> \r\n')
|
||||
out_xml( '\t\t<ID> 000013 </ID> \r\n')
|
||||
out_xml( '\t</Language>\r\n')
|
||||
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
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> auto </Size>\r\n')
|
||||
out_xml( '\t<Width>128</Width>\r\n')
|
||||
out_xml( '\t<Height>64</Height>\r\n')
|
||||
out_xml( '\t<MaxLine> 1 </MaxLine>\r\n')
|
||||
out_xml( '\t<MaxSize> 14 </MaxSize>\r\n')
|
||||
out_xml( '\t<Font> OpunMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
|
||||
out_xml( '\t<Refresh> "auto,value" </Refresh>\r\n')
|
||||
|
||||
out_xml( '\t<WidthText> 128 </WidthText>\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<Script>\r\n')
|
||||
|
||||
out_xml( '\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n')
|
||||
|
||||
out_xml( '\t\t\tSTRCONTAIN "STG=CLOSE" $' + pd_code_1 + '.TAG tag1_is_disable\r\n')
|
||||
out_xml( '\t\t\tSTRCONTAIN "STG=CLOSE" $' + pd_code_2 + '.TAG tag2_is_disable\r\n')
|
||||
out_xml( '\t\t\tSTRCONTAIN "STG=CLOSE" $' + pd_code_3 + '.TAG tag3_is_disable\r\n')
|
||||
|
||||
out_xml( '\t\t\tIf tag1_is_disable = "true" Then\r\n')
|
||||
out_xml( '\t\t\t Var $Sum' + str_con_var +'Tag = $' + pd_code_1 + '.TAG\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\t\tIf tag2_is_disable = "true" Then\r\n')
|
||||
out_xml( '\t\t\t Var $Sum' + str_con_var +'Tag = $' + pd_code_2 + '.TAG\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\t\tIf tag3_is_disable = "true" Then\r\n')
|
||||
out_xml( '\t\t\t Var $Sum' + str_con_var +'Tag = $' + pd_code_3 + '.TAG\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
|
||||
#out_xml( '\t\t\tDEBUGVAR $' + pd_code_1 + '.TAG\r\n')
|
||||
#out_xml( '\t\t\tDEBUGVAR $' + pd_code_2 + '.TAG\r\n')
|
||||
#out_xml( '\t\t\tDEBUGVAR $' + pd_code_3 + '.TAG\r\n')
|
||||
|
||||
out_xml( '\t\t\tVar $Sum' + str_con_var +'TextValue !assigned GETS($Sum' + str_con_var +'Tag,"MSG")\r\n')
|
||||
|
||||
out_xml( '\t\t\tVar $Sum' + str_con_var +'TextID !assigned GETS($Sum' + str_con_var +'Tag,"TextID")\r\n')
|
||||
|
||||
#out_xml( '\t\tDEBUGVAR TextMessageID\r\n')
|
||||
|
||||
out_xml( '\t\t\tIf $Sum' + str_con_var +'TextID != "" Then\r\n')
|
||||
out_xml( '\t\t\t Var $Sum' + str_con_var +'TextValue = ""\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t\t\tIf $Sum' + str_con_var +'TextValue = "" Then\r\n')
|
||||
out_xml( '\t\t\t\tIf $Sum' + str_con_var +'TextID = "" Then\r\n')
|
||||
out_xml( '\t\t\t\t Var $Sum' + str_con_var +'TextID = "000013"\r\n')
|
||||
out_xml( '\t\t\t\tEndIf\r\n')
|
||||
out_xml( '\t\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t\tEndIf\r\n')
|
||||
|
||||
out_xml( '\t</Script>\r\n')
|
||||
|
||||
out_xml( '\t<Language>\r\n')
|
||||
out_xml( '\t<ID> $Sum' + str_con_var +'TextID </ID> \r\n')
|
||||
out_xml( '\t</Language>\r\n')
|
||||
out_xml( '\t<Value> $Sum' + str_con_var +'TextValue </Value>\r\n')
|
||||
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
||||
|
||||
out_xml( '</Text>\r\n')
|
||||
|
||||
# feature: alert sms
|
||||
out_xml('\t<Button>\r\n')
|
||||
out_xml( '\t<X> TextPriceMenuBlendX </X>\r\n')
|
||||
out_xml( '\t<Y> 0 </Y>\r\n')
|
||||
out_xml('\t<State> eval(\r\n')
|
||||
out_xml(f'\t\tIf $Sum{str_con_var} = "Disable" Then\r\n')
|
||||
out_xml('\t\t\tIf EnableSMSDrinkReady = "true" Then\r\n')
|
||||
out_xml('\t\t\t\tVar return = "Enable"\r\n')
|
||||
out_xml('\t\t\tElse\r\n')
|
||||
out_xml('\t\t\t\tVar return = "Invisible"\r\n')
|
||||
out_xml('\t\t\tEndIf\r\n')
|
||||
out_xml('\t\tElse\"\r\n')
|
||||
out_xml('\t\t\tVar return = "Invisible"\r\n')
|
||||
out_xml('\t\tEndIf\r\n')
|
||||
out_xml('\t) </State>\r\n')
|
||||
out_xml( '\t<Filename> "ROOT/taobin_project/image/feature/alert_sms/bn_alert_customer.png" </Filename>\r\n')
|
||||
out_xml( '\t<FilenamePress> "ROOT/taobin_project/image/feature/alert_sms/bn_alert_customer.png" </FilenamePress>\r\n')
|
||||
|
||||
|
||||
out_xml('\t<EventOnClick>\r\n')
|
||||
|
||||
alert_names = '\r\n'.join(
|
||||
f'\t\tVar AlertProductName[{x}] = "{spl[ idx_name][ x + 1]}"'
|
||||
for x in range(max_can_have_lang)
|
||||
if x < len( spl[ idx_name])
|
||||
)
|
||||
|
||||
# alert script part
|
||||
out_xml(f"""{alert_names}
|
||||
\t\t\tVar AlertProductCode[0] = "{str_hot_product_code}"
|
||||
\t\t\tVar AlertProductCode[1] = "{str_cold_product_code}"
|
||||
\t\t\tVar AlertProductCode[2] = "{str_blend_product_code}"
|
||||
\t\t\tDEBUGVAR "alert!!!"
|
||||
\t\t\tTabMenuVisibleInst 99
|
||||
\t\t\tRootLayoutVisible 13 "hide"
|
||||
\t\t\tOpenInst 2 "ROOT/taobin_project/xml/features/alert_sms/page_enter_num.lxml"\r\n""")
|
||||
|
||||
out_xml('\t</EventOnClick>\r\n')
|
||||
|
||||
out_xml('\t</Button>\r\n')
|
||||
|
||||
out_xml( '</Block>\r\n')
|
||||
|
||||
|
||||
def GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code):
|
||||
GenMenuProductCodeBlock( spl[ idx_name][ idx_hot_product_code], spl[ idx_name][ idx_cold_product_code] , spl[ idx_name][ idx_blend_product_code],spl[ idx_name][ idx_date_time_start],spl[ idx_name][idx_date_time_end],spl[ idx_name][idx_product_var] )
|
||||
|
||||
idx_lang_myanmar = 6
|
||||
idx_lang_malay = 5
|
||||
idx_lang_japan = 4
|
||||
idx_lang_china = 3
|
||||
idx_lang_thai = 2
|
||||
idx_lang_eng = 1
|
||||
|
||||
|
||||
idx_name = 0
|
||||
idx_desc = 1
|
||||
idx_img = 2
|
||||
|
||||
|
||||
idx_hot_product_code = 7
|
||||
idx_cold_product_code = idx_hot_product_code + 1
|
||||
idx_blend_product_code = idx_cold_product_code + 1
|
||||
|
||||
idx_date_time_start = 17
|
||||
idx_date_time_end = idx_date_time_start + 1
|
||||
idx_product_var = idx_date_time_end + 1
|
||||
|
||||
#
|
||||
idx_hot_product_code2 = idx_blend_product_code + 1
|
||||
idx_cold_product_code2 = idx_hot_product_code2 + 1
|
||||
idx_blend_product_code2 = idx_cold_product_code2 + 1
|
||||
idx_of_eng = 2
|
||||
idx_of_eng_des = 3
|
||||
idx_of_thai = 0
|
||||
idx_of_thai_des = 1
|
||||
print ("--------------------------------------------------------------------------------------------------------------------------")
|
||||
|
||||
|
||||
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 = 0\r\n')
|
||||
out_xml('\t Var block_index_move = 0\r\n')
|
||||
#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(';dummy_layout.inc\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[ idx_of_eng] == "IGNORE":
|
||||
# continue
|
||||
if len(spl) == 1:
|
||||
if spl[0].startswith("TAG"):
|
||||
out_xml( '\t;' + spl[0] + '\r\n')
|
||||
print("Have TAGESP")
|
||||
continue
|
||||
print( '==>\t; '+ spl[ idx_name][ idx_hot_product_code] + ' ' + spl[ idx_name][ idx_cold_product_code] + ' ' + spl[ idx_name][ idx_blend_product_code] + ' \r\n')
|
||||
|
||||
if "," in spl[ idx_name][ idx_hot_product_code] and "," in spl[ idx_name][ idx_cold_product_code] and "," in spl[ idx_name][ idx_blend_product_code]:
|
||||
print(" hot = " + spl[ idx_name][ idx_hot_product_code])
|
||||
hot_pd = spl[ idx_name][ idx_hot_product_code].split(',')
|
||||
print("ok hot")
|
||||
cold_pd = spl[ idx_name][ idx_cold_product_code].split(',')
|
||||
print("ok cold")
|
||||
blend_pd = spl[ idx_name][ idx_blend_product_code].split(',')
|
||||
print("ok blend")
|
||||
date_time_start = spl[idx_name][idx_date_time_start] if len(spl[idx_name]) > 17 else "-"
|
||||
print("ok datetime")
|
||||
date_time_end = spl[idx_name][idx_date_time_end] if len(spl[idx_name]) > 17 else "-"
|
||||
print("ok datetime end")
|
||||
product_var = spl[idx_name][idx_product_var] if len(spl[idx_name]) > 17 else "-"
|
||||
print("ok pd")
|
||||
# if len(spl) > idx_name and len(spl[idx_name]) > max(idx_date_time_start, idx_date_time_end, idx_product_var):
|
||||
# date_time_start = spl[idx_name][idx_date_time_start]
|
||||
# date_time_end = spl[idx_name][idx_date_time_end]
|
||||
# product_var = spl[idx_name][idx_product_var]
|
||||
# else:
|
||||
# date_time_start = '-'
|
||||
# date_time_end = '-'
|
||||
# product_var = '-'
|
||||
# print(f"Index error: spl[{idx_name}] does not have enough elements")
|
||||
# continue
|
||||
|
||||
print(f"spl[{idx_name}] =", spl[idx_name])
|
||||
print(f"Expected indices: date_time_start:{date_time_start}, date_time_end:{date_time_end}, product_var:{product_var}")
|
||||
|
||||
|
||||
#print(' size = ' + str( len( hot_pd)) + ' size = ' + str( len( cold_pd)) + ' size = ' + str( len( blend_pd)) + '\r\n')
|
||||
list_size = len( hot_pd)
|
||||
for idx in range( list_size):
|
||||
print(' hot = ' + hot_pd[ idx] + ' cold = ' + cold_pd[ idx]+ ' blend_pd = ' + blend_pd[ idx] + '\r\n')
|
||||
if hot_pd[ idx] == '-' and cold_pd[ idx] == '-' and blend_pd[ idx] == '-':
|
||||
print("\t\t==> ignore ")
|
||||
else:
|
||||
print("\t\t==> gen ")
|
||||
GenMenuProductCodeBlock( hot_pd[ idx], cold_pd[ idx], blend_pd[ idx], date_time_start, date_time_end, product_var )
|
||||
else:
|
||||
GenMenuBlock( idx_hot_product_code, idx_cold_product_code, idx_blend_product_code)
|
||||
#out_xml( '\t; parallel '+ spl[ idx_name][ idx_hot_product_code2] + ' ' + spl[ idx_name][ idx_cold_product_code2] + ' ' + spl[ idx_name][ idx_blend_product_code2] + ' \r\n')
|
||||
#print("++++++++++++++++++++++++++++++ " + str( count_test) )
|
||||
#count_test = count_test + 1
|
||||
#if count_test > 5 :
|
||||
# break
|
||||
if len( spl[idx_name] ) >= 11:
|
||||
if spl[ idx_name][ idx_hot_product_code2] != "-" or spl[ idx_name][ idx_cold_product_code2] != "-" or spl[ idx_name][ idx_blend_product_code2] != "-":
|
||||
GenMenuBlock( idx_hot_product_code2, idx_cold_product_code2, idx_blend_product_code2)
|
||||
|
||||
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')
|
||||
# if "v2" in param:
|
||||
|
||||
|
||||
|
|
@ -11,13 +11,14 @@
|
|||
|
||||
OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 1005
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 1015
|
||||
Var ButtonLanguageCurrentYPosition = 458 - 38
|
||||
|
||||
Var ButtonLanguageListXPosition = 970
|
||||
Var ButtonLanguageListXPosition = 990
|
||||
Var ButtonLanguageListYPosition = 450 - 38
|
||||
|
||||
|
||||
|
||||
Var Timeout = 0
|
||||
|
||||
</EventOpen>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
OpenInst 13 "ROOT/taobin_project/inter/tha/xml/multi/tab_menu.lxml"
|
||||
RootLayoutVisible 13 "show"
|
||||
RootLayoutVisible 12 "show"
|
||||
RootLayoutVisible 3 "show"
|
||||
|
||||
DEBUGVAR SlientRefreshIndex
|
||||
|
|
|
|||
|
|
@ -300,9 +300,19 @@
|
|||
|
||||
print("topping_xml_file=" + topping_xml_file)
|
||||
print("current_file_name=" + current_file_name)
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_topping_select5.xml"\n')
|
||||
if len( topping_xml_file) == 0 :
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_topping_select5.xml"\n')
|
||||
else:
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/'+ topping_xml_file +'\n')
|
||||
|
||||
out_xml( '\t\t\tElse\n')
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_select6.lxml"\n')
|
||||
|
||||
if len( topping_xml_file) == 0 :
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_select6.lxml"\n')
|
||||
else:
|
||||
out_xml( '\t\t\t\tOpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/'+ topping_xml_file +'\n')
|
||||
|
||||
|
||||
out_xml( '\t\t\tEndIf\n')
|
||||
out_xml( '\t\t\t\n')
|
||||
out_xml( '\t\t\t\n')
|
||||
|
|
|
|||
|
|
@ -49,10 +49,60 @@
|
|||
|
||||
<Timeout> 1000 </Timeout>
|
||||
<EventTimeout>
|
||||
;DEBUGVAR ICE_PROCESS_STATUS
|
||||
|
||||
;include="ROOT/taobin_project/inter/tha/xml/multi/ForProGroup.inc"
|
||||
;include="ROOT/taobin_project/inter/tha/xml/multi/InstanceGetSetString.inc"
|
||||
|
||||
|
||||
If ICE_PROCESS_STATUS = 2 Then
|
||||
Var ice_tab_process_show = "Enable"
|
||||
Var ice_show_open = ice_tab_text + ICE_PROCESS_TXT
|
||||
Else
|
||||
Var ice_tab_process_show = "Invisible"
|
||||
EndIf
|
||||
|
||||
|
||||
GetVisible inst_show_frozen_fruit
|
||||
|
||||
|
||||
If inst_show_frozen_fruit = 1 Then
|
||||
If inst_show_frozen_fruit_counter > 0 Then
|
||||
DEBUGVAR inst_show_frozen_fruit_counter
|
||||
|
||||
Var inst_show_frozen_fruit_counter = inst_show_frozen_fruit_counter - 1
|
||||
|
||||
If inst_show_frozen_fruit_counter = 0 Then
|
||||
RefreshAll
|
||||
Var inst_show_frozen_fruit_counter = 4
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
; setvarint RefreshFrozenFruitMenu 1
|
||||
If RefreshFrozenFruitMenu = 1 Then
|
||||
Var RefreshFrozenFruitMenu = 0
|
||||
SAVELOG "OPEN FROM 3"
|
||||
Open "ROOT/taobin_project/inter/tha/xml/multi/v3/page_catalog_group_frozen_fruit.lxml"
|
||||
EndIf
|
||||
|
||||
; setvarint ScriptFrozenMenu 1
|
||||
If ScriptFrozenMenu = 1 Then
|
||||
Var ScriptFrozenMenu = 0
|
||||
SAVELOG "Runscript 3"
|
||||
Script "-" "-"
|
||||
EndIf
|
||||
|
||||
If FrozenFruitRefreshTimeOut > 15 Then
|
||||
Var FrozenFruitRefreshTimeOut = 0
|
||||
Script "-" "-"
|
||||
EndIf
|
||||
|
||||
Var FrozenFruitRefreshTimeOut = FrozenFruitRefreshTimeOut + 1
|
||||
|
||||
|
||||
TimerReset
|
||||
</EventTimeout>
|
||||
|
||||
|
|
@ -320,9 +370,9 @@
|
|||
Else
|
||||
Var show_eng = "true"
|
||||
EndIf
|
||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_topping_select5.xml"
|
||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_frozen_fruit_select.lxml
|
||||
Else
|
||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_select6.lxml"
|
||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/page_topping_frozen_fruit_select.lxml
|
||||
EndIf
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,60 @@
|
|||
|
||||
<Timeout> 1000 </Timeout>
|
||||
<EventTimeout>
|
||||
;DEBUGVAR ICE_PROCESS_STATUS
|
||||
|
||||
;include="ROOT/taobin_project/inter/tha/xml/multi/ForProGroup.inc"
|
||||
;include="ROOT/taobin_project/inter/tha/xml/multi/InstanceGetSetString.inc"
|
||||
|
||||
|
||||
If ICE_PROCESS_STATUS = 2 Then
|
||||
Var ice_tab_process_show = "Enable"
|
||||
Var ice_show_open = ice_tab_text + ICE_PROCESS_TXT
|
||||
Else
|
||||
Var ice_tab_process_show = "Invisible"
|
||||
EndIf
|
||||
|
||||
|
||||
GetVisible inst_show_frozen_fruit
|
||||
|
||||
|
||||
If inst_show_frozen_fruit = 1 Then
|
||||
If inst_show_frozen_fruit_counter > 0 Then
|
||||
DEBUGVAR inst_show_frozen_fruit_counter
|
||||
|
||||
Var inst_show_frozen_fruit_counter = inst_show_frozen_fruit_counter - 1
|
||||
|
||||
If inst_show_frozen_fruit_counter = 0 Then
|
||||
RefreshAll
|
||||
Var inst_show_frozen_fruit_counter = 4
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
; setvarint RefreshFrozenFruitMenu 1
|
||||
If RefreshFrozenFruitMenu = 1 Then
|
||||
Var RefreshFrozenFruitMenu = 0
|
||||
SAVELOG "OPEN FROM 3"
|
||||
Open "ROOT/taobin_project/inter/tha/xml/multi/v3/page_catalog_group_frozen_fruit.lxml"
|
||||
EndIf
|
||||
|
||||
; setvarint ScriptFrozenMenu 1
|
||||
If ScriptFrozenMenu = 1 Then
|
||||
Var ScriptFrozenMenu = 0
|
||||
SAVELOG "Runscript 3"
|
||||
Script "-" "-"
|
||||
EndIf
|
||||
|
||||
If FrozenFruitRefreshTimeOut > 15 Then
|
||||
Var FrozenFruitRefreshTimeOut = 0
|
||||
Script "-" "-"
|
||||
EndIf
|
||||
|
||||
Var FrozenFruitRefreshTimeOut = FrozenFruitRefreshTimeOut + 1
|
||||
|
||||
|
||||
TimerReset
|
||||
</EventTimeout>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue