Example #1
0
    def __init__(self, master):
        self.master = master
        self.frame_login_supplier = tk.Frame(self.master, background=COLOR_RED)

        self.info = tk.Label(self.frame_login_supplier,
                             text="Log in met uw aanbieders-account:",
                             foreground=COLOR_WHITE,
                             background=COLOR_RED,
                             height=5,
                             font=FONT_SIZE_DEFAULT)

        self.username = tk.Entry(self.frame_login_supplier, font=FONT_LOGIN)
        self.username.insert(0, "Gebruikersnaam")

        self.password = tk.Entry(self.frame_login_supplier, font=FONT_LOGIN)
        self.password.insert(0, "Wachtwoord")

        self.sign_in = tk.Button(self.frame_login_supplier,
                                 text="Inloggen",
                                 height=3,
                                 width=25,
                                 command=self.do_sign_in,
                                 background=COLOR_BLACK,
                                 foreground=COLOR_GREY,
                                 font=FONT_BUTTON)

        self.back = BackButton(self.frame_login_supplier,
                               command=self.show_screen_intro)

        self.frame_login_supplier.pack(fill="both", expand=True)
        self.info.pack()
        self.username.pack()
        self.password.pack()
        self.sign_in.pack(pady=20)
        self.back.pack(side=tk.BOTTOM)
Example #2
0
    def __init__(self, master, supplier):
        self.master = master
        self.supplier = supplier

        self.frame_overview_movie = tk.Frame(self.master, background=COLOR_RED)
        self.label_information = tk.Label(
            self.frame_overview_movie,
            text="Hieronder ziet u de films die u kunt aanbieden:",
            foreground=COLOR_WHITE,
            background=COLOR_RED,
            height=5,
            font=FONT_SIZE_DEFAULT)

        self.frame_movie_grid = tk.Frame(self.frame_overview_movie,
                                         background=COLOR_RED)

        self.btn_back = BackButton(self.frame_overview_movie,
                                   command=self.show_screen_start_supplier)

        self.handle_data()

        self.frame_overview_movie.pack(fill="both", expand=True)
        self.label_information.pack()
        self.frame_movie_grid.pack(side=tk.TOP)
        self.btn_back.pack(side=tk.BOTTOM)
Example #3
0
    def __init__(self, master, code, broadcast_supplier_id):
        self.master = master
        self.code = code
        self.broadcast_supplier_id = broadcast_supplier_id

        self.frame_ticket_visitor = tk.Frame(self.master, background=COLOR_RED)
        self.frame_ticket = tk.Frame(self.frame_ticket_visitor,
                                     background=COLOR_BLACK,
                                     borderwidth=30)
        self.label_text = tk.Label(self.frame_ticket_visitor,
                                   text="Hieronder ziet u uw ticket:",
                                   foreground=COLOR_WHITE,
                                   background=COLOR_RED,
                                   height=5,
                                   font=FONT_SIZE_DEFAULT)
        self.label_code = tk.Label(self.frame_ticket,
                                   text="Code: " + self.code,
                                   foreground=COLOR_WHITE,
                                   background=COLOR_BLACK,
                                   height=5,
                                   font=FONT_SIZE_DEFAULT)
        self.label_supplier = tk.Label(self.frame_ticket,
                                       foreground=COLOR_WHITE,
                                       background=COLOR_BLACK,
                                       height=5,
                                       font=FONT_SIZE_DEFAULT)

        self.back = BackButton(self.frame_ticket_visitor,
                               command=self.show_screen_intro)

        broadcast_supplier = BroadcastSupplier.selectBy(
            id=self.broadcast_supplier_id)
        supplier = Supplier.selectBy(id=broadcast_supplier[0].supplier_id)

        self.label_supplier.configure(text="Aanbieder : " +
                                      supplier[0].username)

        self.label_text.pack()
        self.frame_ticket_visitor.pack(fill="both", expand=True)
        self.frame_ticket.pack(pady=10)
        self.label_supplier.pack()
        self.label_code.pack()
        self.back.pack(side=tk.BOTTOM)
Example #4
0
    def __init__(self, master):
        self.master = master
        self.frame_public = tk.Frame(self.master, background=COLOR_RED)
        self.label_informatie = tk.Label(
            self.frame_public,
            text="Hieronder ziet u de publieke informatie:",
            foreground=COLOR_WHITE,
            background=COLOR_RED,
            height=5,
            font=FONT_SIZE_DEFAULT)
        self.frame_movie_overview = tk.Frame(self.frame_public,
                                             background=COLOR_RED)
        self.back = BackButton(self.frame_public,
                               command=self.show_screen_intro)

        self.handle_data()

        self.frame_public.pack(fill="both", expand=True)
        self.label_informatie.pack()
        self.frame_movie_overview.pack()
        self.back.pack(side=tk.BOTTOM)
