/// <summary>
 /// Запускает главный контроллер
 /// </summary>
 public void Start()
 {
     _currentState = ApplicationStates.MenuWork;
     _currentFactoryOfControllers = new FactoryOfMenuControllers();
     ChangeState(_currentState, _currentFactoryOfControllers);
     _platform.Initialize();
 }
 /// <summary>
 /// Изменяет состояние приложения
 /// </summary>
 /// <param name="parState">Состояние приложения</param>
 /// <param name="parFactoryOfContollers">Фабрика контроллера</param>
 private void ChangeState(ApplicationStates parState, FactoryOfContollers parFactoryOfContollers)
 {
     _currentState = parState;
     _currentFactoryOfControllers = parFactoryOfContollers;
     if (parState != ApplicationStates.Exit)
     {
         _currentController              = _currentFactoryOfControllers.CreateController(_platform);
         _currentController.ChangeState += OnChangeState;
     }
     else
     {
         _platform.Drop();
     }
 }
Exemple #3
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="parFactory">Фабрика контроллеров</param>
 /// <param name="parState">Состояние приложения</param>
 public ChangeStateArgs(FactoryOfContollers parFactory, ApplicationStates parState)
 {
     _factoryOfContollers = parFactory;
     _applicationState    = parState;
 }