public TwitPicOptionsForm(TwitPicSettings settings) { InitializeComponent(); _settings = settings; this.txtAccessToken.Text = _settings.AccessToken; this.txtAccessSecret.Text = _settings.AccessSecret; this.cmbImageFormat.SelectedItem = settings.ImageFormat; this.qualitySlider.Value = _settings.JpgImageQuality; this.chkTweet.Checked = _settings.Tweet; this.chkPopBrowser.Checked = _settings.PopBrowser; HandleQualitySliderValueChanged(null, null); SelectedImageFormatChanged(null, null); // only makes sense to clear settings if they are not clear yet. this.btnClear.Enabled = (!String.IsNullOrEmpty(_settings.AccessToken) || !String.IsNullOrEmpty(_settings.AccessSecret)); }
public TwitPicOptionsForm(TwitPicSettings settings) { InitializeComponent(); _settings = settings; this.txtAccessToken.Text = _settings.AccessToken; this.txtAccessSecret.Text = _settings.AccessSecret; this.cmbImageFormat.SelectedItem = settings.ImageFormat; this.qualitySlider.Value = _settings.JpgImageQuality; this.chkTweet.Checked = _settings.Tweet; this.chkPopBrowser.Checked = _settings.PopBrowser; HandleQualitySliderValueChanged(null,null); SelectedImageFormatChanged(null,null); // only makes sense to clear settings if they are not clear yet. this.btnClear.Enabled = (!String.IsNullOrEmpty(_settings.AccessToken) || !String.IsNullOrEmpty(_settings.AccessSecret)); }
public void StoreTokens(TwitPicSettings s) { s.AccessToken = this._oauth["token"]; s.AccessSecret = this._oauth["token_secret"]; }