Ejemplo n.º 1
0
 def init_back(self):
     mainP = MainPage(self)
     global buttonframe
     global container
     buttonframe, container = mainP.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 2
0
 def init_Basket(self):
     basketPage = BasketPage(self)
     global buttonframe
     global container
     buttonframe, container = basketPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 3
0
 def init_Login(self):
     loginPage = LoginPage(self)
     global buttonframe
     global container
     buttonframe, container = loginPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 4
0
 def init_addInBasket(self):
     global basket1, buttonframe, container, mainBook
     basket1.__add__(mainBook)
     bookPage = BookPage(self)
     buttonframe, container = bookPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 5
0
    def init_clear_all(self):
        global user1, basket1, booksCollection, buttonframe, container

        basket1.purchases = []
        basketPage = BasketPage(self)
        buttonframe, container = basketPage.show()
        buttonframe.place(x=0, y=0, width=1280, height=40)
        container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 6
0
 def init_authentication(self):
     login = self.entry1.get()
     password = self.entry2.get()
     if (user1.login == login and user1.password == password):
         global authenticated
         authenticated = True
         mainPage = MainPage(self)
         global buttonframe
         global container
         buttonframe, container = mainPage.show()
         buttonframe.place(x=0, y=0, width=1280, height=40)
         container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 7
0
 def OnDoubleClick(self, event):
     global booksCollection, mainBook, buttonframe, container
     for book in booksCollection:
         if book.name == self.treeBooks.item(self.treeBooks.selection(),
                                             "text"):
             mainBook = book
             break
     print(mainBook.purchased)
     bookPage = BookPage(self)
     buttonframe, container = bookPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 8
0
    def init_Search(self):
        global buttonframe, container, searchCollection, booksCollection

        if self.search.get() != '':
            searchCollection = []
            for x in booksCollection:
                if self.search.get() in x.name:
                    searchCollection.append(x)
        else:
            searchCollection = booksCollection

        mainPage = MainPage(self)
        buttonframe, container = mainPage.show()
        buttonframe.place(x=0, y=0, width=1280, height=40)
        container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 9
0
    def init_purchase_all(self):
        global user1, basket1, booksCollection, buttonframe, container, authenticated

        if authenticated:
            for x in basket1.purchases:
                user1.purchaseList.append(x)
                user1.deposit -= x.cost
                for y in booksCollection:
                    if x.name == y.name:
                        y.purchased = True
                        break

            basket1.purchases = []
            basketPage = BasketPage(self)
            buttonframe, container = basketPage.show()
            buttonframe.place(x=0, y=0, width=1280, height=40)
            container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 10
0
 def init_User(self):
     userPage = UserPage(self)
     global buttonframe, container
     buttonframe, container = userPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)
Ejemplo n.º 11
0
 def init_back(self):
     global basket1, buttonframe, container, mainBook
     mainPage = MainPage(self)
     buttonframe, container = mainPage.show()
     buttonframe.place(x=0, y=0, width=1280, height=40)
     container.place(x=0, y=40, width=1280, height=680)