Exemple #1
0
def CreateSetup(self):
    self = Gui(debug=False)
    sw = self.winfo_screenwidth()
    sh = self.winfo_screenheight()
    x = (sw/2) - (500/2) 
    y = (sh/2) - (260/2)
    self.geometry('%dx%d+%d+%d' % (500, 260, x, y))
    self.resizable(width=False, height=False)
    Setup.Create(self)
    self.mainloop()
Exemple #2
0
def CreateSettings(self):
    self = Gui(debug=False)
    self.resizable(width=False, height=False)
    self.maxsize(width=1024, height=768)
    self.maincol = self.col(weights=[0,0,1]) # Resizing of Windows
    MenuBar.Create(self)
    self.title('Doru\'s No Frills - Store Settings')
    StatusBar.Create(self)
    StoreSettings.Create(self)
    Modules.Check.openwindow = "Store Settings"
    self.mainloop()
Exemple #3
0
def CreateDebug(self):
    self = Gui(debug=False)
    self.resizable(width=False, height=False)
    self.maxsize(width=1024, height=768)
    self.maincol = self.col(weights=[0,0,1]) # Resizing of Windows
    MenuBar.Create(self)
    self.title('Doru\'s No Frills - Welcome')
    StatusBar.Create(self)
    WelcomeScreen.Create(self)
    Modules.Check.openwindow = "WelcomeScreen"
    self.mainloop()
Exemple #4
0
def CreatePopUp(old, paid, change, session):
    self = Gui(debug=False)
    self.protocol("WM_DELETE_WINDOW", Callable(Destroy, self, old))
    self.grab_set_global()
    self.focus_force()
    sw = self.winfo_screenwidth()
    sh = self.winfo_screenheight()
    x = (sw / 2) - (450 / 2)
    y = (sh / 2) - (150 / 2)
    self.geometry('%dx%d+%d+%d' % (450, 150, x, y))
    self.resizable(width=False, height=False)
    self.title('Transaction Details')
    self.logo = Tkinter.PhotoImage(file='Files\Images\SmallLogo.gif')

    self.gr(cols=2)
    self.la('Amount Paid', font='Calibri', pady=15)
    self.la('Change Tendered', font='Calibri', pady=15)
    paidentry = self.en(font='Calibri',
                        padx=15,
                        text=paid,
                        justify=CENTER,
                        readonlybackground='white')
    changeentry = self.en(font='Calibri',
                          padx=15,
                          text=change,
                          justify=CENTER,
                          readonlybackground='white')
    paidentry.config(state='readonly')
    changeentry.config(state='readonly')
    self.endgr()
    self.la()
    self.row(weights=[0, 1])
    self.bu('OK',
            padx=5,
            pady=7,
            font='Calibri',
            background='#47c57f',
            justify=CENTER,
            width='40',
            command=Callable(Destroy, self, old))
    self.bu('Print Receipt',
            padx=7,
            pady=7,
            font='Calibri',
            background='#d94444',
            justify=CENTER,
            width='5',
            command=Callable(Print, self, old, session, paid, change))
    self.endrow()
    self.mainloop()
Exemple #5
0
def CreateProject(self):
    Users=Account_Read()
    del Users[0][0], Users[1][0], Users[2][0], Users[3][0], Users[4][0], Users[5][0]
    if Users != [[], [], [], [], [], []]:            
        self = Gui(debug=False)
        sw = self.winfo_screenwidth()
        sh = self.winfo_screenheight()
        x = (sw/2) - (450/2) 
        y = (sh/2) - (350/2)
        self.geometry('%dx%d+%d+%d' % (450, 350, x, y))
        self.resizable(width=False, height=False)
        self.maxsize(width=1024, height=768)
        self.maincol = self.col(weights=[0,0,0,1]) # Resizing of Windows
        Login.Create(self)
        self.mainloop()
    else:
        CreateSetup(self)
