public GetPlaybackDevices ( ) : ICollection |
||
Résultat | ICollection |
private void MigrateSelectedDeviceLists() { using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.MigratedSelectedDeviceLists) { AppLogger.Log.Info("Already migrated the device lists"); return; } var audioDeviceLister = new AudioDeviceLister(DeviceState.All); using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.SelectedRecordingDeviceList != null) { foreach (var audioDevice in audioDeviceLister.GetRecordingDevices() .Join(AppConfigs.Configuration.SelectedRecordingDeviceList, a => a.FriendlyName, selected => selected, (a, selected) => a)) { SelectedRecordingDevicesList.Add(audioDevice.Id); AppLogger.Log.Info("Migrating Device: ", audioDevice); } } } using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.SelectedPlaybackDeviceList != null) { foreach (var audioDevice in audioDeviceLister.GetPlaybackDevices() .Join(AppConfigs.Configuration.SelectedPlaybackDeviceList, a => a.FriendlyName, selected => selected, (a, selected) => a)) { SelectedPlaybackDevicesList.Add(audioDevice.Id); AppLogger.Log.Info("Migrating Device: ", audioDevice); } } } AppConfigs.Configuration.MigratedSelectedDeviceLists = true; AppConfigs.Configuration.SelectedPlaybackDeviceList = null; AppConfigs.Configuration.SelectedRecordingDeviceList = null; AppConfigs.Configuration.Save(); } }
public Settings() { InitializeComponent(); Icon = Icon.FromHandle(Resources.Settings.GetHicon()); var toolTip = new ToolTip(); toolTip.SetToolTip(closeButton, SettingsString.closeTooltip); var toolTipComm = new ToolTip(); toolTipComm.SetToolTip(communicationCheckbox, SettingsString.commTooltip); hotkeyTextBox.KeyDown += (sender, args) => SetHotkey(args); hotkeyTextBox.Text = AppConfigs.Configuration.PlaybackHotKeys.ToString(); hotkeyTextBox.Tag = AudioDeviceType.Playback; RunAtStartup.Checked = AppModel.Instance.RunAtStartup; communicationCheckbox.Checked = AppModel.Instance.SetCommunications; var audioDeviceLister = new AudioDeviceLister(DeviceState.All); PopulateAudioList(playbackListView, AppModel.Instance.SelectedPlaybackDevicesList, audioDeviceLister.GetPlaybackDevices()); PopulateAudioList(recordingListView, AppModel.Instance.SelectedRecordingDevicesList, audioDeviceLister.GetRecordingDevices()); }
public Settings() { InitializeComponent(); Icon = Icon.FromHandle(Resources.Settings.GetHicon()); var toolTip = new ToolTip(); toolTip.SetToolTip(closeButton, SettingsString.closeTooltip); var toolTipComm = new ToolTip(); toolTipComm.SetToolTip(communicationCheckbox, SettingsString.commTooltip); hotkeyTextBox.KeyDown += (sender, args) => SetHotkey(args); hotkeyTextBox.Text = AppConfigs.Configuration.PlaybackHotKeys.ToString(); hotkeyTextBox.Tag = AudioDeviceType.Playback; RunAtStartup.Checked = AppModel.Instance.RunAtStartup; communicationCheckbox.Checked = AppModel.Instance.SetCommunications; var audioDeviceLister = new AudioDeviceLister(DeviceState.All); PopulateAudioList(playbackListView, AppModel.Instance.SelectedPlaybackDevicesList, audioDeviceLister.GetPlaybackDevices()); PopulateAudioList(recordingListView, AppModel.Instance.SelectedRecordingDevicesList, audioDeviceLister.GetRecordingDevices()); notifLabel.Text = Properties.SettingsString.notification; var toolTipNotification = new ToolTip(); toolTipNotification.SetToolTip(notificationComboBox, Notifications.explanation); notificationComboBox.DisplayMember = "Label"; notificationComboBox.ValueMember = "Type"; notificationComboBox.DataSource = NotificationFactory.GetNotificationDisplayers(); notificationComboBox.SelectedValue = AppModel.Instance.NotificationSettings; betaVersionCheckbox.Checked = AppModel.Instance.SubscribedBetaVersions; var toolTipBeta = new ToolTip(); toolTipBeta.SetToolTip(betaVersionCheckbox,SettingsString.betaExplanation); _loaded = true; }
private void MigrateSelectedDeviceLists() { using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.MigratedSelectedDeviceLists) { AppLogger.Log.Info("Already migrated the device lists"); return; } var audioDeviceLister = new AudioDeviceLister(DeviceState.All); using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.SelectedRecordingDeviceList != null) foreach (var audioDevice in audioDeviceLister.GetRecordingDevices() .Join(AppConfigs.Configuration.SelectedRecordingDeviceList, a => a.FriendlyName, selected => selected, (a, selected) => a)) { SelectedRecordingDevicesList.Add(audioDevice.Id); AppLogger.Log.Info("Migrating Device: ", audioDevice); } } using (AppLogger.Log.InfoCall()) { if (AppConfigs.Configuration.SelectedPlaybackDeviceList != null) foreach (var audioDevice in audioDeviceLister.GetPlaybackDevices() .Join(AppConfigs.Configuration.SelectedPlaybackDeviceList, a => a.FriendlyName, selected => selected, (a, selected) => a)) { SelectedPlaybackDevicesList.Add(audioDevice.Id); AppLogger.Log.Info("Migrating Device: ", audioDevice); } } AppConfigs.Configuration.MigratedSelectedDeviceLists = true; AppConfigs.Configuration.SelectedPlaybackDeviceList = null; AppConfigs.Configuration.SelectedRecordingDeviceList = null; AppConfigs.Configuration.Save(); } }