Ejemplo n.º 1
0
        void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //timer.Stop();
            this.CanClose = true;
            this.Close();

            // Update the path to the database
            if (this.InvokeRequired)
            {
                this.Invoke((MethodInvoker) delegate {
                    _databaseSettingDao.UpdateCurrentDatabase(_grimdawnInstallPath);
                });
            }
            else
            {
                _databaseSettingDao.UpdateCurrentDatabase(_grimdawnInstallPath);
            }
        }
Ejemplo n.º 2
0
        private void buttonForceUpdate_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem lvi in listViewInstalls.SelectedItems)
            {
                var mod   = listViewMods.SelectedItems[0].Tag as ListViewEntry;
                var entry = lvi.Tag as ListViewEntry;

                ForceDatabaseUpdate(entry.Path, mod?.Path);
                _databaseSettingRepo.UpdateCurrentDatabase(entry.Path);
            }
        }
Ejemplo n.º 3
0
        private void buttonForceUpdate_Click(object sender, EventArgs e)
        {
            _databaseSettingRepo.Clean();
            foreach (ListViewItem lvi in listViewInstalls.SelectedItems)
            {
                var mod   = listViewMods.SelectedItems[0].Tag as ListViewEntry;
                var entry = lvi.Tag as ListViewEntry;

                ForceDatabaseUpdate(entry.Path, mod?.Path);
                _databaseSettingRepo.UpdateCurrentDatabase(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;
            }
        }
Ejemplo n.º 4
0
 public void UpdateCurrentDatabase(string path)
 {
     ThreadExecuter.Execute(
         () => repo.UpdateCurrentDatabase(path)
         );
 }