Add a setting to control pre-reading behavior

Also makes adding new rows to the settings grid a little more dynamic.
This commit is contained in:
Fred Kuipers 2021-07-20 19:35:33 -04:00
commit 13fecfa395
3 changed files with 82 additions and 9 deletions

View file

@ -103,8 +103,9 @@ namespace Observatory
public void PrereadJournals()
{
// TODO: use the configured journal path, not the "default" detected path.
DirectoryInfo logDirectory = GetJournalFolder(String.Empty);
if (!Properties.Core.Default.TryPrimeSystemContextOnStartMonitor) return;
DirectoryInfo logDirectory = GetJournalFolder(Properties.Core.Default.JournalFolder);
var files = logDirectory.GetFiles("Journal.????????????.??.log");
// Read at most the last two files (in case we were launched after the game and the latest