internal GameStateWatcher(string gameInstallFolder, string gameOptionsFolder, string journalFolder, INativeMethods nativeMethods) { var gif = new GameInstallFolder(gameInstallFolder); var gof = new GameOptionsFolder(gameOptionsFolder); var jf = new JournalFolder(journalFolder); _journalWatcher = new JournalWatcher(jf); _journalWatcher.Started += JournalWatcher_Started; _journalWatcher.EntryAdded += JournalWatcher_EntryAdded; _statusWatcher = new StatusWatcher(jf); _statusWatcher.Changed += StatusWatcher_Changed; _bindingsWatcher = new BindingsWatcher(gif, gof); _bindingsWatcher.Changed += BindingsWatcher_Changed; _graphicsConfig = new GraphicsConfigWatcher(gif, gof); _graphicsConfig.Changed += GraphicsConfig_Changed; _modifierKeysWatcher = new ModifierKeysWatcher(nativeMethods); _modifierKeysWatcher.Changed += ModifierKeysWatcher_Changed; _gameProcessWatcher = new GameProcessWatcher(gif, nativeMethods); _gameProcessWatcher.Changed += GameProcessWatcher_Changed; _gameState = new GameState(); }
/// <summary> /// Initializes a new instance of the <see cref="StatusWatcher"/> class /// with the given player journal folder path. /// </summary> /// <param name="journalFolder">The path to the player journal folder.</param> public StatusWatcher(JournalFolder journalFolder) { JournalFolder.AssertValid(journalFolder); _statusFile = journalFolder.Status; _watcher = new EliteFileSystemWatcher(journalFolder.FullName, journalFolder.Status.Name); _watcher.Changed += StatusWatcher_Changed; }
/// <summary> /// Initializes a new instance of the <see cref="JournalWatcher"/> class /// with the given player journal folder path. /// </summary> /// <param name="journalFolder">The path to the player journal folder.</param> public JournalWatcher(JournalFolder journalFolder) { _journalFolder = JournalFolder.AssertValid(journalFolder); _journalFilesWatcher = new EliteFileSystemWatcher(journalFolder.FullName, JournalFolder.JournalFilesFilter); _journalFilesWatcher.Changed += JournalFilesWatcher_Changed; _journalReadTimer = new System.Timers.Timer { Interval = 250, AutoReset = false, Enabled = false, }; _journalReadTimer.Elapsed += JournalReadTimer_Elapsed; }
public StatusTest() { _jf = new JournalFolder(_journalFolder); }
public JournalTest() { _jf = new JournalFolder(_journalFolder); }