TkGUIFirstScreen.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:TabInOut 作者: nikolamilosevic86 项目源码 文件源码
def LoadFirstCfGScreen(project_name):
    top = Tix.Toplevel()
    top.protocol("WM_DELETE_WINDOW", on_closing)
    top.title("Table InfExtractor")
    top.geometry('{}x{}'.format(500, 500))
    topframe = Tix.Frame(top,height=10)
    topframe.pack()
    frame = Tix.Frame(top)
    frame.pack()
    topframe2 = Tix.Frame(top,height=10)
    topframe2.pack()
    middleframe = Tix.Frame(top)
    middleframe.pack()
    bottomframe2 = Tix.Frame(top,height=10)
    bottomframe2.pack( side = Tix.BOTTOM )
    bottomframe = Tix.Frame(top)
    bottomframe.pack( side = Tix.BOTTOM )

    name = Tix.StringVar()
    label_name = Tix.Label(frame,textvariable=name)
    name.set("Name of task:")
    label_name.pack(side = Tix.LEFT)
    name2 = Tix.StringVar()
    label_name2 = Tix.Label(frame,textvariable=name2)
    name2.set(project_name)
    label_name2.pack(side = Tix.LEFT)
    ConfigureDB = Tix.Button(frame, text="Configure Database", fg="black",command=lambda: ConfigureDatabaseScreen(project_name))
    ConfigureDB.pack( side = Tix.LEFT)
    clearTable = Tix.Button(frame, text="Clear DB Table", fg="black",command = lambda: ClearDBTables(project_name))
    clearTable.pack( side = Tix.LEFT)
    vars = FileManipulationHelper.loadVariables(project_name)
    Lb1 = ttk.Treeview(middleframe,columns=40,height=19)

    Lb1.pack()
    size = Lb1.size()
    for var in vars:
        Lb1.insert('', 'end', var, text=var)
        rules = FileManipulationHelper.loadRules(project_name,var)
        for rule in rules:
            Lb1.insert(var, 'end', text=rule)
        #Lb1.insert(size,rule)
        size = Lb1.size()
    AddVariables = Tix.Button(bottomframe, text="Add Variable", fg="black", command=lambda:AddVariable(project_name, Lb1))
    AddVariables.pack(side=Tix.LEFT)

    AddRules = Tix.Button(bottomframe, text="Add Rule", fg="black",command=lambda:AddEditRule(project_name,Lb1))
    AddRules.pack( side = Tix.LEFT)
    DeleteRule = Tix.Button(bottomframe, text="Delete Rule", fg="black",command=lambda:RemoveRule(Lb1,project_name))
    DeleteRule.pack( side = Tix.LEFT)
    EditRuleA = Tix.Button(bottomframe, text="Edit Rule", fg="black",command=lambda:EditRule(project_name,Lb1))
    EditRuleA.pack( side = Tix.LEFT)
    #MoveUpRule = Tix.Button(bottomframe, text="Move Up Rule", fg="black",command=lambda:MoveRuleUp(Lb1))
    #MoveUpRule.pack( side = Tix.LEFT)
    #MoveDownRule =Tix.Button(bottomframe, text="Move Down Rule", fg="black",command=lambda:MoveRuleDown(Lb1))
    #MoveDownRule.pack( side = Tix.LEFT)
    skip_val = 0
    Next = Tix.Button(bottomframe, text="Next", bg="green", command=lambda:MakeWorkingScreen(rules, top,project_name,skip_val))
    Next.pack( side = Tix.LEFT)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号