public void LoadView() { _view.SetFormIcon(GetFormIcon()); _view.SetFormText($"{GetApplicationName()} v{GetApplicationVersion()}"); _view.SetFormLogo(GetLogo()); _view.FormatGameFolderAdministratorLabelText(GetApplicationName()); _view.FormatSettingsEditorButtonText(GetApplicationName()); // On initial run if (GetInitialRun()) { // Use game folder in registry if available and valid if (_gameRegistryKeyService.DoKeysExist()) { var gameFolder = GetGameFolderFromWindowsRegistry(); if (Directory.Exists(gameFolder)) { SetUserGameFolderPath(gameFolder); SetUserGameLaunchCommand(Path.Combine(gameFolder, GetDefaultGameExecutableName())); } } if (Debugger.IsAttached) { // Override game folder SetUserGameFolderPath(@"C:\Gpw"); SetUserGameLaunchCommand(Path.Combine(GetUserGameFolderPath(), GetDefaultGameExecutableName())); } SetInitialRun(false); } _view.GameFolderText = GetUserGameFolderPath(); _view.ShowGameFolderPanel(); }
private bool DoGameRegistryKeysExist() { return(_gameRegistryKeyService.IsRegistryReadable() && _gameRegistryKeyService.DoKeysExist()); }