Example #1
0
        public frmMain()
        {
            InitializeComponent();
            // Initialize the panels 
            masterController = new MasterController(this, mainPanel);
            titleBar = new Titlebar(panelHeader, masterController);
            menuBar = new MenuBar(panelSidebar, masterController);
            userSettingsControl = new UserSettingsControl(userControlPanel, masterController);
            loginPane = new LoginPane(masterController);

            // EventHandler hooking
            masterController.EmployeeLogin += masterController_EmployeeLogin;
            masterController.EmployeeLogout += masterController_EmployeeLogout;
            masterController.ContentChange += new EventHandler<ContentArgs>(masterController_ContentChange);

            // Initialize DatabaseController
            try
            {
                BackgroundWorker worker = new BackgroundWorker();
                worker.DoWork += worker_DoWork;
                worker.RunWorkerAsync();
            }
            catch (InvalidOperationException iex)
            {
                ErrorLog.Log(iex);
            }
            catch (Exception ex)
            {
                ErrorLog.Log(ex);
            }

            displayOnSmall();
        }
Example #2
0
 public StaffMenuList(MasterController masterController, MenuBar menuBar):base(masterController)
 {
     menuControls = new List<MenuControl> { 
          new MenuControl(new CustomerInformationView(masterController), menuBar),
          new MenuControl(new OrdersView(masterController), menuBar),
     }; 
 }
Example #3
0
 public MenuControl(IContentPage mapControl, MenuBar menuBar)
 {
     InitializeComponent();
     this.mapControl = mapControl;
     accessMenuBar = menuBar;
     accessIconImage = mapControl.accessImage;
     accessMenuName = mapControl.accessMenuName;
     this.TabStop = false;
 }
Example #4
0
 public AdminMenuList(MasterController masterController, MenuBar menuBar):base(masterController)
 {
     menuControls = new List<MenuControl> { 
          new MenuControl(new Home(masterController), menuBar),
          new MenuControl(new Sales(masterController), menuBar),
          new MenuControl(new UserAdministration(masterController), menuBar),
          new MenuControl(new InventoryView(masterController), menuBar),
          new MenuControl(new CustomerInformationView(masterController), menuBar),
     }; 
 }
Example #5
0
 public UserMenuList(MasterController masterController, MenuBar menuBar):base(masterController)
 {
     menuControls = new List<MenuControl> { 
          new MenuControl(new POS(masterController), menuBar),
     };
 }
   public InventoryPersonnelMenuList(MasterController masterController, MenuBar menuBar):base(masterController)
 {
     menuControls = new List<MenuControl> { 
          new MenuControl(new InventoryView(masterController), menuBar),
     }; 
 }
Example #7
0
 public StaffMenuList(MasterController masterController, MenuBar menuBar) : base(masterController)
 {
     menuControls = new List <MenuControl> {
         new MenuControl(new CustomerInformationView(masterController), menuBar),
     };
 }
Example #8
0
 public InventoryPersonnelMenuList(MasterController masterController, MenuBar menuBar) : base(masterController)
 {
     menuControls = new List <MenuControl> {
         new MenuControl(new InventoryView(masterController), menuBar),
     };
 }
Example #9
0
 public UserMenuList(MasterController masterController, MenuBar menuBar) : base(masterController)
 {
     menuControls = new List <MenuControl> {
         new MenuControl(new POS(masterController), menuBar),
     };
 }