private bool _ValidationError = false;
private MyCommon.EVENTTYPE _MyEventNotifyFlag;
private MyCommon.EVENTTYPE _isMyEventNotifyFlag;
- private string _MyTranslateLanguage;
-
- public bool EnableImgAzyobuziNet { get; set; }
- public bool ImgAzyobuziNetDisabledInDM { get; set; }
- public MapProvider MapThumbnailProvider;
- public int MapThumbnailHeight;
- public int MapThumbnailWidth;
- public int MapThumbnailZoom;
+
public List<UserAccount> UserAccounts;
private long? InitialUserId;
public bool IsRemoveSameEvent;
this.GetCountPanel.LoadConfig(settingCommon);
this.ShortUrlPanel.LoadConfig(settingCommon);
this.ProxyPanel.LoadConfig(settingLocal);
+ this.CooperatePanel.LoadConfig(settingCommon);
}
public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
this.GetCountPanel.SaveConfig(settingCommon);
this.ShortUrlPanel.SaveConfig(settingCommon);
this.ProxyPanel.SaveConfig(settingLocal);
+ this.CooperatePanel.SaveConfig(settingCommon);
}
private void TreeViewSetting_BeforeSelect(object sender, TreeViewCancelEventArgs e)
#endif
try
{
- Nicoms = this.CooperatePanel.CheckNicoms.Checked;
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;
- TranslateLanguage = Bing.GetLanguageEnumFromIndex(this.CooperatePanel.ComboBoxTranslateLanguage.SelectedIndex);
EventSoundFile = (string)this.NotifyPanel.ComboBoxEventNotifySound.SelectedItem;
TwitterApiUrl = this.ConnectionPanel.TwitterAPIText.Text.Trim();
- UserAppointUrl = this.CooperatePanel.UserAppointUrlText.Text;
- this.EnableImgAzyobuziNet = this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked;
- this.ImgAzyobuziNetDisabledInDM = this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
- this.MapThumbnailProvider = (MapProvider)this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex;
- this.MapThumbnailHeight = int.Parse(this.CooperatePanel.MapThumbnailHeightTextBox.Text);
- this.MapThumbnailWidth = int.Parse(this.CooperatePanel.MapThumbnailWidthTextBox.Text);
- this.MapThumbnailZoom = int.Parse(this.CooperatePanel.MapThumbnailZoomTextBox.Text);
this.IsRemoveSameEvent = this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked;
}
catch(Exception)
}
}
- this.CooperatePanel.CheckNicoms.Checked = Nicoms;
this.ConnectionPanel.ConnectionTimeOut.Text = DefaultTimeOut.ToString();
ApplyEventNotifyFlag(EventNotifyEnabled, EventNotifyFlag, IsMyEventNotifyFlag);
this.NotifyPanel.CheckForceEventNotify.Checked = ForceEventNotify;
this.NotifyPanel.CheckFavEventUnread.Checked = FavEventUnread;
- this.CooperatePanel.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(TranslateLanguage);
SoundFileListup();
this.ConnectionPanel.TwitterAPIText.Text = TwitterApiUrl;
- this.CooperatePanel.UserAppointUrlText.Text = UserAppointUrl;
- this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked = this.EnableImgAzyobuziNet;
- this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked = this.ImgAzyobuziNetDisabledInDM;
- this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex = (int)this.MapThumbnailProvider;
- this.CooperatePanel.MapThumbnailHeightTextBox.Text = this.MapThumbnailHeight.ToString();
- this.CooperatePanel.MapThumbnailWidthTextBox.Text = this.MapThumbnailWidth.ToString();
- this.CooperatePanel.MapThumbnailZoomTextBox.Text = this.MapThumbnailZoom.ToString();
this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked = this.IsRemoveSameEvent;
this.TreeViewSetting.Nodes["BasedNode"].Tag = BasedPanel;
public string RecommendStatusText { get; set; }
- public bool Nicoms { get; set; }
public int DefaultTimeOut { get; set; }
public string TwitterApiUrl { get; set; }
public bool ForceEventNotify { get; set; }
public bool FavEventUnread { get; set; }
- public string TranslateLanguage
- {
- get
- {
- return _MyTranslateLanguage;
- }
- set
- {
- _MyTranslateLanguage = value;
- this.CooperatePanel.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(value);
- }
- }
-
public string EventSoundFile { get; set; }
- public string UserAppointUrl { get; set; }
private bool StartAuth()
{
using System.Linq;
using System.Text;
using System.Windows.Forms;
+using OpenTween.Thumbnail;
namespace OpenTween.Setting.Panel
{
InitializeComponent();
}
+ public void LoadConfig(SettingCommon settingCommon)
+ {
+ this.CheckNicoms.Checked = settingCommon.Nicoms;
+ this.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(settingCommon.TranslateLanguage);
+ this.UserAppointUrlText.Text = settingCommon.UserAppointUrl;
+ this.EnableImgAzyobuziNetCheckBox.Checked = settingCommon.EnableImgAzyobuziNet;
+ this.ImgAzyobuziNetDisabledInDMCheckBox.Checked = settingCommon.ImgAzyobuziNetDisabledInDM;
+ this.MapThumbnailProviderComboBox.SelectedIndex = (int)settingCommon.MapThumbnailProvider;
+ this.MapThumbnailHeightTextBox.Text = settingCommon.MapThumbnailHeight.ToString();
+ this.MapThumbnailWidthTextBox.Text = settingCommon.MapThumbnailWidth.ToString();
+ this.MapThumbnailZoomTextBox.Text = settingCommon.MapThumbnailZoom.ToString();
+ }
+
+ public void SaveConfig(SettingCommon settingCommon)
+ {
+ settingCommon.Nicoms = this.CheckNicoms.Checked;
+ settingCommon.TranslateLanguage = Bing.GetLanguageEnumFromIndex(this.ComboBoxTranslateLanguage.SelectedIndex);
+ settingCommon.UserAppointUrl = this.UserAppointUrlText.Text;
+ settingCommon.EnableImgAzyobuziNet = this.EnableImgAzyobuziNetCheckBox.Checked;
+ settingCommon.ImgAzyobuziNetDisabledInDM = this.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
+ settingCommon.MapThumbnailProvider = (MapProvider)this.MapThumbnailProviderComboBox.SelectedIndex;
+ settingCommon.MapThumbnailHeight = int.Parse(this.MapThumbnailHeightTextBox.Text);
+ settingCommon.MapThumbnailWidth = int.Parse(this.MapThumbnailWidthTextBox.Text);
+ settingCommon.MapThumbnailZoom = int.Parse(this.MapThumbnailZoomTextBox.Text);
+ }
+
private void UserAppointUrlText_Validating(object sender, CancelEventArgs e)
{
if (!UserAppointUrlText.Text.StartsWith("http") && !string.IsNullOrEmpty(UserAppointUrlText.Text))
{
Type classType;
- MapProvider confValue = AppendSettingDialog.Instance.MapThumbnailProvider;
+ MapProvider confValue = SettingCommon.Instance.MapThumbnailProvider;
switch (confValue)
{
case MapProvider.OpenStreetMap:
{
public override string CreateStaticMapUrl(double latitude, double longitude)
{
- var width = AppendSettingDialog.Instance.MapThumbnailWidth; // この辺なんとかならんかなあ
- var height = AppendSettingDialog.Instance.MapThumbnailHeight;
- var zoom = AppendSettingDialog.Instance.MapThumbnailZoom;
+ var width = SettingCommon.Instance.MapThumbnailWidth; // この辺なんとかならんかなあ
+ var height = SettingCommon.Instance.MapThumbnailHeight;
+ var zoom = SettingCommon.Instance.MapThumbnailZoom;
var location = latitude.ToString() + "," + longitude.ToString();
var baseUrl = "https://maps.googleapis.com/maps/api/staticmap";
public override string CreateMapLinkUrl(double latitude, double longitude)
{
- var zoom = AppendSettingDialog.Instance.MapThumbnailZoom;
+ var zoom = SettingCommon.Instance.MapThumbnailZoom;
var location = latitude.ToString() + "," + longitude.ToString();
var baseUrl = "https://maps.google.co.jp/maps";
{
public override string CreateStaticMapUrl(double latitude, double longitude)
{
- var width = AppendSettingDialog.Instance.MapThumbnailWidth;
- var height = AppendSettingDialog.Instance.MapThumbnailHeight;
- var zoom = AppendSettingDialog.Instance.MapThumbnailZoom;
+ var width = SettingCommon.Instance.MapThumbnailWidth;
+ var height = SettingCommon.Instance.MapThumbnailHeight;
+ var zoom = SettingCommon.Instance.MapThumbnailZoom;
var location = latitude.ToString() + "," + longitude.ToString();
return "http://ojw.dev.openstreetmap.org/StaticMap/?show=1&att=none¢er=" + location + "&size=" + width + "x" + height + "&zoom=" + zoom + "&mlat0=" + latitude.ToString() + "&mlon0=" + longitude.ToString() + "&mico0=18479";
public override string CreateMapLinkUrl(double latitude, double longitude)
{
- var zoom = AppendSettingDialog.Instance.MapThumbnailZoom;
+ var zoom = SettingCommon.Instance.MapThumbnailZoom;
return "http://www.openstreetmap.org/index.html?lat=" + latitude.ToString() + "&lon=" + longitude.ToString() + "&zoom=" + zoom + "&mlat=" + latitude.ToString() + "&mlon=" + longitude.ToString();
}
SettingDialog.IsMyEventNotifyFlag = _cfgCommon.IsMyEventNotifyFlag;
SettingDialog.ForceEventNotify = _cfgCommon.ForceEventNotify;
SettingDialog.FavEventUnread = _cfgCommon.FavEventUnread;
- SettingDialog.TranslateLanguage = _cfgCommon.TranslateLanguage;
SettingDialog.EventSoundFile = _cfgCommon.EventSoundFile;
//廃止サービスが選択されていた場合bit.lyへ読み替え
//Regex statregex = new Regex("^0*");
SettingDialog.RecommendStatusText = " [TWNv" + Regex.Replace(MyCommon.FileVersion.Replace(".", ""), "^0*", "") + "]";
- SettingDialog.Nicoms = _cfgCommon.Nicoms;
-
- SettingDialog.UserAppointUrl = _cfgCommon.UserAppointUrl;
-
- SettingDialog.EnableImgAzyobuziNet = _cfgCommon.EnableImgAzyobuziNet;
- SettingDialog.ImgAzyobuziNetDisabledInDM = _cfgCommon.ImgAzyobuziNetDisabledInDM;
- SettingDialog.MapThumbnailProvider = _cfgCommon.MapThumbnailProvider;
- SettingDialog.MapThumbnailHeight = _cfgCommon.MapThumbnailHeight;
- SettingDialog.MapThumbnailWidth = _cfgCommon.MapThumbnailWidth;
- SettingDialog.MapThumbnailZoom = _cfgCommon.MapThumbnailZoom;
SettingDialog.IsRemoveSameEvent = _cfgCommon.IsRemoveSameEvent;
//ハッシュタグ関連
_history[_history.Count - 1] = new PostingStatus(StatusText.Text, _reply_to_id, _reply_to_name);
- if (SettingDialog.Nicoms)
+ if (this._cfgCommon.Nicoms)
{
StatusText.SelectionStart = StatusText.Text.Length;
await UrlConvertAsync(MyCommon.UrlConverter.Nicoms);
SplitContainer1.IsPanelInverted = !this._cfgCommon.StatusAreaAtBottom;
var imgazyobizinet = ThumbnailGenerator.ImgAzyobuziNetInstance;
- imgazyobizinet.Enabled = this.SettingDialog.EnableImgAzyobuziNet;
- imgazyobizinet.DisabledInDM = this.SettingDialog.ImgAzyobuziNetDisabledInDM;
+ imgazyobizinet.Enabled = this._cfgCommon.EnableImgAzyobuziNet;
+ imgazyobizinet.DisabledInDM = this._cfgCommon.ImgAzyobuziNetDisabledInDM;
this.PlaySoundMenuItem.Checked = this._cfgCommon.PlaySound;
this.PlaySoundFileMenuItem.Checked = this._cfgCommon.PlaySound;
_cfgCommon.IsMyEventNotifyFlag = SettingDialog.IsMyEventNotifyFlag;
_cfgCommon.ForceEventNotify = SettingDialog.ForceEventNotify;
_cfgCommon.FavEventUnread = SettingDialog.FavEventUnread;
- _cfgCommon.TranslateLanguage = SettingDialog.TranslateLanguage;
_cfgCommon.EventSoundFile = SettingDialog.EventSoundFile;
if (IdeographicSpaceToSpaceToolStripMenuItem != null &&
IdeographicSpaceToSpaceToolStripMenuItem.IsDisposed == false)
break;
}
- _cfgCommon.Nicoms = SettingDialog.Nicoms;
_cfgCommon.HashTags = HashMgr.HashHistories;
if (HashMgr.IsPermanent)
{
_cfgCommon.AllAtReply = tw.AllAtReply;
_cfgCommon.UseImageService = ImageSelector.ServiceIndex;
_cfgCommon.UseImageServiceName = ImageSelector.ServiceName;
- _cfgCommon.UserAppointUrl = SettingDialog.UserAppointUrl;
- _cfgCommon.EnableImgAzyobuziNet = SettingDialog.EnableImgAzyobuziNet;
- _cfgCommon.ImgAzyobuziNetDisabledInDM = SettingDialog.ImgAzyobuziNetDisabledInDM;
- _cfgCommon.MapThumbnailProvider = SettingDialog.MapThumbnailProvider;
- _cfgCommon.MapThumbnailHeight = SettingDialog.MapThumbnailHeight;
- _cfgCommon.MapThumbnailWidth = SettingDialog.MapThumbnailWidth;
- _cfgCommon.MapThumbnailZoom = SettingDialog.MapThumbnailZoom;
_cfgCommon.IsRemoveSameEvent = SettingDialog.IsRemoveSameEvent;
_cfgCommon.Save();
// 文字列が選択されている場合はその文字列について処理
//nico.ms使用、nicovideoにマッチしたら変換
- if (SettingDialog.Nicoms && Regex.IsMatch(tmp, nico))
+ if (this._cfgCommon.Nicoms && Regex.IsMatch(tmp, nico))
{
result = nicoms.Shorten(tmp);
}
StatusText.Select(StatusText.Text.IndexOf(mt.Result("${url}"), StringComparison.Ordinal), mt.Result("${url}").Length);
//nico.ms使用、nicovideoにマッチしたら変換
- if (SettingDialog.Nicoms && Regex.IsMatch(tmp, nico))
+ if (this._cfgCommon.Nicoms && Regex.IsMatch(tmp, nico))
{
result = nicoms.Shorten(tmp);
}
{
var translatedText = await bing.TranslateAsync(str,
langFrom: null,
- langTo: this.SettingDialog.TranslateLanguage);
+ langTo: this._cfgCommon.TranslateLanguage);
this.PostBrowser.DocumentText = this.createDetailHtml(translatedText);
}
private void OpenUserAppointUrl()
{
- if (SettingDialog.UserAppointUrl != null)
+ if (this._cfgCommon.UserAppointUrl != null)
{
- if (SettingDialog.UserAppointUrl.Contains("{ID}") || SettingDialog.UserAppointUrl.Contains("{STATUS}"))
+ if (this._cfgCommon.UserAppointUrl.Contains("{ID}") || this._cfgCommon.UserAppointUrl.Contains("{STATUS}"))
{
if (_curPost != null)
{
- string xUrl = SettingDialog.UserAppointUrl;
+ string xUrl = this._cfgCommon.UserAppointUrl;
xUrl = xUrl.Replace("{ID}", _curPost.ScreenName);
if (_curPost.RetweetedId != null)
{
}
else
{
- OpenUriAsync(SettingDialog.UserAppointUrl);
+ OpenUriAsync(this._cfgCommon.UserAppointUrl);
}
}
}