Ejemplo n.º 1
0
 protected virtual void OnRecordingEnd()
 {
     if (RecordingEnded != null)
     {
         RecordingEnded.Invoke(this, EventArgs.Empty);
     }
 }
Ejemplo n.º 2
0
        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();
        }