public DataProvider(AppMode appMode) { XmlRepository = new XmlRepository(this); CommonSettings = XmlRepository.LoadCommonSettings(); if (CommonSettings == null) { CommonSettings = new CommonSettings { IsSet = false } } ; else { CommonSettings.IsSet = true; } VariablesRepository = new VariablesRepository(this); ObjectsRepository = new ObjectsRepository(this); CommonSettings.AppMode = appMode; CommonSettings.AppModeChanged += delegate { ObjectsRepository.SwitchAppMode(); }; ProjectRepository = new ProjectRepository(this); DialogsManager = new DialogsManager(this); TabsRepository = new TabsRepository(this); WindowsManager = new WindowsManager(this); }
private void ChangeMode() { IsDebugMode = !IsDebugMode; _commonSettings.AppMode = IsDebugMode ? AppMode.Debug : AppMode.Editor; _objectsRepository.SwitchAppMode(); _objectsRepository.Select(null); }