Exemple #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);
            back1.accessMasterController = masterController;


            // EventHandler hooking
            masterController.EmployeeLogin  += masterController_EmployeeLogin;
            masterController.EmployeeLogout += masterController_EmployeeLogout;
            masterController.ContentChanged += 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();
        }
Exemple #2
0
 public LoginControl(LoginPane loginPane, MasterController masterController, Panel panel)
     : base(masterController, panel, true)
 {
     InitializeComponent();
     this.loginPane = loginPane;
     base.masterController.EmployeeLogout += masterController_EmployeeLogout;
 }
Exemple #3
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();
        }
Exemple #4
0
 public LoginControl(LoginPane loginPane, MasterController masterController, Panel panel)
     : base(masterController, panel, true)
 {
     InitializeComponent();
     this.loginPane = loginPane;
     base.masterController.EmployeeLogout += masterController_EmployeeLogout;
 }