コード例 #1
0
        public PlayMusicSettingsControl(PlayMusicServiceSettings settings)
        {
            InitializeComponent();
            this.settings = settings;
            var rbem = new RadioButtonEnumMapper();

            rbem.Assign(qHighRadioButton, (int)StreamQuality.High);
            rbem.Assign(qMediumRadioButton, (int)StreamQuality.Medium);
            rbem.Assign(qLowRadioButton, (int)StreamQuality.Low);

            rbem.Select((int)settings.StreamQuality);

            rbem.ValueChanged += (sender, args) => settings.StreamQuality = (StreamQuality)rbem.Value;
        }
コード例 #2
0
        public TidalSettingsControl(TidalServiceSettings settings)
        {
            InitializeComponent();
            this.settings = settings;
            var rbem = new RadioButtonEnumMapper();

            rbem.Assign(qLosslessRadioButton, (int)SoundQuality.LOSSLESS);
            rbem.Assign(qHighRadioButton, (int)SoundQuality.HIGH);
            rbem.Assign(qLowRadioButton, (int)SoundQuality.LOW);

            rbem.Select((int)settings.StreamQuality);
            appendVerCheckBox.Checked             = settings.AppendVersionToTrackTitle;
            unlessAlbumVersionCheckBox.Enabled    = appendVerCheckBox.Checked;
            unlessAlbumVersionCheckBox.Checked    = settings.DontAppendAlbumVersion;
            useOfflineUrlEndpointCheckbox.Checked = settings.UseOfflineUrl;

            rbem.ValueChanged += (sender, args) => settings.StreamQuality = (SoundQuality)rbem.Value;
        }