public MainModel() { AppSettings = SettingsStorage.LoadSettings(Environment.AppSettingsFilePath); if (AppSettings.Advanced.LoggingEnabled) { EnableLogging(); } Mirrors = MirrorStorage.LoadMirrors(Environment.MirrorsFilePath); ValidateAndCorrectSelectedMirrors(); CreateNewHttpClient(); OpenDatabase(AppSettings.DatabaseFileName); }
public MainModel() { AppSettings = SettingsStorage.LoadSettings(Environment.AppSettingsFilePath); if (AppSettings.Advanced.LoggingEnabled) { EnableLogging(); } ValidateAndCorrectDirectoryPaths(); Mirrors = MirrorStorage.LoadMirrors(Path.Combine(Environment.MirrorsDirectoryPath, MIRRORS_FILE_NAME)); ValidateAndCorrectSelectedMirrors(); Localization = new LocalizationStorage(Environment.LanguagesDirectoryPath, AppSettings.General.Language); CreateNewHttpClient(); OpenDatabase(AppSettings.DatabaseFileName); LastApplicationUpdateCheckDateTime = AppSettings.LastUpdate.LastCheckedAt; LastApplicationUpdateCheckResult = null; updater = new Updater(); updater.UpdateCheck += ApplicationUpdateCheck; ConfigureUpdater(); Downloader = new Downloader(); ConfigureDownloader(); }