private void BeginMonitoringGame() { // Logger is a static object, so it already exists string logfilepath = GetLauncherLogPath(); _logWriter = new LogWriter(logfilepath); _configurator = new Configurator(); RecordGameDll(); _gameSessionMap = new GameSessionMap(); _gameMonitor = new GameMonitor(_gameSessionMap, _configurator); _accountManager = new AccountManager(_gameMonitor); _mainViewModel = new MainWindowViewModel(_accountManager, _gameSessionMap, _configurator); _mainViewModel.RequestShowMainWindowEvent += () => _mainWindow.Show(); _commandManager = new CommandManager(_gameMonitor, _gameSessionMap); bool testCommandTokenParser = true; if (testCommandTokenParser) { _commandManager.TestParse(); } _uiGameMonitorBridge = new UiGameMonitorBridge(_gameMonitor, _mainViewModel); _uiGameMonitorBridge.Start(); _gameMonitor.Start(); }
public MainWindowViewModel(AccountManager accountManager, GameSessionMap gameSessionMap, Configurator configurator) { if (accountManager == null) { throw new ArgumentException("Null Null GameSessionMap in MainWindowViewModel()", "accountManager"); } if (gameSessionMap == null) { throw new ArgumentException("Null GameSessionMap in MainWindowViewModel()", "gameSessionMap"); } if (configurator == null) { throw new ArgumentException("Null Configurator in MainWindowViewModel()", "configurator"); } _accountManager = accountManager; _gameSessionMap = gameSessionMap; _configurator = configurator; _accountManager.UserAccounts.CollectionChanged += UserAccountsCollectionChanged; NewProfileCommand = new DelegateCommand(CreateNewProfile); NextProfileCommand = new DelegateCommand(GoToNextProfile); PrevProfileCommand = new DelegateCommand(GoToPrevProfile); DeleteProfileCommand = new DelegateCommand(DeleteProfile); EditCharactersCommand = new DelegateCommand(EditCharacters); LoadStatusSymbols(); }
public HelpWindowViewModel(Configurator configurator) { _configurator = configurator; }