private void LoadSettings(SettingsDto settings) { view.MaxAbsoluteScalePower = settings.MaxAbsoluteScalePower; view.ExportValuesSeparator = settings.ExportValuesSeparator; view.RecentFilesCount = settings.RecentFilesCount; view.Language = new LanguageDto(settings.Language); foreach (var extension in settings.RegisteredExtensions) { view.ToogleExtension(extension, true); } }
public SettingsForm(SettingsDto settings) { InitializeComponent(); presenter = new SettingsPresenter(this, settings); }
public SettingsPresenter(ISettingsView view, SettingsDto settingsToLoad) { this.view = view; this.settingsToLoad = settingsToLoad; }
private static SettingsStorage GetSettingsStorage(SettingsDto dto) { return new SettingsStorage( dto.MaxAbsoluteScalePower, dto.ExportValuesSeparator, dto.RecentFilesCount, dto.RegisteredExtensions, dto.Language); }