Exemple #6
0
def CheckAns(self, Event=None):
    global screen
    global index
    global Password
    global EntryAns
    Accountlist = Account_Read()
    RealAns = Accountlist[5][index + 1]
    EntryAns = self.entry.get()
    Pass = random.sample([
        'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f',
        'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', '1', '2',
        '3', '4', '5', '6', '7', '8', '9', '0'
    ], 6)
    for i in range(len(Pass)):
        Password = Password + Pass[i]

    if EntryAns == RealAns:
        screen = '3'
        self.destroy()
        self = Gui(debug=False)
        sw = self.winfo_screenwidth()
        sh = self.winfo_screenheight()
        x = (sw / 2) - (450 / 2)
        y = (sh / 2) - (175 / 2)
        self.geometry('%dx%d+%d+%d' % (450, 175, x, y))
        self.resizable(width=False, height=False)
        self.title('Password Recovery')
        self.passla = self.la(text='Your New Password Is...',
                              font=('Calibri', '20', 'bold'))
        self.passen = self.la(text=Password)
        self.Passla2 = self.la(
            font=('Calibri', '10', 'italic'),
            text=
            'Be sure to copy your new password! \n After you log in, you may go to the \'Change Password\' screen \n to get a new password.'
        )
        self.okbutt = self.bu(text='Confirm Password Change',
                              font=('Calibri', '12', 'bold'),
                              padx=15,
                              bg='#799AA5',
                              command=Callable(CloseDown, self))
    elif EntryAns != RealAns:
        self.entry.delete(0, 'end')
        tkMessageBox.showwarning('Error',
                                 'Your security answer was not correct')
    return self
Exemple #7
0
def CreateForgot():
    Modules.Check.openwindow = 'Password Recovery'
    global Password
    self = Gui(debug=False)
    sw = self.winfo_screenwidth()
    sh = self.winfo_screenheight()
    x = (sw / 2) - (450 / 2)
    y = (sh / 2) - (175 / 2)
    self.geometry('%dx%d+%d+%d' % (450, 175, x, y))
    self.resizable(width=False, height=False)
    self.title('Password Recovery')
    self.row()
    self.label = self.la('Username:'******'Calibri',
                         pady=15,
                         padx=15,
                         justify=CENTER,
                         width='5')
    self.entry = self.en(padx=15, pady=15)
    self.endrow()
    self.row()
    self.okbutt = self.bu('OK',
                          font='Calibri',
                          pady=15,
                          padx=15,
                          background='yellow',
                          justify=CENTER,
                          command=Callable(CheckUser, self))
    self.canbutt = self.bu('Cancel',
                           font='Calibri',
                           pady=15,
                           padx=15,
                           background='red',
                           justify=CENTER,
                           command=Callable(CheckUser, self))
    self.endrow()
    self.mainloop()
Exemple #8
0
def Create():
    self = Gui(debug=False)
    self.grab_set_global()
    self.focus_force()
    sw = self.winfo_screenwidth()
    sh = self.winfo_screenheight()
    x = (sw / 2) - (456 / 2)
    y = (sh / 2) - (450 / 2)
    self.geometry('%dx%d+%d+%d' % (456, 450, x, y))
    self.resizable(width=False, height=False)
    self.title('About')
    photo = PhotoImage(file='Files\Images\About.gif', master=self)
    canvas = self.ca(width=456, height=388)
    canvas.image([0, 0], image=photo)
    self.protocol("WM_DELETE_WINDOW", Callable(shutdown, self))
    self.bu('EXIT',
            padx=100,
            font='Calibri',
            background='#d94444',
            justify=CENTER,
            width='40',
            command=Callable(shutdown, self))
    self.la()
    self.mainloop()
