2023-01-01, support urbtix/cityline new version web html

master
CHUN YU YAO 2023-01-02 14:53:28 +08:00
parent c66411065f
commit 11bc5ca924
2 changed files with 731 additions and 296 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ import json
import webbrowser import webbrowser
import pyperclip import pyperclip
CONST_APP_VERSION = u"MaxBot (2022.12.26)" CONST_APP_VERSION = u"MaxBot (2023.01.01)"
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom" CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top" CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
@ -746,7 +746,7 @@ def callbackHomepageOnChange(event):
def callbackDateAutoOnChange(): def callbackDateAutoOnChange():
showHideTixcraftBlocks() showHideTixcraftBlocks()
def showHideBlocks(all_layout_visible=False): def showHideBlocks():
global UI_PADDING_X global UI_PADDING_X
global frame_group_kktix global frame_group_kktix
@ -754,62 +754,27 @@ def showHideBlocks(all_layout_visible=False):
global frame_group_tixcraft global frame_group_tixcraft
global frame_group_tixcraft_index global frame_group_tixcraft_index
# for kktix only.
global lbl_kktix_area_mode
# disable password brute force attack
#global lbl_kktix_answer_dictionary
#global txt_kktix_answer_dictionary
#global txt_kktix_answer_dictionary_index
global combo_homepage global combo_homepage
global combo_kktix_area_mode
global combo_kktix_area_mode_index
new_homepage = combo_homepage.get().strip() new_homepage = combo_homepage.get().strip()
#print("new homepage value:", new_homepage) #print("new homepage value:", new_homepage)
show_block_index = 0 BLOCK_STYLE_TIXCRAFT = 0
if u'tixcraft' in new_homepage: BLOCK_STYLE_KKTIX = 1
show_block_index = 1 STYLE_KKTIX_DOMAIN_LIST = ['kktix']
if u'famiticket' in new_homepage:
show_block_index = 1
# all_layout_visible==true, means enter function when onload(). show_block_index = BLOCK_STYLE_TIXCRAFT
#print("all_layout_visible:", all_layout_visible) for domain_name in STYLE_KKTIX_DOMAIN_LIST:
if all_layout_visible: if domain_name in new_homepage:
if show_block_index==0: show_block_index = BLOCK_STYLE_KKTIX
frame_group_tixcraft.grid_forget()
if u'kktix' in new_homepage: if show_block_index == BLOCK_STYLE_KKTIX:
#combo_kktix_area_mode.grid(column=1, row=combo_kktix_area_mode_index, sticky = W) frame_group_kktix.grid(column=0, row=frame_group_kktix_index, padx=UI_PADDING_X)
#txt_kktix_answer_dictionary.grid(column=1, row=txt_kktix_answer_dictionary_index, sticky = W) frame_group_tixcraft.grid_forget()
pass
else:
combo_kktix_area_mode.grid_forget()
# disable password brute force attack
#txt_kktix_answer_dictionary.grid_forget()
else:
frame_group_kktix.grid_forget()
else: else:
if show_block_index == 0: frame_group_tixcraft.grid(column=0, row=frame_group_tixcraft_index, padx=UI_PADDING_X)
frame_group_kktix.grid(column=0, row=frame_group_kktix_index, padx=UI_PADDING_X) frame_group_kktix.grid_forget()
frame_group_tixcraft.grid_forget()
if u'kktix' in new_homepage:
combo_kktix_area_mode.grid(column=1, row=combo_kktix_area_mode_index, sticky = W)
# disable password brute force attack
#txt_kktix_answer_dictionary.grid(column=1, row=txt_kktix_answer_dictionary_index, sticky = W)
else:
combo_kktix_area_mode.grid_forget()
# disable password brute force attack
#txt_kktix_answer_dictionary.grid_forget()
else:
frame_group_tixcraft.grid(column=0, row=frame_group_tixcraft_index, padx=UI_PADDING_X)
frame_group_kktix.grid_forget()
showHideTixcraftBlocks() showHideTixcraftBlocks()
showHidePass1SeatRemaining() showHidePass1SeatRemaining()
@ -1316,7 +1281,8 @@ def PreferenctTab(root, config_dict, language_code, UI_PADDING_X):
global frame_group_kktix_index global frame_group_kktix_index
frame_group_kktix_index = row_count frame_group_kktix_index = row_count
frame_group_kktix.grid(column=0, row=row_count, sticky = W, padx=UI_PADDING_X) #PS: don't need show when onload(), because show/hide block will load again.
#frame_group_kktix.grid(column=0, row=row_count, sticky = W, padx=UI_PADDING_X)
row_count+=1 row_count+=1
@ -1495,10 +1461,10 @@ def PreferenctTab(root, config_dict, language_code, UI_PADDING_X):
global frame_group_tixcraft_index global frame_group_tixcraft_index
frame_group_tixcraft_index = row_count frame_group_tixcraft_index = row_count
frame_group_tixcraft.grid(column=0, row=row_count, sticky = W, padx=UI_PADDING_X) #PS: don't need show when onload(), because show/hide block will load again.
#frame_group_tixcraft.grid(column=0, row=row_count, sticky = W, padx=UI_PADDING_X)
showHideBlocks()
showHideBlocks(all_layout_visible=True)
def AdvancedTab(root, config_dict, language_code, UI_PADDING_X): def AdvancedTab(root, config_dict, language_code, UI_PADDING_X):
row_count = 0 row_count = 0