def Button_4_onCommand(className, widgetName): UrlText = Fun.GetUIText(className, "Entry_3") Webbrowser_5 = Fun.GetUIEle(className, 'Webbrowser_5') Webbrowser_5.set_URL(UrlText) Button_7 = Fun.GetUIEle(className, 'Button_7') Button_7.configure(state="normal") Button_8 = Fun.GetUIEle(className, 'Button_8') Button_8.configure(state="disable")
def Button_6_onCommand(className, widgetName): QueryID = Fun.GetUIText(className, 'Entry_5') Express = Fun.GetUIEle(className, 'Express_9') ListBox = Fun.GetUIEle(className, 'ListBox_7') isThread = Fun.GetElementVariable(className, "CheckButton_10") print(isThread) if isThread == True: run_thread = threading.Thread(target=ThreadCount, args=[Express, QueryID, ListBox]) run_thread.start() else: Express.set_ExpressNumber(QueryID) Express.Query(ListBox)
def Form_1_onLoad(className): pass pass pass pass pass Fun.SetUIText(className, "Entry_3", "http://www.baidu.com") Webbrowser_5 = Fun.GetUIEle(className, 'Webbrowser_5') Entry_3_Variable = Fun.G_UIElementVariableArray[className]['Entry_3'] Webbrowser_5.setURLEntryVariable(Entry_3_Variable) Button_7 = Fun.GetUIEle(className, 'Button_7') Button_7.configure(state="disable") Button_8 = Fun.GetUIEle(className, 'Button_8') Button_8.configure(state="disable")
def Configure(self, event): if self.root == event.widget: Frame_2 = Fun.GetUIEle(self.__class__.__name__, 'Frame_2') Frame_2.place(x=0, y=30, width=event.width, height=event.height - 30) Webbrowser_5 = Fun.GetUIEle(self.__class__.__name__, 'Webbrowser_5') Webbrowser_5.resetSize(event.width, event.height - 30) Entry_3 = Fun.GetUIEle(self.__class__.__name__, 'Entry_3') Entry_3.place(x=157, y=7, width=event.width - 270, height=20) Entry_3.focus_force() Button_4 = Fun.GetUIEle(self.__class__.__name__, 'Button_4') Button_4.place(x=event.width - 110, y=7, width=100, height=20)
def Button_8_onCommand(className, widgetName): Webbrowser_5 = Fun.GetUIEle(className, 'Webbrowser_5') Webbrowser_5.goForward() if Webbrowser_5.cangoBack() == False: Button_7 = Fun.GetUIEle(className, 'Button_7') Button_7.configure(state="disable") else: Button_7 = Fun.GetUIEle(className, 'Button_7') Button_7.configure(state="normal") if Webbrowser_5.cangoForward() == False: Button_8 = Fun.GetUIEle(className, 'Button_8') Button_8.configure(state="disable") else: Button_8 = Fun.GetUIEle(className, 'Button_8') Button_8.configure(state="normal")
def Button_11_onCommand(className,widgetName): name = Fun.GetUIText(className,'Entry_3') gender = Fun.GetElementVariable(className,'Group_1') if gender == 1: gender ='男' else: gender ='女' age = Fun.GetUIText(className,'Entry_8') combobox = Fun.GetUIEle(className,'ComboBox_10') address=combobox.get() treeview = Fun.GetUIEle('TabPage1','TreeView_2') treeview.insert('','end',values=(name,gender,age,address)) Fun.SetUIText(className,'Entry_3','') Fun.SetElementVariable(className,'Group_1',1) Fun.SetUIText(className,'Entry_8',0) combobox.current(0)
def Button_4_onCommand(className, widgetName): StockCode = Fun.GetUIText(className, "Entry_3") StockInfo = StockMonitor.getStockInfo(StockCode) StockCode = StockInfo[u'code'] StockName = StockInfo[u'name'] StockTime = StockInfo[u'time'] StockPrice = StockInfo[u'price'] MaxPrice = Fun.GetUIText(className, "Entry_10") MinPrice = Fun.GetUIText(className, "Entry_12") TreeView13 = Fun.GetUIEle(className, "TreeView_13") TreeView13.insert('', 'end', values=(StockCode[0], StockName[0], StockTime[0], StockPrice[0], MinPrice, MaxPrice)) StockArray = Fun.GetUIData(className, "TreeView_13", "StockArray") StockArray.append([StockCode[0], MaxPrice, MinPrice])
def Button_6_onCommand(className, widgetName): global StockMonitorInst BtnText = Fun.GetUIText(className, widgetName) if BtnText == "启动监控": if StockMonitorInst == None: StockMonitorInst = StockMonitor.StockMonitor() StockArray = Fun.GetUIData(className, "TreeView_13", "StockArray") for stockcode in StockArray: StockMonitorInst.addStock(stockcode[0], stockcode[1], stockcode[2]) TreeView = Fun.GetUIEle(className, "TreeView_13") PhoneNumber = Fun.GetUIText(className, "Entry_17") StockMonitorInst.SetMonitorInfo(TreeView, PhoneNumber) StockMonitorInst.StartMonitoring() Fun.SetUIText(className, widgetName, "停止监控") else: StockMonitorInst.StopMonitoring() Fun.SetUIText(className, widgetName, "启动监控")
def Button_13_onCommand(className, widgetName): root = Fun.GetUIEle(className, 'root') UIInputDataArray = Fun.UpdateUIInputDataArray(className) # print(UIInputDataArray) root.destroy()
def Button_14_onCommand(className, widgetName): root = Fun.GetUIEle(className, 'root') root.destroy()
def Button_5_onCommand(className, widgetName): MySocket = Fun.GetUIEle(className, 'MySocket_9') IPAddr = Fun.GetUIData(className, 'Entry_2', 'IPAddr') PORT = Fun.GetUIData(className, 'Entry_4', 'Port') MySocket.createServer(IPAddr, PORT)
def Button_9_onCommand(className, widgetName): MySocket = Fun.GetUIEle(className, 'MySocket_11') MsgText = Fun.GetUIText(className, 'Entry_7') MySocket.sendMessage(MsgText)
def Button_8_onCommand(className, widgetName): MySocket = Fun.GetUIEle(className, 'MySocket_11') IPAddr = Fun.GetUIData(className, 'Entry_3', 'IPAddr') PORT = Fun.GetUIData(className, 'Entry_5', 'Port') MySocket.connServer(IPAddr, PORT)
def Button_10_onCommand(className, widgetName): Webbrowser_5 = Fun.GetUIEle(className, 'Webbrowser_5') Webbrowser_5.gohome()
def Button_9_onCommand(className, widgetName): Webbrowser_5 = Fun.GetUIEle(className, 'Webbrowser_5') Webbrowser_5.refresh()