Example #1
0
def displayAccounts():

    accounts = d.readData()
    row = 6
    for key, value in accounts.items():
        account = value
        Label(roots, text=account["n"],
              font="sans-serif 10 bold").grid(row=row,
                                              column=0,
                                              sticky=W,
                                              pady=5)
        Button(roots,
               text='View Details',
               fg='green',
               command=lambda key=key: viewDetails(key)).grid(row=row,
                                                              column=2,
                                                              sticky=E,
                                                              padx=10)
        if not unlocked:
            deleteBtn = Button(roots,
                               text='Delete Account',
                               command=lambda key=key: deleteEntryHandler(key))
            deleteBtn.grid(row=row, column=3, padx=10, sticky=E)
        else:
            deleteBtn = Button(roots,
                               text='Delete Account',
                               command=lambda key=key: deleteEntryHandler(key))
            deleteBtn.grid(row=row, column=3, padx=10, sticky=E)

        row += 1
Example #2
0
def displayAccounts():

    accounts = d.readData()
    row = 6
    for key, value in accounts.items():
        account = value
        Label(roots, text=account["n"]).grid(row=row, column=0, sticky=W, pady=5)
        Button(roots, text='View Details', command=lambda key=key: viewDetails(key)).grid(row=row, column=1, sticky=E,
                                                                                          pady=5)
        row += 1
Example #3
0
def viewDetails(id):
    global detailsWindow
    global decryptPwdT
    global decryptPwdE
    global decryptPwdBtn
    global detailsGapL2
    global pwdTL

    data = d.readData()
    name = data[id]["n"]
    username = data[id]["u"]
    password = "******"

    detailsWindow = Tk()
    detailsWindow.title('Account Details')
    detailsWindow.geometry('400x260')
    title = Label(detailsWindow, text=name + '\n', font="Helvetica 15 bold")
    title.grid(row=0, column=0, columnspan=3, sticky=W)
    unameL = Label(detailsWindow, text='Username: '******'Password: '******'\n', justify=LEFT)
        detailsGapL.grid(row=3, column=0, columnspan=4, sticky=W)
        decryptPwdT = Label(detailsWindow, text="Global Password: "******"p"]: decryptHandler(key))
        decryptPwdBtn.grid(row=6, column=1, columnspan=4, sticky=E,padx=15)
    else:
        detailsGapL = Label(detailsWindow, text='\n', justify=LEFT)
        detailsGapL.grid(row=3, column=0, columnspan=4, sticky=W)
        decryptPwdBtn = Button(detailsWindow, text='Decrypt Password', command=lambda key=data[id]["p"]: decryptHandler(key))
        decryptPwdBtn.grid(row=6, column=1, sticky=W)
        loginPwdBtn = Button(detailsWindow, text='Copy Password', command=lambda key=data[id]["p"]: copy_button(key))
        loginPwdBtn.grid(row=6, column=5, columnspan=4, sticky=E)
        detailsGapL2 = Label(detailsWindow, text='\n\n')
        detailsGapL2.grid(row=7, column=0, columnspan=2, sticky=W)
        deleteBtn = Button(detailsWindow, text='Delete Account', command=lambda key=id: deleteEntryHandler(key))
        deleteBtn.grid(row=8, column=1, padx=15, sticky=E)