private void InitScreens() { _startScreenController = new StartScreenController(); _startScreenController.OnStartScanPressed += GoFromStartScreenToScanScreen; _startScreenViewController = new StartScreenViewController(_startScreenController); _scanController = new ScanController(); _scanController.ScanCanceled += GoFromScanScreenToStartScreen; _scanController.ScanCompletedWithResult += GoFromScanScreenToInfoScreen; _scannerViewController = new ZXingScannerViewController(_scanController); _exibitInfoController = new ExibitInfoController(_exibitInfoService); _exibitInfoController.ShowScanScreen += GoFromInfoScreenToScanScreen; _exibitInfoViewController = new ExibitInfoViewController(_exibitInfoController); }
/// <summary> /// The method adds Menu, Start and Bottom screens to their relevant containers /// and assigns the property fields. /// </summary> public static void ShowStartScreen() { MenuScreenController menuScreen = new MenuScreenController(); MainForm.GetInstance().LeftPanel.Controls.Add(menuScreen); StartScreenController startScreen = new StartScreenController(); MainForm.GetInstance().RightPanel.Controls.Add(startScreen); if (MainForm.GetInstance().BottomPanel.HasChildren) { MainForm.GetInstance().BottomPanel.Controls.RemoveAt(0); } currentScreen = startScreen; List <UserControl> currentScrenHistory = new List <UserControl>(); currentScrenHistory.Add(startScreen); screenHistory = currentScrenHistory; }