Beispiel #1
0
        public RootAppConfig()
        {
            IsFirstRun = true;

            Audio = new AudioAppConfig();
            Cloud = new CloudAppConfig();
            Controls = new ControlsAppConfig();
            Library = new LibraryAppConfig();     
            General = new GeneralAppConfig();       
            Windows = new WindowsAppConfig();
            LibraryBrowser = new LibraryBrowserAppConfig();
            ResumePlayback = new ResumePlaybackAppConfig();
        }
 public AudioAppConfigChangedMessage(object sender, AudioAppConfig config) 
     : base(sender)
 {
     Config = config;
 }       
        public void RefreshAudioPreferences(AudioAppConfig config)
        {
            _audioAppConfig = config;
            InvokeOnMainThread(() => {
                _isRefreshingComboBoxes = true;
                trackBufferSize.Value = config.BufferSize;
                trackUpdatePeriod.Value = config.UpdatePeriod;
                lblBufferSizeValue.StringValue = config.BufferSize.ToString();
                lblUpdatePeriodValue.StringValue = config.UpdatePeriod.ToString();
                popupOutputDevice.SelectItem(_devices.FindIndex(d => d.Id == config.AudioDevice.Id && d.DriverType == config.AudioDevice.DriverType));
                if (popupOutputDevice.IndexOfSelectedItem == -1)
                    popupOutputDevice.SelectItem(0);

                _isRefreshingComboBoxes = false;
            });
        }
        public void RefreshAudioPreferences(AudioAppConfig config)
        {
            _audioAppConfig = config;
            Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
            {
                _isRefreshingComboBoxes = true;
                trackBufferSize.Value = config.BufferSize;
                trackUpdatePeriod.Value = config.UpdatePeriod;
                lblBufferSize.Content = config.BufferSize.ToString();
                lblUpdatePeriod.Content = config.UpdatePeriod.ToString();
                comboOutputDevice.SelectedIndex = _devices.FindIndex(d => d.Id == config.AudioDevice.Id && d.DriverType == config.AudioDevice.DriverType);
                if (comboOutputDevice.SelectedIndex == -1)
                    comboOutputDevice.SelectedIndex = 0;

                if (config.SampleRate == 44100)
                    comboSampleRate.SelectedIndex = 0;
                else if (config.SampleRate == 48000)
                    comboSampleRate.SelectedIndex = 1;
                else if (config.SampleRate == 96000)
                    comboSampleRate.SelectedIndex = 2;
                else
                    comboSampleRate.SelectedIndex = -1;

                _isRefreshingComboBoxes = false;
            }));
        }
Beispiel #5
0
 public void RefreshAudioPreferences(AudioAppConfig config)
 {
 }
		public void RefreshAudioPreferences(AudioAppConfig config)
		{
			_config = config;
			InvokeOnMainThread(() => {                
				GenerateItems();
				tableView.ReloadData();
			});
		}