コード例 #1
0
 def view_order_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewOrderFrame(self.parent)
     self.curr_frame.pack()
コード例 #2
0
class Menubar(object):
    def __init__(self, parent, curr_frame):
        self.parent = parent
        self.curr_frame = curr_frame
        self.menu_val = None

        menubar = tk.Menu(self.parent)

        order_menu = tk.Menu(menubar, tearoff=0)
        order_menu.add_command(label='Take Order',
                               command=self.take_order_command)
        order_menu.add_separator()
        order_menu.add_command(label='View Order',
                               command=self.view_order_command)
        order_menu.add_command(label='View All Orders',
                               command=self.view_all_orders_command)
        menubar.add_cascade(label='Order', menu=order_menu)

        account_menu = tk.Menu(menubar, tearoff=0)
        account_menu.add_command(label='My Account',
                                 command=self.my_account_command)
        account_menu.add_command(label='View All Accounts',
                                 command=self.view_all_accounts_command)
        account_menu.add_separator()
        account_menu.add_command(label='Logout', command=None)
        menubar.add_cascade(label='Account', menu=account_menu)

        sales_and_inventory_menu = tk.Menu(menubar, tearoff=0)
        sales_and_inventory_menu.add_command(label='View End of Day Sales',
                                             command=self.view__sales_command)
        sales_and_inventory_menu.add_command(
            label='View Current Inventory',
            command=self.view_inventory_command)
        sales_and_inventory_menu.add_separator()
        sales_and_inventory_menu.add_command(
            label='Update Inventory', command=self.update_inventory_command)
        menubar.add_cascade(label='Sales and Inventory',
                            menu=sales_and_inventory_menu)

        help_menu = tk.Menu(menubar, tearoff=0)
        help_menu.add_command(label='View Documentation',
                              command=self.view_documentation_command)
        help_menu.add_command(label='About The Product',
                              command=self.view_about_command)
        menubar.add_cascade(label='Help', menu=help_menu)

        self.parent.config(menu=menubar)

    def take_order_command(self):
        self.curr_frame.destroy()
        self.curr_frame = TakeOrderFrame(self.parent)
        self.curr_frame.pack()

    def view_order_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewOrderFrame(self.parent)
        self.curr_frame.pack()

    def view_all_orders_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewAllOrdersFrame(self.parent)
        self.curr_frame.pack()

    def my_account_command(self):
        self.curr_frame.destroy()
        self.curr_frame = MyAccountFrame(self.parent)
        self.curr_frame.pack()

    def view_all_accounts_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewAllAccountsFrame(self.parent)
        self.curr_frame.pack()

    def view__sales_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewSalesFrame(self.parent)
        self.curr_frame.pack()

    def view_inventory_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewInventoryFrame(self.parent)
        self.curr_frame.pack()

    def update_inventory_command(self):
        self.curr_frame.destroy()
        self.curr_frame = UpdateInventoryFrame(self.parent)
        self.curr_frame.pack()

    def view_documentation_command(self):
        self.curr_frame.destroy()
        self.curr_frame = DocumentationFrame(self.parent)
        self.curr_frame.pack()

    def view_about_command(self):
        self.curr_frame.destroy()
        self.curr_frame = AboutFrame(self.parent)
        self.curr_frame.pack()
コード例 #3
0
 def take_order_command(self):
     self.curr_frame.destroy()
     self.curr_frame = TakeOrderFrame(self.parent)
     self.curr_frame.pack()
コード例 #4
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def take_order_command(self):
     self.curr_frame.destroy()
     self.curr_frame = TakeOrderFrame(self.parent)
     self.curr_frame.pack()
コード例 #5
0
 def view_about_command(self):
     self.curr_frame.destroy()
     self.curr_frame = AboutFrame(self.parent)
     self.curr_frame.pack()
コード例 #6
0
 def view_all_accounts_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewAllAccountsFrame(self.parent)
     self.curr_frame.pack()
コード例 #7
0
 def view_inventory_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewInventoryFrame(self.parent)
     self.curr_frame.pack()
コード例 #8
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_inventory_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewInventoryFrame(self.parent)
     self.curr_frame.pack()
コード例 #9
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def update_inventory_command(self):
     self.curr_frame.destroy()
     self.curr_frame = UpdateInventoryFrame(self.parent)
     self.curr_frame.pack()
コード例 #10
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_all_accounts_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewAllAccountsFrame(self.parent)
     self.curr_frame.pack()
コード例 #11
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view__sales_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewSalesFrame(self.parent)
     self.curr_frame.pack()
コード例 #12
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def my_account_command(self):
     self.curr_frame.destroy()
     self.curr_frame = MyAccountFrame(self.parent)
     self.curr_frame.pack()
