Exemplo n.º 1
0
        void StartRecording()
        {
            _systemTray.HideNotification();

            if (_recordingModel.StartRecording(new RecordingModelParams
            {
                VideoSourceKind = _videoSourcesViewModel.SelectedVideoSourceKind,
                VideoWriter = Settings.Video.RecorderMode == RecorderMode.Steps
                    ? _videoWritersViewModel.SelectedStepsWriter
                    : _videoWritersViewModel.SelectedVideoWriter,
                Microphone = Settings.Audio.RecordMicrophone ? _audioSourceViewModel.SelectedMicrophone : null,
                Speaker = Settings.Audio.RecordSpeaker ? _audioSourceViewModel.SelectedSpeaker : null
            }))
            {
                if (Settings.Tray.MinToTrayOnCaptureStart)
                {
                    _mainWindow.IsVisible = false;
                }

                _audioPlayer.Play(SoundKind.Start);
            }
            else
            {
                _audioPlayer.Play(SoundKind.Error);
            }
        }
Exemplo n.º 2
0
        async void OnRecordExecute()
        {
            if (RecorderState.Value == Models.RecorderState.NotRecording)
            {
                _systemTray.HideNotification();

                if (_recordingModel.StartRecording())
                {
                    if (Settings.Tray.MinToTrayOnCaptureStart)
                    {
                        _mainWindow.IsVisible = false;
                    }

                    _audioPlayer.Play(SoundKind.Start);
                }
                else
                {
                    _audioPlayer.Play(SoundKind.Error);
                }
            }
            else
            {
                _audioPlayer.Play(SoundKind.Stop);

                await _recordingModel.StopRecording();
            }
        }
Exemplo n.º 3
0
        void StartRecording()
        {
            _systemTray.HideNotification();

            if (_recordingModel.StartRecording(new RecordingModelParams
            {
                VideoSourceKind = _videoSourcesViewModel.SelectedVideoSourceKind,
                VideoWriter = _videoWritersViewModel.SelectedVideoWriter,
                AudioItems = _audioSourceViewModel.AvailableRecordingSources
            }))
            {
                if (Settings.Tray.MinToTrayOnCaptureStart)
                {
                    _mainWindow.IsVisible = false;
                }

                _audioPlayer.Play(SoundKind.Start);
            }
            else
            {
                _audioPlayer.Play(SoundKind.Error);
            }
        }