示例#1
0
        public virtual void Initialize()
        {
            Step3Settings settings = _settingsService.LoadSettings <Step3Settings>("Step3Settings");

            if (settings != null)
            {
                _selectedOnDuplicateOption = OnDuplicateOptions.SingleOrDefault(x => x.ID == settings.OnDuplicateOptionID);
                _selectedSortOption        = SortOptions.SingleOrDefault(x => x.ID == settings.SortOptionID);

                if (_selectedSortOption == null)
                {
                    _selectedSortOption = SortOptions.First();
                }

                _showRandomizedFiles = settings.ShowRandomizedFiles;
                _saveSettings        = settings.SaveSettings;
            }
            else
            {
                _selectedOnDuplicateOption = OnDuplicateOptions.First();
                _selectedSortOption        = SortOptions.First();
            }
        }