Beispiel #1
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 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")