/// <summary> /// Process the result input /// </summary> /// <param name="userInputValue"></param> /// <returns>true if success, false otherwise</returns> public static bool ProcessResultInput(string userInputValue) { string upperCaseInput = userInputValue.ToUpper(); IUserInputHandler inputHandler = InstanceCreator.CreateResultInputHandler() as IUserInputHandler; return(inputHandler.Process(upperCaseInput)); }
public void EnableTacticalCameraTriggers() { if (AreTacticalCameraTriggersEnabled) { throw new InvalidOperationException("Tactical camera is already running."); } AreTacticalCameraTriggersEnabled = true; if (_tacticalCameraSettings.UnlimitedZoomEnabled) { _gameValueService.EnableUnlimitedZoom(); } _gameValueService.DisableFreeCamera(); _gameValueService.EnableZoom(); _gameValueService.EnableCollisionZoomAdjustment(); _gameValueService.EnableAutoCameraAngleAdjustment(); _gameValueService.EnableCenteringCameraBehindCharacter(); _gameValueService.SetCameraZoomDistance(0); _keyHandler = _tacticalCameraKeyHandlerFactory.CreateTacticalCameraKeyHandler(_gameValueService, _tacticalCameraSettings, _gameProcess); _userInputHandler = _userInputHandlerFactory.CreateUserInputHandler ( _keyHandler, _gameValueService ); _userInputHandler.StartProcessingInputEvents(); }
/// <summary> /// Process the bet input /// </summary> /// <param name="userInputValue"></param> /// <param name="resetPrevious"></param> /// <returns>true if success, false otherwise</returns> public static bool ProcessBetInput(string userInputValue, bool resetPrevious = false) { string upperCaseInput = userInputValue.ToUpper(); IUserInputHandler inputHandler = InstanceCreator.CreateBetInputHandler() as IUserInputHandler; if (resetPrevious) { ResetGlobals(); } return(inputHandler.Process(upperCaseInput)); }
private void DisposeHandlers() { if (_keyHandler != null) { _keyHandler.Dispose(); _keyHandler = null; } if (_userInputHandler != null) { _userInputHandler.Dispose(); _userInputHandler = null; } }
public Application( IUserInputHandler consoleCommandHandler, ILogger logger, IConsole console, ILineEditorCommandsFactory lineEditorCommandsFactory, ITextManager textManager, ICommandTrack commandManager) { _lineEditorCommandsFactory = lineEditorCommandsFactory; _consoleCommandHandler = consoleCommandHandler; _textManager = textManager; _commandManager = commandManager; _logger = logger; _console = console; }
public UserExperience(ITextDisplayer textDisplayer, IUserInputHandler userInputHandler) { UserTextDisplayer = textDisplayer; UserInputHandler = userInputHandler; }
public void Setup() { _textDisplayerMock = new Mock <ITextDisplayer>(); _consoleWrapperMock = new Mock <IConsoleWrapper>(); _target = new UserInputHandler(_textDisplayerMock.Object, _consoleWrapperMock.Object); }
public UserInput(IUserInputHandler userHandler) { _uh = userHandler; }
public ProgramManager(IUserInputHandler inputHandler, ICoreLogic coreLogic) { _userInputHandler = inputHandler; _coreLogic = coreLogic; }
/// <summary> /// Prevents a default instance of the <see cref="Engine" /> class from being created. /// </summary> private Engine() { this.input = new ConsoleUserInputHandler(); this.output = new ConsoleRenderer(); }