private void buttonForceUpdate_Click(object sender, EventArgs e) { _databaseItemDao.Clean(); var mod = GetFirst(listViewMods); var entry = GetFirst(listViewInstalls); if (mod != null) { // Load selected mod icons ThreadPool.QueueUserWorkItem((m) => ArzParser.LoadSelectedModIcons(mod.Path)); } ForceDatabaseUpdate(entry.Path, mod?.Path); _settingsService.GetLocal().CurrentGrimdawnLocation = entry.Path; // Store the loaded GD path, so we can poll it for updates later. //_settingsService.GetLocal().GrimDawnLocation = new List<string> { entry.Path }; // TODO: Wtf is this? Why overwrite any existing? _settingsService.GetLocal().GrimDawnLocationLastModified = ParsingService.GetHighestTimestamp(entry.Path); _settingsService.GetLocal().HasWarnedGrimDawnUpdate = false; var isGdParsed = _databaseItemDao.GetRowCount() > 0; _settingsService.GetLocal().IsGrimDawnParsed = isGdParsed; _helpService.SetIsGrimParsed(isGdParsed); }
public void Clean() { ThreadExecuter.Execute( () => _repo.Clean() ); }