public SdlConsole(AltoSystem system) { _system = system; _controller = new ExecutionController(_system); _controller.ErrorCallback += OnExecutionError; }
/// <summary> /// Initializes a new instance of the <see cref="ItemRelationScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public ItemRelationScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new ItemRepository(unitOfWork, controller); this.contractorRepository = new ContractorRepository(unitOfWork, controller); this.ExecutionController = controller; }
public override void Replay(AltoSystem system, ExecutionController controller) { // // Press all requested keys simultaneously, then release them. // foreach (AltoKey key in _keys) { if (_keyDown) { system.Keyboard.KeyDown(key); } else { system.Keyboard.KeyUp(key); } } if (_keyDown) { // Delay 50ms, then repeat for keyup _keyDown = false; _completed = false; _timestamp = 50 * Conversion.MsecToNsec; } else { _completed = true; } }
/// <summary> /// Initializes a new instance of the <see cref="WarehouseDocumentSnapshot"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> /// <param name="isHeadquarter">if set to <c>true</c> currnet branch is headquarter.</param> public WarehouseDocumentSnapshot(IUnitOfWork unitOfWork, ExecutionController controller, bool isHeadquarter) : base(unitOfWork) { this.Repository = new DocumentRepository(unitOfWork, controller); this.ExecutionController = controller; this.IsHeadquarter = isHeadquarter; }
public void Execute() { ExecutionController myController = new ExecutionController(_LoggingService, _PreferenceRepository, _ExecutionRepository, _WcfService, _ActionRepository, _FileService, _PlaneRepository); for (int i = 0; i < NumberOfExecutions; i++) { myController.Execute(); } }
private void InitializeControllers() { _benchmarksController = new BenchmarksController(this, _view.BenchmarksView); _parametersController = new ParametersController(this, _view.ParametersView); _executionController = new ExecutionController(this, _view.ExecutionView); _resultsController = new ResultsController(this, _view.ResultsView); _environmentController = new EnvironmentController(this, _view.EnvironmentView); _asyncWaitController = new AsyncWaitController(this); _errorHandlingController = new ErrorHandlingController(this); }
public ScriptPlayback(string scriptFile, AltoSystem system, ExecutionController controller) { _scriptReader = new ScriptReader(scriptFile); _system = system; _controller = controller; _currentAction = null; _stopPlayback = false; }
public SdlConsole(AltoSystem system) { _system = system; _controller = new ExecutionController(_system); _controller.ErrorCallback += OnExecutionError; _controller.ShutdownCallback += OnShutdown; _commitDisksAtShutdown = true; ScriptManager.PlaybackCompleted += OnScriptPlaybackCompleted; }
public override void Replay(AltoSystem system, ExecutionController controller) { if (_mouseDown) { system.MouseAndKeyset.MouseDown(_buttons); } else { system.MouseAndKeyset.MouseUp(_buttons); } _completed = true; }
public override void Replay(AltoSystem system, ExecutionController controller) { if (_keyDown) { system.Keyboard.KeyDown(_key); } else { system.Keyboard.KeyUp(_key); } _completed = true; }
public static void StartPlayback(AltoSystem system, ExecutionController controller, string scriptPath) { // Stop any pending actions StopRecording(); StopPlayback(); _scheduler.Reset(); _scriptPlayback = new ScriptPlayback(scriptPath, system, controller); _scriptPlayback.PlaybackCompleted += OnPlaybackCompleted; _scriptPlayback.Start(); Log.Write(LogComponent.Scripting, "Starting playback of {0}", scriptPath); }
public override void Replay(AltoSystem system, ExecutionController controller) { if (_absolute) { // // We stuff the x/y coordinates into the well-defined memory locations for the mouse coordinates. // system.Memory.Load(0x114, (ushort)_dx, CPU.TaskType.Emulator, false); system.Memory.Load(0x115, (ushort)_dy, CPU.TaskType.Emulator, false); } else { system.MouseAndKeyset.MouseMove(_dx, _dy); } _completed = true; }
public override void Replay(AltoSystem system, ExecutionController controller) { // // Execute the command. // // TODO: recreating these objects each time through is uncool. // ControlCommands controlCommands = new ControlCommands(system, controller); CommandExecutor executor = new CommandExecutor(controlCommands); CommandResult res = executor.ExecuteCommand(_commandString); if (res == CommandResult.Quit || res == CommandResult.QuitNoSave) { // // Force an exit, commit disks if result was Quit. // throw new ShutdownException(res == CommandResult.Quit); } _completed = true; }
public override void Replay(AltoSystem system, ExecutionController controller) { if (_currentStroke >= _strokes.Count) { _completed = true; } else { Keystroke stroke = _strokes[_currentStroke++]; if (stroke.Type == StrokeType.KeyDown) { system.Keyboard.KeyDown(stroke.Key); } else { system.Keyboard.KeyUp(stroke.Key); } // Delay 50ms before the next key _timestamp = 50 * Conversion.MsecToNsec; } }
/// <summary> /// Initializes a new instance of the <see cref="UnrelateWarehouseDocumentForIncomeScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public UnrelateWarehouseDocumentForIncomeScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new DocumentRepository(unitOfWork, controller); this.ExecutionController = controller; }
public CustomScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.ExecutionController = controller; this.repository = new CustomRepository(unitOfWork, controller); }
public CommercialDocumentExScript(IUnitOfWork unitOfWork, ExecutionController controller, bool isHeadquarter) : base(unitOfWork, controller) { this.IsHeadquarter = isHeadquarter; }
public InventoryDocumentScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repo = new DocumentRepository(unitOfWork, controller); }
/// <summary> /// Initializes a new instance of the <see cref="ItemRepository"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="executionController">The execution controller.</param> public ItemRepository(IUnitOfWork context, ExecutionController executionController) : this(context) { this.ExecutionController = executionController; }
/// <summary> /// Initializes a new instance of the <see cref="ShiftDocumentStatusScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> /// <param name="changesetBuffer">The changeset buffer.</param> public ShiftDocumentStatusScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.ExecutionController = controller; }
public ControlCommands(AltoSystem system, ExecutionController controller) { _system = system; _controller = controller; }
/// <summary> /// Initializes a new instance of the <see cref="SeriesScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public SeriesScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new DocumentRepository(unitOfWork, controller); this.ExecutionController = controller; }
/// <summary> /// Initializes a new instance of the <see cref="IncomeOutcomeRelation"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public IncomeOutcomeRelation(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new DocumentRepository(unitOfWork, controller); this.ExecutionController = controller; }
/// <summary> /// Initializes a new instance of the <see cref="CommercialWarehouseRelation"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public CommercialWarehouseRelation(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new DocumentRepository(unitOfWork, controller); this.ExecutionController = controller; }
/// <summary> /// Initializes a new instance of the <see cref="ShiftDocumentSnapshot"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> /// <param name="isHeadquarter">if set to <c>true</c> currnet branch is headquarter.</param> public ShiftDocumentSnapshot(IUnitOfWork unitOfWork, ExecutionController controller, bool isHeadquarter) : base(unitOfWork, controller, isHeadquarter) { }
/// <summary> /// Initializes a new instance of the <see cref="ContractorGroupMembershipScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public ContractorGroupMembershipScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new ContractorRepository(UnitOfWork, controller); this.repository.ExecutionController = controller; }
public override void Replay(AltoSystem system, ExecutionController controller) { // This is a no-op. _completed = true; }
/// <summary> /// Replays a single step of the action. If the action is completed, /// Completed will be true afterwards. /// </summary> /// <param name="system"></param> /// <param name="controller"></param> public abstract void Replay(AltoSystem system, ExecutionController controller);
public PriceRuleListScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new ItemRepository(unitOfWork, controller); this.ExecutionController = controller; }
/// <summary> /// Initializes a new instance of the <see cref="ContractorGroupMembershipScript"/> class. /// </summary> /// <param name="unitOfWork">The unit of work - database context used in persistance.</param> public ItemGroupMembershipScript(IUnitOfWork unitOfWork, ExecutionController controller) : base(unitOfWork) { this.repository = new ItemRepository(unitOfWork, controller); this.ExecutionController = controller; }