private void LoadConfig() { //var cfg = DownloaderConfigFile.Parse(ConfigKey); var cfg = R2ConfigFile1.ParseOrDefault(ConfigKey, "usr", "pwd", "url", "thumb", 2 * 60); _upd8r.SetCredentials(cfg); SecondsInterval = cfg.CheckIntervalSeconds; StartCheckingCmd.ExecuteIfItCan(); }
public void StartCheckingForUpdates(int?overrideIntervalSeconds = null) { if (_r2Upd8r.IsChecking) { return; } var creds = GetCredentials(); if (creds == null) { return; } _r2Upd8r.SetCredentials(creds); var seconds = overrideIntervalSeconds ?? creds.CheckIntervalSeconds; var interval = TimeSpan.FromSeconds(seconds); _r2Upd8r.StartCheckingForUpdates(interval); }