Esempio n. 1
0
        private void ReadModel()
        {
            var settingsModel = _modelService.LoadModel <SettingsModel>(_settingsFileName);

            _model = settingsModel ?? new SettingsModel();
            if (settingsModel != null)
            {
                _themeService.SetResource(settingsModel.SelectedTheme);
                _selectedTheme = ThemeCollection.Single(t => t.Key == settingsModel.SelectedTheme);
                RaisePropertyChanged(nameof(SelectedTheme));

                _stringsService.SetResource(settingsModel.SelectedLanguage);
                _selectedLanguage = settingsModel.SelectedLanguage;
                RaisePropertyChanged(nameof(SelectedLanguage));

                _localImageFolder = settingsModel.ImageFolder;
                RaisePropertyChanged(nameof(LocalImageFolder));
            }
        }