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])
Esempio n. 2
0
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_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_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)
Esempio n. 6
0
def Button_9_onCommand(className, widgetName):
    MySocket = Fun.GetUIEle(className, 'MySocket_11')
    MsgText = Fun.GetUIText(className, 'Entry_7')
    MySocket.sendMessage(MsgText)