コード例 #13
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_all_orders_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewAllOrdersFrame(self.parent)
     self.curr_frame.pack()
コード例 #14
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_order_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewOrderFrame(self.parent)
     self.curr_frame.pack()
コード例 #15
0
 def view_all_orders_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewAllOrdersFrame(self.parent)
     self.curr_frame.pack()
コード例 #16
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_documentation_command(self):
     self.curr_frame.destroy()
     self.curr_frame = DocumentationFrame(self.parent)
     self.curr_frame.pack()
コード例 #17
0
 def my_account_command(self):
     self.curr_frame.destroy()
     self.curr_frame = MyAccountFrame(self.parent)
     self.curr_frame.pack()
コード例 #18
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
 def view_about_command(self):
     self.curr_frame.destroy()
     self.curr_frame = AboutFrame(self.parent)
     self.curr_frame.pack()
コード例 #19
0
 def view__sales_command(self):
     self.curr_frame.destroy()
     self.curr_frame = ViewSalesFrame(self.parent)
     self.curr_frame.pack()
コード例 #20
0
 def view_documentation_command(self):
     self.curr_frame.destroy()
     self.curr_frame = DocumentationFrame(self.parent)
     self.curr_frame.pack()
コード例 #21
0
 def update_inventory_command(self):
     self.curr_frame.destroy()
     self.curr_frame = UpdateInventoryFrame(self.parent)
     self.curr_frame.pack()
コード例 #22
0
ファイル: menubar.py プロジェクト: hsarbas/yolotea
class Menubar(object):

    def __init__(self, parent, curr_frame):
        self.parent = parent
        self.curr_frame = curr_frame
        self.menu_val = None

        menubar = tk.Menu(self.parent)

        order_menu = tk.Menu(menubar, tearoff=0)
        order_menu.add_command(label='Take Order', command=self.take_order_command)
        order_menu.add_separator()
        order_menu.add_command(label='View Order', command=self.view_order_command)
        order_menu.add_command(label='View All Orders', command=self.view_all_orders_command)
        menubar.add_cascade(label='Order', menu=order_menu)

        account_menu = tk.Menu(menubar, tearoff=0)
        account_menu.add_command(label='My Account', command=self.my_account_command)
        account_menu.add_command(label='View All Accounts', command=self.view_all_accounts_command)
        account_menu.add_separator()
        account_menu.add_command(label='Logout', command=None)
        menubar.add_cascade(label='Account', menu=account_menu)

        sales_and_inventory_menu = tk.Menu(menubar, tearoff=0)
        sales_and_inventory_menu.add_command(label='View End of Day Sales', command=self.view__sales_command)
        sales_and_inventory_menu.add_command(label='View Current Inventory', command=self.view_inventory_command)
        sales_and_inventory_menu.add_separator()
        sales_and_inventory_menu.add_command(label='Update Inventory', command=self.update_inventory_command)
        menubar.add_cascade(label='Sales and Inventory', menu=sales_and_inventory_menu)

        help_menu = tk.Menu(menubar, tearoff=0)
        help_menu.add_command(label='View Documentation', command=self.view_documentation_command)
        help_menu.add_command(label='About The Product', command=self.view_about_command)
        menubar.add_cascade(label='Help', menu=help_menu)

        self.parent.config(menu=menubar)

    def take_order_command(self):
        self.curr_frame.destroy()
        self.curr_frame = TakeOrderFrame(self.parent)
        self.curr_frame.pack()

    def view_order_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewOrderFrame(self.parent)
        self.curr_frame.pack()

    def view_all_orders_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewAllOrdersFrame(self.parent)
        self.curr_frame.pack()

    def my_account_command(self):
        self.curr_frame.destroy()
        self.curr_frame = MyAccountFrame(self.parent)
        self.curr_frame.pack()

    def view_all_accounts_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewAllAccountsFrame(self.parent)
        self.curr_frame.pack()

    def view__sales_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewSalesFrame(self.parent)
        self.curr_frame.pack()

    def view_inventory_command(self):
        self.curr_frame.destroy()
        self.curr_frame = ViewInventoryFrame(self.parent)
        self.curr_frame.pack()

    def update_inventory_command(self):
        self.curr_frame.destroy()
        self.curr_frame = UpdateInventoryFrame(self.parent)
        self.curr_frame.pack()

    def view_documentation_command(self):
        self.curr_frame.destroy()
        self.curr_frame = DocumentationFrame(self.parent)
        self.curr_frame.pack()

    def view_about_command(self):
        self.curr_frame.destroy()
        self.curr_frame = AboutFrame(self.parent)
        self.curr_frame.pack()