Beispiel #1
0
    def login(self, window, content, username, password, login_content):
        is_valid = database.check_login(username, password)

        input_warning = Text(login_content, fg="red", width=35, height=1, pady=2, wrap=WORD)
        input_warning.insert(INSERT, "Please check your input for errors")

        if is_valid:
            login_content.grid_forget()
            landing_page.LandingPage(window, content, username)
        else:
            input_warning.grid(row=0, column=1, columnspan=3)
Beispiel #2
0
def main():
    '''Main function.'''
    root = tkinter.Tk()
    window = lp.LandingPage(root)
    t = trie.Trie()
    dictionary = set(words.words())
    t.insert_words(dictionary)
    root.mainloop()
    num, board_size, input_string = window.retrieve_val()
    board = generate_board(num, board_size, input_string)
    # user define manually
    # dictionary = ['susan', 'susanie', 'sin', 'apple', 'orange', 'an']
    output = dfs(num, board, t)
    print("There are {} number of possible word choices".format(len(output)))
    # allow user to inspect output if interested.
    print(output, "\n")
Beispiel #3
0
 def go_back(self, content, progress_content, username):
     progress_content.grid_forget()
     landing_page.LandingPage(config.global_window, content, username)
Beispiel #4
0
 def go_back(self, content, add_workout_content, username):
     add_workout_content.grid_forget()
     landing_page.LandingPage(config.global_window, content, username)