Example #5
0
    def __init__(self, master, supplier, imdb_id):
        self.master = master
        self.supplier = supplier
        self.imdb_id = imdb_id

        self.movie = Movie.selectBy(imdb_id=self.imdb_id)[0]

        self.frame_confirmation = tk.Frame(self.master, background=COLOR_RED)

        self.label_confirmation = tk.Label(
            self.frame_confirmation,
            text="U heeft voor de volgende film gekozen:",
            foreground=COLOR_WHITE,
            background=COLOR_RED,
            height=5,
            font=FONT_SIZE_DEFAULT)

        self.label_movie = tk.Label(self.frame_confirmation,
                                    text=self.movie.ft_title,
                                    foreground=COLOR_WHITE,
                                    background=COLOR_RED,
                                    height=5,
                                    font=FONT_SIZE_DEFAULT)

        self.back = BackButton(self.frame_confirmation,
                               command=self.show_screen_start_supplier)

        timestamp = get_timestamp()

        broadcast_time_of_movie = BroadcastTime.select(
            AND(BroadcastTime.q.ft_starttime > timestamp["today"],
                BroadcastTime.q.ft_starttime < timestamp["tomorrow"],
                BroadcastTime.q.imdb_id == imdb_id))
        BroadcastSupplier(broadcast_time_id=broadcast_time_of_movie[0].id,
                          supplier_id=self.supplier.id)

        self.frame_confirmation.pack(fill="both", expand=True)
        self.label_confirmation.pack()
        self.label_movie.pack()
        self.back.pack(side=tk.BOTTOM)
Example #6
0
    def __init__(self, master, supplier):
        self.master = master
        self.supplier = supplier

        self.frame_supplier = tk.Frame(self.master, background=COLOR_RED)
        self.label_keuze = tk.Label(self.frame_supplier,
                                    text="Maak uw keuze:",
                                    foreground=COLOR_WHITE,
                                    background=COLOR_RED,
                                    height=5,
                                    font=FONT_SIZE_DEFAULT)

        self.suppliedMovies = tk.Button(
            self.frame_supplier,
            text="Films die u kunt aanbieden",
            height=3,
            width=35,
            command=self.show_screen_overview_supplier,
            background=COLOR_BLACK,
            foreground=COLOR_GREY,
            font=FONT_BUTTON)

        self.codes_of_visitors = tk.Button(
            self.frame_supplier,
            text="Bezoekers die een kaartje hebben gekocht",
            height=3,
            width=35,
            command=self.show_screen_overview_visitors,
            background=COLOR_BLACK,
            foreground=COLOR_GREY,
            font=FONT_BUTTON)

        self.back = BackButton(self.frame_supplier,
                               command=self.show_screen_intro)

        self.frame_supplier.pack(fill="both", expand=True)
        self.label_keuze.pack()
        self.suppliedMovies.pack()
        self.codes_of_visitors.pack()
        self.back.pack(side=tk.BOTTOM)
Example #7
0
    def __init__(self, master, broadcast_supplier_id):
        self.master = master
        self.broadcast_supplier_id = broadcast_supplier_id
        self.frame_visitor = tk.Frame(self.master, background=COLOR_RED)

        self.information = tk.Label(
            self.frame_visitor,
            text="Vul een hier uw gegevens in om een kaartje te krijgen:",
            foreground=COLOR_WHITE,
            background=COLOR_RED,
            height=5,
            font=FONT_SIZE_DEFAULT)

        self.username = tk.Entry(self.frame_visitor, font=FONT_LOGIN)
        self.username.insert(0, "Gebruikersnaam")

        self.email = tk.Entry(self.frame_visitor, font=FONT_LOGIN)
        self.email.insert(0, "E-mailadres")

        self.label_error = tk.Label(self.frame_visitor, background=COLOR_RED)

        self.sign_in = tk.Button(self.frame_visitor,
                                 text="Inloggen",
                                 height=3,
                                 width=25,
                                 command=self.do_sign_in,
                                 background=COLOR_BLACK,
                                 foreground=COLOR_GREY,
                                 font=FONT_BUTTON)
        self.back = BackButton(self.frame_visitor,
                               command=self.show_screen_overviw_movie_visitor)

        self.information.pack()
        self.frame_visitor.pack(fill="both", expand=True)
        self.email.pack()
        self.username.pack()
        self.label_error.pack()
        self.sign_in.pack(side=tk.BOTTOM)
        self.back.pack(side=tk.BOTTOM)
Example #8
0
    def __init__(self, master):
        self.master = master
        self.frame_overview_visitors = tk.Frame(self.master,
                                                background=COLOR_RED)

        self.frame_movie_grid = tk.Frame(self.frame_overview_visitors,
                                         background=COLOR_RED)
        self.back = BackButton(self.frame_overview_visitors,
                               command=self.show_screen_intro)
        self.information = tk.Label(
            self.frame_overview_visitors,
            text="Hieronder ziet u de films die beschikbaar zijn:",
            foreground=COLOR_WHITE,
            background=COLOR_RED,
            height=5,
            font=FONT_SIZE_DEFAULT)

        self.handle_data()

        self.frame_overview_visitors.pack(fill="both", expand=True)
        self.information.pack(side=tk.TOP)
        self.frame_movie_grid.pack()
        self.back.pack(side=tk.BOTTOM)