Beispiel #1
0
def LoadConfigScreen():
    s = Tix.Toplevel()
    s.protocol("WM_DELETE_WINDOW", on_closing)
    s.title("Table InfExtractor")
    s.geometry('{}x{}'.format(500, 500))
    topframe = Tix.Frame(s, height=10)
    topframe.pack()
    frame = Tix.Frame(s)
    frame.pack()
    newproject = Tix.Radiobutton(frame,
                                 text="Create New Project",
                                 variable=variab,
                                 value="NP",
                                 command=lambda: EnableLEntity(E2, Lb3))
    newproject.pack()
    newprojectFrame = Tix.Frame(frame, height=100)
    names = Tix.StringVar()
    label_projectName = Tix.Label(newprojectFrame, textvariable=names)
    names.set("Project Name")
    label_projectName.pack(side=Tix.LEFT)
    E2 = Tix.Entry(newprojectFrame, bd=5)
    E2.pack(side=Tix.LEFT)
    newprojectFrame.pack()
    loadproject = Tix.Radiobutton(frame,
                                  text="Load Project",
                                  variable=variab,
                                  value="LP",
                                  command=lambda: EnableLB(Lb3, E2))
    loadproject.pack()
    loadprojectFrame = Tix.Frame(frame, height=100)
    loadprojectFrame.pack()
    Lb3 = Tix.Listbox(loadprojectFrame, width=80, height=20)
    projects = FileManipulationHelper.readProjects()
    i = 1
    for p in projects:
        Lb3.insert(i, p)
        i = i + 1
    Lb3.pack()
    Lb3.configure(exportselection=False)
    Lb3.configure(state=Tix.DISABLED)
    variab.set("NP")
    newproject.select()
    BottomFrame = Tix.Frame(s, height=10)
    BottomFrame.pack()
    NextButtonFrame = Tix.Frame(s)
    NextButtonFrame.pack()
    NextButton = Tix.Button(
        NextButtonFrame,
        text="Next",
        fg="black",
        command=lambda: FinishFirstScreen(variab, E2, Lb3, s))
    NextButton.pack()
Beispiel #2
0
def MakeWorkingScreen(rules, window, project_name, skip_val):
    window.withdraw()
    top = Tix.Toplevel()
    top.protocol("WM_DELETE_WINDOW", on_closing)
    top.title("Working...")
    top.geometry('{}x{}'.format(400, 400))
    extracted = Tix.IntVar()
    lab = Tix.Label(top, text="Please be patient... Processing...")
    lab.pack()
    Lb1 = Tix.Listbox(top, width=60, height=20)
    Lb1.pack()
    size = Lb1.size()
    refreshButton = Tix.Button(
        top,
        text="Refresh",
        fg="black",
        command=lambda: RefreshDatabaseData(Lb1, project_name))
    refreshButton.pack()
    processing_rules = LoadRulesForProcessing(project_name)
    thread = Thread(target=ProcessDataV,
                    args=(project_name, processing_rules, top, extracted))
    thread.start()
    print "thread finished...exiting"
    pass
Beispiel #3
0
 def __init__(self, master=None):
     Tk.Frame.__init__(self, master)
     self.pack()
     self.entrythingy = Tix.Entry().pack()
     self.Listthingy = Tix.Listbox(name= 'lbb').pack()