public GameSaveBroker(LocalGameSaveManager localSaveManager) { if (localSaveManager == null) { throw new ArgumentNullException("localSaveManager"); } _localSaveManager = localSaveManager; CurrentSaveTransfers.CollectionChanged += (sender, args) => AppMenuItems.TransfersMenu.Count = CurrentSaveTransfers.Count; }
private void InitializeLocalGameSaveManager() { IFileSystemWatcher fileWatcher = new EnhancedFileSystemWatcher(GetCivFiveSavesDirectoryPath()) { WatchSubdirectories = false, ExtensionWhiteList = new List<string> { ".civ5save" } }; LocalGameSaveManager = new LocalGameSaveManager(fileWatcher); LocalGameSaveManager.NewGameSaveDetected += LocalGameSaveManagerOnNewGameSaveDetected; }