Exemple #9
0
def Edit_Shift_Screen(self):
    global EditID
    global EditCI
    global EditCO
    global DateID
    index=self.PayrollManagement.ListBox.curselection()
    if index==():
        ShiftError()
        return
    else:
        ID=index[0]
        #self.grab_set_global()
        editself=Gui(debug=False)
        sw = editself.winfo_screenwidth()
        sh = editself.winfo_screenheight()
        x = (sw/2) - (450/2) 
        y = (sh/2) - (310/2)
        editself.geometry('%dx%d+%d+%d' % (450, 310, x, y))
        editself.resizable(width=False, height=False)
        editself.title('Edit Shift')
        editself.ErrorLabel=editself.la()
        editself.gr(cols=2)
        editself.la('Shift ID:',font='Calibri',pady=15)
        Shift=Modules.PayrollMGMTdisplay.ShiftIDEdit(self, ID)
        Date=Modules.PayrollMGMTdisplay.DateEdit(self, ID)
        CheckIn=Modules.PayrollMGMTdisplay.CheckInEdit(self, ID)
        CheckOut=Modules.PayrollMGMTdisplay.CheckOutEdit(self, ID)
        EditID = editself.en(font='Calibri', padx=15,pady=15, text=Shift, justify=CENTER, readonlybackground='white')
        EditID.config(state='readonly')
        editself.la('Date:',font='Calibri',pady=15)
        DateID = editself.en(font='Calibri', padx=15,pady=15, text=Date, justify=CENTER, readonlybackground='white')
        DateID.config(state='readonly')
        

        editself.la('Check In Time:',font='Calibri',pady=15)
        EditCI = editself.en(font='Calibri',  padx=15,pady=15, text=CheckIn, justify=CENTER, readonlybackground='white')
        editself.la('Check Out Time:',font='Calibri',pady=15)
        EditCO = editself.en(font='Calibri',  padx=15, pady=15,text=CheckOut, justify=CENTER, readonlybackground='white')
        #paidentry.config(state='readonly')
        #changeentry.config(state='readonly')
        editself.endgr()

        editself.row()
        editself.bu('Edit Shift', font='Calibri',pady=15, padx=40,  bg='#47c57f',activebackground='lightgreen', fg='black',justify=CENTER, width='5', command=Callable(Edit_Shift,self, editself))
        editself.bu('Cancel', font='Calibri',pady=15, padx=40, bg='#d94444',activebackground='#CD5555', fg='black',justify=CENTER, width='5', command=Callable(CancelEdit, self, editself))
        editself.endrow()

        
        editself.grab_set_global()
        editself.focus_force()


        editself.mainloop()
Exemple #10
0
def Add_Shift_Screen(self):
    global AddUser
    global AddDate
    global AddCI
    global AddCO

    Today=time.strftime('%d/%m/%Y')
    addself=Gui(debug=False)
    sw = addself.winfo_screenwidth()
    sh = addself.winfo_screenheight()
    x = (sw/2) - (480/2) 
    y = (sh/2) - (310/2)
    addself.geometry('%dx%d+%d+%d' % (480, 310, x, y))
    addself.resizable(width=False, height=False)
    addself.title('Add Shift')
    addself.ErrorLabel=addself.la()
    addself.gr(cols=2)
    addself.la('Username:'******'Calibri',pady=15)
    AddUser = addself.en(font='Calibri', padx=15,pady=15, justify=CENTER, readonlybackground='white')
    addself.la('Date:',font='Calibri',pady=15)
    AddDate = addself.en(font='Calibri',  padx=15,pady=15, text=Today, justify=CENTER, readonlybackground='white')
    addself.la('Check In Time:',font='Calibri',pady=15)
    AddCI = addself.en(font='Calibri',  padx=15, pady=15,text='00:00:00 AM', justify=CENTER, readonlybackground='white')
    addself.la('Check Out Time:',font='Calibri',pady=15)
    AddCO = addself.en(font='Calibri',  padx=15, pady=15,text='00:00:00 AM', justify=CENTER, readonlybackground='white')
    #paidentry.config(state='readonly')
    #changeentry.config(state='readonly')
    addself.endgr()
    addself.row()
    addself.bu('Add Shift', font='Calibri',pady=15, padx=40,  bg='#47c57f',activebackground='lightgreen', fg='black',justify=CENTER, width='5', command=Callable(Add_Shift, self, addself))
    addself.bu('Cancel', font='Calibri',pady=15, padx=40, bg='#d94444',activebackground='#CD5555', fg='black',justify=CENTER, width='5', command=Callable(CancelAdd, self, addself))
    addself.endrow()
    addself.grab_set_global()
    addself.focus_force()
    addself.mainloop()