public SettingsPageViewModel(IAudioService audioService, IOptionsService optionsService) { Messenger.Default.Register <BeforeShutDownMessage>(this, OnShutDown); _optionsService = optionsService; _recordingDevices = audioService.GetRecordingDeviceList().ToList(); _sampleRates = optionsService.GetSupportedSampleRates().ToList(); _channels = optionsService.GetSupportedChannels().ToList(); _bitRates = optionsService.GetSupportedMp3BitRates().ToList(); _maxRecordingTimes = GenerateMaxRecordingTimeItems(); NavigateRecordingCommand = new RelayCommand(NavigateRecording, CanExecuteNavigateRecording); ShowRecordingsCommand = new RelayCommand(ShowRecordings); SelectDestinationFolderCommand = new RelayCommand(SelectDestinationFolder); }
public SettingsPageViewModel( IAudioService audioService, IOptionsService optionsService, ICommandLineService commandLineService) { WeakReferenceMessenger.Default.Register <BeforeShutDownMessage>(this, OnShutDown); _optionsService = optionsService; _commandLineService = commandLineService; _recordingDevices = audioService.GetRecordingDeviceList(); _sampleRates = optionsService.GetSupportedSampleRates(); _channels = optionsService.GetSupportedChannels(); _bitRates = optionsService.GetSupportedMp3BitRates(); _maxRecordingTimes = GenerateMaxRecordingTimeItems(); _recordingLifetimes = GenerateRecordingLifeTimes(); _languages = GetSupportedLanguages(); _maxSilenceTimes = GetMaxSilenceTimes(); NavigateRecordingCommand = new RelayCommand(NavigateRecording); ShowRecordingsCommand = new RelayCommand(ShowRecordings); SelectDestinationFolderCommand = new RelayCommand(SelectDestinationFolder); }