this.FontPanel2.LoadConfig(settingLocal);
this.PreviewPanel.LoadConfig(settingCommon);
this.GetCountPanel.LoadConfig(settingCommon);
+ this.ShortUrlPanel.LoadConfig(settingCommon);
}
public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
this.FontPanel2.SaveConfig(settingLocal);
this.PreviewPanel.SaveConfig(settingCommon);
this.GetCountPanel.SaveConfig(settingCommon);
+ this.ShortUrlPanel.SaveConfig(settingCommon);
}
private void TreeViewSetting_BeforeSelect(object sender, TreeViewCancelEventArgs e)
#endif
try
{
- TinyUrlResolve = this.ShortUrlPanel.CheckTinyURL.Checked;
- ShortUrl.Instance.DisableExpanding = !TinyUrlResolve;
if (this.ProxyPanel.RadioProxyNone.Checked)
{
_MyProxyType = ProxyType.None;
ProxyPort = int.Parse(this.ProxyPanel.TextProxyPort.Text.Trim());
ProxyUser = this.ProxyPanel.TextProxyUser.Text.Trim();
ProxyPassword = this.ProxyPanel.TextProxyPassword.Text.Trim();
- UrlConvertAuto = this.ShortUrlPanel.CheckAutoConvertUrl.Checked;
- ShortenTco = this.ShortUrlPanel.ShortenTcoCheck.Checked;
Nicoms = this.CooperatePanel.CheckNicoms.Checked;
DefaultTimeOut = int.Parse(this.ConnectionPanel.ConnectionTimeOut.Text);
FavEventUnread = this.NotifyPanel.CheckFavEventUnread.Checked;
TranslateLanguage = Bing.GetLanguageEnumFromIndex(this.CooperatePanel.ComboBoxTranslateLanguage.SelectedIndex);
EventSoundFile = (string)this.NotifyPanel.ComboBoxEventNotifySound.SelectedItem;
- AutoShortUrlFirst = (MyCommon.UrlConverter)this.ShortUrlPanel.ComboBoxAutoShortUrlFirst.SelectedIndex;
- BitlyUser = this.ShortUrlPanel.TextBitlyId.Text;
- BitlyPwd = this.ShortUrlPanel.TextBitlyPw.Text;
TwitterApiUrl = this.ConnectionPanel.TwitterAPIText.Text.Trim();
UserAppointUrl = this.CooperatePanel.UserAppointUrlText.Text;
this.EnableImgAzyobuziNet = this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked;
}
}
- this.ShortUrlPanel.CheckTinyURL.Checked = TinyUrlResolve;
switch (_MyProxyType)
{
case ProxyType.None:
this.ProxyPanel.TextProxyUser.Text = ProxyUser;
this.ProxyPanel.TextProxyPassword.Text = ProxyPassword;
- this.ShortUrlPanel.CheckAutoConvertUrl.Checked = UrlConvertAuto;
- this.ShortUrlPanel.ShortenTcoCheck.Checked = ShortenTco;
- this.ShortUrlPanel.ShortenTcoCheck.Enabled = this.ShortUrlPanel.CheckAutoConvertUrl.Checked;
-
this.CooperatePanel.CheckNicoms.Checked = Nicoms;
this.ConnectionPanel.ConnectionTimeOut.Text = DefaultTimeOut.ToString();
this.NotifyPanel.CheckFavEventUnread.Checked = FavEventUnread;
this.CooperatePanel.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(TranslateLanguage);
SoundFileListup();
- this.ShortUrlPanel.ComboBoxAutoShortUrlFirst.SelectedIndex = (int)AutoShortUrlFirst;
- this.ShortUrlPanel.TextBitlyId.Text = BitlyUser;
- this.ShortUrlPanel.TextBitlyPw.Text = BitlyPwd;
- this.ShortUrlPanel.TextBitlyId.Modified = false;
- this.ShortUrlPanel.TextBitlyPw.Modified = false;
this.ConnectionPanel.TwitterAPIText.Text = TwitterApiUrl;
this.CooperatePanel.UserAppointUrlText.Text = UserAppointUrl;
}
public string RecommendStatusText { get; set; }
- public bool TinyUrlResolve { get; set; }
public ProxyType SelectedProxyType
{
public int ProxyPort { get; set; }
public string ProxyUser { get; set; }
public string ProxyPassword { get; set; }
- public bool UrlConvertAuto { get; set; }
- public bool ShortenTco { get; set; }
public bool Nicoms { get; set; }
- public MyCommon.UrlConverter AutoShortUrlFirst { get; set; }
public int DefaultTimeOut { get; set; }
- public string BitlyUser { get; set; }
- public string BitlyPwd { get; set; }
public string TwitterApiUrl { get; set; }
public bool EventNotifyEnabled { get; set; }
InitializeComponent();
}
+ public void LoadConfig(SettingCommon settingCommon)
+ {
+ this.CheckTinyURL.Checked = settingCommon.TinyUrlResolve;
+
+ // 使われていない設定項目 (Tween v1.0.5.0)
+ this.CheckAutoConvertUrl.Checked = false;
+ //this.CheckAutoConvertUrl.Checked = settingCommon.UrlConvertAuto;
+ //this.ShortenTcoCheck.Checked = settingCommon.ShortenTco;
+ this.ShortenTcoCheck.Enabled = this.CheckAutoConvertUrl.Checked;
+
+ this.ComboBoxAutoShortUrlFirst.SelectedIndex = (int)settingCommon.AutoShortUrlFirst;
+ this.TextBitlyId.Text = settingCommon.BilyUser;
+ this.TextBitlyPw.Text = settingCommon.BitlyPwd;
+ this.TextBitlyId.Modified = false;
+ this.TextBitlyPw.Modified = false;
+ }
+
+ public void SaveConfig(SettingCommon settingCommon)
+ {
+ settingCommon.TinyUrlResolve = this.CheckTinyURL.Checked;
+ settingCommon.UrlConvertAuto = this.CheckAutoConvertUrl.Checked;
+ //settingCommon.ShortenTco = this.ShortenTcoCheck.Checked;
+ settingCommon.AutoShortUrlFirst = (MyCommon.UrlConverter)this.ComboBoxAutoShortUrlFirst.SelectedIndex;
+ settingCommon.BilyUser = this.TextBitlyId.Text;
+ settingCommon.BitlyPwd = this.TextBitlyPw.Text;
+ }
+
private void ComboBoxAutoShortUrlFirst_SelectedIndexChanged(object sender, EventArgs e)
{
if (ComboBoxAutoShortUrlFirst.SelectedIndex == (int)MyCommon.UrlConverter.Bitly ||
this.PlaySoundMenuItem.Checked = this._cfgCommon.PlaySound;
this.PlaySoundFileMenuItem.Checked = this._cfgCommon.PlaySound;
- SettingDialog.TinyUrlResolve = _cfgCommon.TinyUrlResolve;
-
SettingDialog.SelectedProxyType = _cfgLocal.ProxyType;
SettingDialog.ProxyAddress = _cfgLocal.ProxyAddress;
SettingDialog.ProxyPort = _cfgLocal.ProxyPort;
SettingDialog.ProxyUser = _cfgLocal.ProxyUser;
SettingDialog.ProxyPassword = _cfgLocal.ProxyPassword;
- SettingDialog.UrlConvertAuto = false;
- //SettingDialog.UrlConvertAuto = _cfgCommon.UrlConvertAuto;
-
SettingDialog.DefaultTimeOut = _cfgCommon.DefaultTimeOut;
SettingDialog.EventNotifyEnabled = _cfgCommon.EventNotifyEnabled;
SettingDialog.EventNotifyFlag = _cfgCommon.EventNotifyFlag;
if (_cfgCommon.AutoShortUrlFirst < 0)
_cfgCommon.AutoShortUrlFirst = MyCommon.UrlConverter.Uxnu;
- SettingDialog.AutoShortUrlFirst = _cfgCommon.AutoShortUrlFirst;
- SettingDialog.BitlyUser = _cfgCommon.BilyUser;
- SettingDialog.BitlyPwd = _cfgCommon.BitlyPwd;
AtIdSupl = new AtIdSupplement(SettingAtIdList.Load().AtIdList, "@");
this.IdeographicSpaceToSpaceToolStripMenuItem.Checked = _cfgCommon.WideSpaceConvert;
tw.RestrictFavCheck = this._cfgCommon.RestrictFavCheck;
tw.ReadOwnPost = this._cfgCommon.ReadOwnPost;
- ShortUrl.Instance.DisableExpanding = !SettingDialog.TinyUrlResolve;
- ShortUrl.Instance.BitlyId = SettingDialog.BitlyUser;
- ShortUrl.Instance.BitlyKey = SettingDialog.BitlyPwd;
+ ShortUrl.Instance.DisableExpanding = !this._cfgCommon.TinyUrlResolve;
+ ShortUrl.Instance.BitlyId = this._cfgCommon.BilyUser;
+ ShortUrl.Instance.BitlyKey = this._cfgCommon.BitlyPwd;
HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
tw.TrackWord = _cfgCommon.TrackWord;
TrackToolStripMenuItem.Checked = !String.IsNullOrEmpty(tw.TrackWord);
tw.RestrictFavCheck = this._cfgCommon.RestrictFavCheck;
tw.ReadOwnPost = this._cfgCommon.ReadOwnPost;
- ShortUrl.Instance.DisableExpanding = !SettingDialog.TinyUrlResolve;
- ShortUrl.Instance.BitlyId = SettingDialog.BitlyUser;
- ShortUrl.Instance.BitlyKey = SettingDialog.BitlyPwd;
+ ShortUrl.Instance.DisableExpanding = !this._cfgCommon.TinyUrlResolve;
+ ShortUrl.Instance.BitlyId = this._cfgCommon.BilyUser;
+ ShortUrl.Instance.BitlyKey = this._cfgCommon.BitlyPwd;
HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
Networking.DefaultTimeout = TimeSpan.FromSeconds(this.SettingDialog.DefaultTimeOut);
_cfgCommon.TokenSecret = tw.AccessTokenSecret;
_cfgCommon.UserAccounts = SettingDialog.UserAccounts;
- _cfgCommon.TinyUrlResolve = SettingDialog.TinyUrlResolve;
- _cfgCommon.UrlConvertAuto = SettingDialog.UrlConvertAuto;
_cfgCommon.DefaultTimeOut = SettingDialog.DefaultTimeOut;
_cfgCommon.EventNotifyEnabled = SettingDialog.EventNotifyEnabled;
_cfgCommon.EventNotifyFlag = SettingDialog.EventNotifyFlag;
_cfgCommon.FavEventUnread = SettingDialog.FavEventUnread;
_cfgCommon.TranslateLanguage = SettingDialog.TranslateLanguage;
_cfgCommon.EventSoundFile = SettingDialog.EventSoundFile;
- _cfgCommon.AutoShortUrlFirst = SettingDialog.AutoShortUrlFirst;
if (IdeographicSpaceToSpaceToolStripMenuItem != null &&
IdeographicSpaceToSpaceToolStripMenuItem.IsDisposed == false)
{
_cfgCommon.WideSpaceConvert = this.IdeographicSpaceToSpaceToolStripMenuItem.Checked;
}
- _cfgCommon.BilyUser = SettingDialog.BitlyUser;
- _cfgCommon.BitlyPwd = SettingDialog.BitlyPwd;
_cfgCommon.SortOrder = (int)_statuses.SortOrder;
switch (_statuses.SortMode)
private async void UrlConvertAutoToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (!await UrlConvertAsync(SettingDialog.AutoShortUrlFirst))
+ if (!await UrlConvertAsync(this._cfgCommon.AutoShortUrlFirst))
{
- MyCommon.UrlConverter svc = SettingDialog.AutoShortUrlFirst;
+ MyCommon.UrlConverter svc = this._cfgCommon.AutoShortUrlFirst;
Random rnd = new Random();
// 前回使用した短縮URLサービス以外を選択する
do
{
svc = (MyCommon.UrlConverter)rnd.Next(System.Enum.GetNames(typeof(MyCommon.UrlConverter)).Length);
}
- while (svc == SettingDialog.AutoShortUrlFirst || svc == MyCommon.UrlConverter.Nicoms || svc == MyCommon.UrlConverter.Unu);
+ while (svc == this._cfgCommon.AutoShortUrlFirst || svc == MyCommon.UrlConverter.Nicoms || svc == MyCommon.UrlConverter.Unu);
await UrlConvertAsync(svc);
}
}
private void ToolStripMenuItemUrlAutoShorten_CheckedChanged(object sender, EventArgs e)
{
- SettingDialog.UrlConvertAuto = ToolStripMenuItemUrlAutoShorten.Checked;
+ this._cfgCommon.UrlConvertAuto = ToolStripMenuItemUrlAutoShorten.Checked;
}
private void ContextMenuPostMode_Opening(object sender, CancelEventArgs e)
{
- ToolStripMenuItemUrlAutoShorten.Checked = SettingDialog.UrlConvertAuto;
+ ToolStripMenuItemUrlAutoShorten.Checked = this._cfgCommon.UrlConvertAuto;
}
private void TraceOutToolStripMenuItem_Click(object sender, EventArgs e)