this.ShortUrlPanel.LoadConfig(settingCommon);
this.ProxyPanel.LoadConfig(settingLocal);
this.CooperatePanel.LoadConfig(settingCommon);
+ this.ConnectionPanel.LoadConfig(settingCommon);
}
public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
this.ShortUrlPanel.SaveConfig(settingCommon);
this.ProxyPanel.SaveConfig(settingLocal);
this.CooperatePanel.SaveConfig(settingCommon);
+ this.ConnectionPanel.SaveConfig(settingCommon);
}
private void TreeViewSetting_BeforeSelect(object sender, TreeViewCancelEventArgs e)
#endif
try
{
- DefaultTimeOut = int.Parse(this.ConnectionPanel.ConnectionTimeOut.Text);
EventNotifyEnabled = this.NotifyPanel.CheckEventNotify.Checked;
GetEventNotifyFlag(ref _MyEventNotifyFlag, ref _isMyEventNotifyFlag);
ForceEventNotify = this.NotifyPanel.CheckForceEventNotify.Checked;
FavEventUnread = this.NotifyPanel.CheckFavEventUnread.Checked;
EventSoundFile = (string)this.NotifyPanel.ComboBoxEventNotifySound.SelectedItem;
- TwitterApiUrl = this.ConnectionPanel.TwitterAPIText.Text.Trim();
this.IsRemoveSameEvent = this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked;
}
catch(Exception)
}
}
- this.ConnectionPanel.ConnectionTimeOut.Text = DefaultTimeOut.ToString();
-
ApplyEventNotifyFlag(EventNotifyEnabled, EventNotifyFlag, IsMyEventNotifyFlag);
this.NotifyPanel.CheckForceEventNotify.Checked = ForceEventNotify;
this.NotifyPanel.CheckFavEventUnread.Checked = FavEventUnread;
SoundFileListup();
- this.ConnectionPanel.TwitterAPIText.Text = TwitterApiUrl;
this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked = this.IsRemoveSameEvent;
public string RecommendStatusText { get; set; }
- public int DefaultTimeOut { get; set; }
- public string TwitterApiUrl { get; set; }
-
public bool EventNotifyEnabled { get; set; }
public MyCommon.EVENTTYPE EventNotifyFlag
InitializeComponent();
}
+ public void LoadConfig(SettingCommon settingCommon)
+ {
+ this.ConnectionTimeOut.Text = settingCommon.DefaultTimeOut.ToString();
+ this.TwitterAPIText.Text = settingCommon.TwitterUrl;
+ }
+
+ public void SaveConfig(SettingCommon settingCommon)
+ {
+ settingCommon.DefaultTimeOut = int.Parse(this.ConnectionTimeOut.Text);
+ settingCommon.TwitterUrl = this.TwitterAPIText.Text.Trim();
+ }
+
private void ConnectionTimeOut_Validating(object sender, CancelEventArgs e)
{
int tm;
//設定画面への反映
this.SettingDialog.LoadConfig(this._cfgCommon, this._cfgLocal);
HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
- SettingDialog.TwitterApiUrl = _cfgCommon.TwitterUrl;
//認証関連
if (string.IsNullOrEmpty(_cfgCommon.Token)) _cfgCommon.UserName = "";
this.PlaySoundMenuItem.Checked = this._cfgCommon.PlaySound;
this.PlaySoundFileMenuItem.Checked = this._cfgCommon.PlaySound;
- SettingDialog.DefaultTimeOut = _cfgCommon.DefaultTimeOut;
SettingDialog.EventNotifyEnabled = _cfgCommon.EventNotifyEnabled;
SettingDialog.EventNotifyFlag = _cfgCommon.EventNotifyFlag;
SettingDialog.IsMyEventNotifyFlag = _cfgCommon.IsMyEventNotifyFlag;
}
//Twitter用通信クラス初期化
- Networking.DefaultTimeout = TimeSpan.FromSeconds(this.SettingDialog.DefaultTimeOut);
+ Networking.DefaultTimeout = TimeSpan.FromSeconds(this._cfgCommon.DefaultTimeOut);
Networking.SetWebProxy(this._cfgLocal.ProxyType,
this._cfgLocal.ProxyAddress, this._cfgLocal.ProxyPort,
this._cfgLocal.ProxyUser, this._cfgLocal.ProxyPassword);
ShortUrl.Instance.BitlyKey = this._cfgCommon.BitlyPwd;
HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
- Networking.DefaultTimeout = TimeSpan.FromSeconds(this.SettingDialog.DefaultTimeOut);
+ Networking.DefaultTimeout = TimeSpan.FromSeconds(this._cfgCommon.DefaultTimeOut);
Networking.SetWebProxy(this._cfgLocal.ProxyType,
this._cfgLocal.ProxyAddress, this._cfgLocal.ProxyPort,
this._cfgLocal.ProxyUser, this._cfgLocal.ProxyPassword);
_cfgCommon.TokenSecret = tw.AccessTokenSecret;
_cfgCommon.UserAccounts = SettingDialog.UserAccounts;
- _cfgCommon.DefaultTimeOut = SettingDialog.DefaultTimeOut;
_cfgCommon.EventNotifyEnabled = SettingDialog.EventNotifyEnabled;
_cfgCommon.EventNotifyFlag = SettingDialog.EventNotifyFlag;
_cfgCommon.IsMyEventNotifyFlag = SettingDialog.IsMyEventNotifyFlag;
_cfgCommon.HashIsHead = HashMgr.IsHead;
_cfgCommon.HashIsPermanent = HashMgr.IsPermanent;
_cfgCommon.HashIsNotAddToAtReply = HashMgr.IsNotAddToAtReply;
- _cfgCommon.TwitterUrl = SettingDialog.TwitterApiUrl;
if (ToolStripFocusLockMenuItem != null &&
ToolStripFocusLockMenuItem.IsDisposed == false)
{