public SessionStepCompletedEvent(SessionStepExecution execution, DateTime timestamp, SessionState state) : base(state, timestamp) { Step = execution.Step; Result = execution.Result; StartedAt = execution.StartedAt; }
public void Proceed(SessionStepExecution execution) { ClearCallbacks(); _hotkeysDisposable.Disposable = Disposable.Empty; _execution = execution; // wait for action executor completed // -> event Completed ITimelineStepViewModel action = ResolveStepActionViewModel(execution.Step.Action); // start timer // step.Completion.Duration // -> event Completed if (execution.Step.Completion.Duration.HasValue) { _timerDisposable.Disposable = new Timer(CompleteActionDurationTimer, action, execution.Step.Completion.Duration.Value, TimeSpan.FromMilliseconds(-1)); } // set key shortcut // -> command // -> event Completed var hotkeys = ResolveHotkeys(execution.Step.Completion.Hotkeys); if (hotkeys.Any()) { _hotkeysDisposable.Disposable = RegisterHotkeys(hotkeys, action); } Action = action; action.Execute(_recording); _recording.IsTimelineActive = action.IsContent; }
private void TakeNextStep() { var step = _currentSteps.First(); _currentSteps.RemoveFirst(); CurrentStep = new SessionStepExecution(step, DateTime.Now); }
public bool Continue(SessionStep step) { if (IsStepValid(step)) { CurrentStep = new SessionStepExecution(step, DateTime.Now); return(Continue()); } return(false); }
private void Timeline_StepCompleted(object sender, SessionStepExecution execution) { _dispatcher.InvokeAsync(() => { if (CanContinueRecording(execution.Result)) { Recording.Continue(); } else { Recording.TryCancel(); } }).Task.Forget(); }
public SessionStepStartedEvent(SessionStepExecution execution, SessionState state) : base(state, execution.StartedAt) { Step = execution.Step; }