Exemplo n.º 1
0
 public MainModel()
 {
     AppSettings = SettingsStorage.LoadSettings(Environment.AppSettingsFilePath);
     if (AppSettings.Advanced.LoggingEnabled)
     {
         EnableLogging();
     }
     Mirrors = MirrorStorage.LoadMirrors(Environment.MirrorsFilePath);
     ValidateAndCorrectSelectedMirrors();
     CreateNewHttpClient();
     OpenDatabase(AppSettings.DatabaseFileName);
 }
Exemplo n.º 2
0
 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();
 }