protected virtual void OnRecordingEnd() { if (RecordingEnded != null) { RecordingEnded.Invoke(this, EventArgs.Empty); } }
private void Recording_StateChanged(object sender, Core.Common.Events.ValueChangedEventArgs <SessionState> e) { _dispatcher.InvokeAsync(() => { if (Recording.IsRunning && _taskbar.IsChanged == false) { Task.Run(() => _taskbar.Hide()).Forget(); } OnPropertyChanged(nameof(State)); OnPropertyChanged(nameof(IsActive)); OnPropertyChanged(nameof(IsRunning)); //startCommand?.RaiseCanExecuteChanged(); closeCommand?.RaiseCanExecuteChanged(); continueCommand?.RaiseCanExecuteChanged(); StateChanged?.Invoke(this, State); if (Recording.IsFinished) { Task.Run(() => _taskbar.Reset()).Forget(); _preparation.Reset(); IsTimelineActive = false; Timeline.Clear(); RecordingEnded?.Invoke(this, EventArgs.Empty); } }).Task.Forget(); }