private bool _waitLists = false;
private BackgroundWorker[] _bw = new BackgroundWorker[20];
private BackgroundWorker _bwFollower;
- private InternetSecurityManager SecurityManager;
private int UnreadCounter = -1;
private int UnreadAtCounter = -1;
private class GetWorkerResult
{
public string retMsg = ""; //処理結果詳細メッセージ。エラー時に値がセットされる
- public int page; //取得対象ページ番号
- public int endPage = 0; //取得終了ページ番号(継続可能ならインクリメントされて返る。pageと比較して継続判定)
public MyCommon.WORKERTYPE type; //処理種別
- public Dictionary<string, Image> imgs = null; //新規取得したアイコンイメージ
public string tName = ""; //Fav追加・削除時のタブ名
- public List<long> ids = null; //Fav追加・削除時のID
public List<long> sIds = null; //Fav追加・削除成功分のID
public bool newDM = false;
public int addCount;
private class GetWorkerArg
{
public int page; //処理対象ページ番号
- public int endPage; //処理終了ページ番号(起動時の読み込みページ数。通常時はpageと同じ値をセット)
public MyCommon.WORKERTYPE type; //処理種別
- public string url = ""; //URLをブラウザで開くときのアドレス
public PostingStatus status = new PostingStatus(); //発言POST時の発言内容
public List<long> ids; //Fav追加・削除時のItemIndex
public List<long> sIds; //Fav追加・削除成功分のItemIndex
}
}
- private void TweenMain_Disposed(object sender, EventArgs e)
- {
- //後始末
- SettingDialog.Dispose();
- SearchDialog.Dispose();
- fltDialog.Dispose();
- UrlDialog.Dispose();
- if (NIconAt != null) NIconAt.Dispose();
- if (NIconAtRed != null) NIconAtRed.Dispose();
- if (NIconAtSmoke != null) NIconAtSmoke.Dispose();
- if (NIconRefresh[0] != null) NIconRefresh[0].Dispose();
- if (NIconRefresh[1] != null) NIconRefresh[1].Dispose();
- if (NIconRefresh[2] != null) NIconRefresh[2].Dispose();
- if (NIconRefresh[3] != null) NIconRefresh[3].Dispose();
- if (TabIcon != null) TabIcon.Dispose();
- if (MainIcon != null) MainIcon.Dispose();
- if (ReplyIcon != null) ReplyIcon.Dispose();
- if (ReplyIconBlink != null) ReplyIconBlink.Dispose();
- _listViewImageList.Dispose();
- _brsHighLight.Dispose();
- if (_brsBackColorMine != null) _brsBackColorMine.Dispose();
- if (_brsBackColorAt != null) _brsBackColorAt.Dispose();
- if (_brsBackColorYou != null) _brsBackColorYou.Dispose();
- if (_brsBackColorAtYou != null) _brsBackColorAtYou.Dispose();
- if (_brsBackColorAtFromTarget != null) _brsBackColorAtFromTarget.Dispose();
- if (_brsBackColorAtTo != null) _brsBackColorAtTo.Dispose();
- if (_brsBackColorNone != null) _brsBackColorNone.Dispose();
- if (_brsDeactiveSelection != null) _brsDeactiveSelection.Dispose();
- //sf.Dispose();
- sfTab.Dispose();
- foreach (BackgroundWorker bw in _bw)
- {
- if (bw != null)
- bw.Dispose();
- }
- if (_bwFollower != null)
- {
- _bwFollower.Dispose();
- }
- this._apiGauge.Dispose();
- if (IconCache != null)
- {
- this.IconCache.CancelAsync();
- this.IconCache.Dispose();
+ private bool disposed = false;
+
+ /// <summary>
+ /// 使用中のリソースをすべてクリーンアップします。
+ /// </summary>
+ /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+
+ if (this.disposed)
+ return;
+
+ if (disposing)
+ {
+ if (this.components != null)
+ this.components.Dispose();
+
+ //後始末
+ SettingDialog.Dispose();
+ SearchDialog.Dispose();
+ fltDialog.Dispose();
+ UrlDialog.Dispose();
+ if (NIconAt != null) NIconAt.Dispose();
+ if (NIconAtRed != null) NIconAtRed.Dispose();
+ if (NIconAtSmoke != null) NIconAtSmoke.Dispose();
+ if (NIconRefresh[0] != null) NIconRefresh[0].Dispose();
+ if (NIconRefresh[1] != null) NIconRefresh[1].Dispose();
+ if (NIconRefresh[2] != null) NIconRefresh[2].Dispose();
+ if (NIconRefresh[3] != null) NIconRefresh[3].Dispose();
+ if (TabIcon != null) TabIcon.Dispose();
+ if (MainIcon != null) MainIcon.Dispose();
+ if (ReplyIcon != null) ReplyIcon.Dispose();
+ if (ReplyIconBlink != null) ReplyIconBlink.Dispose();
+ _listViewImageList.Dispose();
+ _brsHighLight.Dispose();
+ if (_brsBackColorMine != null) _brsBackColorMine.Dispose();
+ if (_brsBackColorAt != null) _brsBackColorAt.Dispose();
+ if (_brsBackColorYou != null) _brsBackColorYou.Dispose();
+ if (_brsBackColorAtYou != null) _brsBackColorAtYou.Dispose();
+ if (_brsBackColorAtFromTarget != null) _brsBackColorAtFromTarget.Dispose();
+ if (_brsBackColorAtTo != null) _brsBackColorAtTo.Dispose();
+ if (_brsBackColorNone != null) _brsBackColorNone.Dispose();
+ if (_brsDeactiveSelection != null) _brsDeactiveSelection.Dispose();
+ //sf.Dispose();
+ sfTab.Dispose();
+ foreach (BackgroundWorker bw in _bw)
+ {
+ if (bw != null)
+ bw.Dispose();
+ }
+ if (_bwFollower != null)
+ {
+ _bwFollower.Dispose();
+ }
+ this._apiGauge.Dispose();
+ if (IconCache != null)
+ {
+ this.IconCache.CancelAsync();
+ this.IconCache.Dispose();
+ }
+
+ if (this.thumbnailTokenSource != null)
+ this.thumbnailTokenSource.Dispose();
+
+ this.itemCacheLock.Dispose();
+ this.tw.Dispose();
+ this._hookGlobalHotkey.Dispose();
}
// 終了時にRemoveHandlerしておかないとメモリリークする
// http://msdn.microsoft.com/ja-jp/library/microsoft.win32.systemevents.powermodechanged.aspx
Microsoft.Win32.SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
+
+ this.disposed = true;
}
private void LoadIcon(ref Icon IconInstance, string FileName)
//Win32Api.SetProxy(HttpConnection.ProxyType.Specified, "127.0.0.1", 8080, "user", "pass")
- SecurityManager = new InternetSecurityManager(PostBrowser);
+ new InternetSecurityManager(PostBrowser);
this.PostBrowser.AllowWebBrowserDrop = false; // COMException を回避するため、ActiveX の初期化が終わってから設定する
MyCommon.TwitterApiInfo.AccessLimitUpdated += TwitterApiStatus_AccessLimitUpdated;
sfTab.Alignment = StringAlignment.Center;
sfTab.LineAlignment = StringAlignment.Center;
+ //不正値チェック
+ if (!MyApplication.StartupOptions.ContainsKey("nolimit"))
+ {
+ if (this._cfgCommon.TimelinePeriod < 15 && this._cfgCommon.TimelinePeriod > 0)
+ this._cfgCommon.TimelinePeriod = 15;
+
+ if (this._cfgCommon.ReplyPeriod < 15 && this._cfgCommon.ReplyPeriod > 0)
+ this._cfgCommon.ReplyPeriod = 15;
+
+ if (this._cfgCommon.DMPeriod < 15 && this._cfgCommon.DMPeriod > 0)
+ this._cfgCommon.DMPeriod = 15;
+
+ if (this._cfgCommon.PubSearchPeriod < 30 && this._cfgCommon.PubSearchPeriod > 0)
+ this._cfgCommon.PubSearchPeriod = 30;
+
+ if (this._cfgCommon.UserTimelinePeriod < 15 && this._cfgCommon.UserTimelinePeriod > 0)
+ this._cfgCommon.UserTimelinePeriod = 15;
+
+ if (this._cfgCommon.ListsPeriod < 15 && this._cfgCommon.ListsPeriod > 0)
+ this._cfgCommon.ListsPeriod = 15;
+ }
+
//設定画面への反映
+ this.SettingDialog.LoadConfig(this._cfgCommon, this._cfgLocal);
HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
SettingDialog.TwitterApiUrl = _cfgCommon.TwitterUrl;
SettingDialog.UserAccounts = _cfgCommon.UserAccounts;
- SettingDialog.TimelinePeriodInt = _cfgCommon.TimelinePeriod;
- SettingDialog.ReplyPeriodInt = _cfgCommon.ReplyPeriod;
- SettingDialog.DMPeriodInt = _cfgCommon.DMPeriod;
- SettingDialog.PubSearchPeriodInt = _cfgCommon.PubSearchPeriod;
- SettingDialog.UserTimelinePeriodInt = _cfgCommon.UserTimelinePeriod;
- SettingDialog.ListsPeriodInt = _cfgCommon.ListsPeriod;
- //不正値チェック
- if (!MyApplication.StartupOptions.ContainsKey("nolimit"))
- {
- if (SettingDialog.TimelinePeriodInt < 15 && SettingDialog.TimelinePeriodInt > 0) SettingDialog.TimelinePeriodInt = 15;
- if (SettingDialog.ReplyPeriodInt < 15 && SettingDialog.ReplyPeriodInt > 0) SettingDialog.ReplyPeriodInt = 15;
- if (SettingDialog.DMPeriodInt < 15 && SettingDialog.DMPeriodInt > 0) SettingDialog.DMPeriodInt = 15;
- if (SettingDialog.PubSearchPeriodInt < 30 && SettingDialog.PubSearchPeriodInt > 0) SettingDialog.PubSearchPeriodInt = 30;
- if (SettingDialog.UserTimelinePeriodInt < 15 && SettingDialog.UserTimelinePeriodInt > 0) SettingDialog.UserTimelinePeriodInt = 15;
- if (SettingDialog.ListsPeriodInt < 15 && SettingDialog.ListsPeriodInt > 0) SettingDialog.ListsPeriodInt = 15;
- }
-
- //起動時読み込み分を既読にするか。trueなら既読として処理
- SettingDialog.Readed = _cfgCommon.Read;
//新着取得時のリストスクロールをするか。trueならスクロールしない
ListLockMenuItem.Checked = _cfgCommon.ListLock;
this.LockListFileMenuItem.Checked = _cfgCommon.ListLock;
- SettingDialog.IconSz = _cfgCommon.IconSize;
- //文末ステータス
- SettingDialog.Status = _cfgLocal.StatusText;
//未読管理。trueなら未読管理する
SettingDialog.UnreadManage = _cfgCommon.UnreadManage;
//サウンド再生(タブ別設定より優先)
SettingDialog.PlaySound = _cfgCommon.PlaySound;
PlaySoundMenuItem.Checked = SettingDialog.PlaySound;
this.PlaySoundFileMenuItem.Checked = SettingDialog.PlaySound;
- //片思い表示。trueなら片思い表示する
- SettingDialog.OneWayLove = _cfgCommon.OneWayLove;
//フォント&文字色&背景色
SettingDialog.FontUnread = _fntUnread;
SettingDialog.ColorUnread = _clUnread;
SettingDialog.FontInputFont = _fntInputFont;
SettingDialog.NameBalloon = _cfgCommon.NameBalloon;
- SettingDialog.PostCtrlEnter = _cfgCommon.PostCtrlEnter;
- SettingDialog.PostShiftEnter = _cfgCommon.PostShiftEnter;
SettingDialog.CountApi = _cfgCommon.CountApi;
SettingDialog.CountApiReply = _cfgCommon.CountApiReply;
SettingDialog.BrowserPath = _cfgLocal.BrowserPath;
SettingDialog.PostAndGet = _cfgCommon.PostAndGet;
- SettingDialog.UseRecommendStatus = _cfgLocal.UseRecommendStatus;
SettingDialog.DispUsername = _cfgCommon.DispUsername;
SettingDialog.CloseToExit = _cfgCommon.CloseToExit;
SettingDialog.MinimizeToTray = _cfgCommon.MinimizeToTray;
SettingDialog.DispLatestPost = _cfgCommon.DispLatestPost;
- SettingDialog.SortOrderLock = _cfgCommon.SortOrderLock;
- SettingDialog.ViewTabBottom = _cfgCommon.ViewTabBottom;
SettingDialog.TinyUrlResolve = _cfgCommon.TinyUrlResolve;
SettingDialog.SelectedProxyType = _cfgLocal.ProxyType;
SettingDialog.ProxyUser = _cfgLocal.ProxyUser;
SettingDialog.ProxyPassword = _cfgLocal.ProxyPassword;
- SettingDialog.StartupVersion = _cfgCommon.StartupVersion;
- SettingDialog.StartupFollowers = _cfgCommon.StartupFollowers;
SettingDialog.RestrictFavCheck = _cfgCommon.RestrictFavCheck;
SettingDialog.AlwaysTop = _cfgCommon.AlwaysTop;
SettingDialog.UrlConvertAuto = false;
//SettingDialog.UrlConvertAuto = _cfgCommon.UrlConvertAuto;
- SettingDialog.UseUnreadStyle = _cfgCommon.UseUnreadStyle;
SettingDialog.DefaultTimeOut = _cfgCommon.DefaultTimeOut;
- SettingDialog.RetweetNoConfirm = _cfgCommon.RetweetNoConfirm;
SettingDialog.PlaySound = _cfgCommon.PlaySound;
- SettingDialog.DateTimeFormat = _cfgCommon.DateTimeFormat;
SettingDialog.LimitBalloon = _cfgCommon.LimitBalloon;
SettingDialog.EventNotifyEnabled = _cfgCommon.EventNotifyEnabled;
SettingDialog.EventNotifyFlag = _cfgCommon.EventNotifyFlag;
SettingDialog.TabIconDisp = _cfgCommon.TabIconDisp;
SettingDialog.ReplyIconState = _cfgCommon.ReplyIconState;
SettingDialog.ReadOwnPost = _cfgCommon.ReadOwnPost;
- SettingDialog.GetFav = _cfgCommon.GetFav;
SettingDialog.ReadOldPosts = _cfgCommon.ReadOldPosts;
SettingDialog.BitlyUser = _cfgCommon.BilyUser;
SettingDialog.BitlyPwd = _cfgCommon.BitlyPwd;
- SettingDialog.ShowGrid = _cfgCommon.ShowGrid;
SettingDialog.Language = _cfgCommon.Language;
- SettingDialog.UseAtIdSupplement = _cfgCommon.UseAtIdSupplement;
- SettingDialog.UseHashSupplement = _cfgCommon.UseHashSupplement;
SettingDialog.PreviewEnable = _cfgCommon.PreviewEnable;
SettingDialog.StatusAreaAtBottom = _cfgCommon.StatusAreaAtBottom;
AtIdSupl = new AtIdSupplement(SettingAtIdList.Load().AtIdList, "@");
//Regex statregex = new Regex("^0*");
SettingDialog.RecommendStatusText = " [TWNv" + Regex.Replace(MyCommon.FileVersion.Replace(".", ""), "^0*", "") + "]";
- //書式指定文字列エラーチェック
- try
- {
- if (DateTime.Now.ToString(SettingDialog.DateTimeFormat).Length == 0)
- {
- // このブロックは絶対に実行されないはず
- // 変換が成功した場合にLengthが0にならない
- SettingDialog.DateTimeFormat = "yyyy/MM/dd H:mm:ss";
- }
- }
- catch (FormatException)
- {
- // FormatExceptionが発生したら初期値を設定 (=yyyy/MM/dd H:mm:ssとみなされる)
- SettingDialog.DateTimeFormat = "yyyy/MM/dd H:mm:ss";
- }
-
SettingDialog.Nicoms = _cfgCommon.Nicoms;
SettingDialog.HotkeyEnabled = _cfgCommon.HotkeyEnabled;
SettingDialog.HotkeyMod = _cfgCommon.HotkeyModifier;
SettingDialog.UserTimelineCountApi = _cfgCommon.UserTimelineCountApi;
SettingDialog.ListCountApi = _cfgCommon.ListCountApi;
- SettingDialog.UserstreamStartup = _cfgCommon.UserstreamStartup;
- SettingDialog.UserstreamPeriodInt = _cfgCommon.UserstreamPeriod;
SettingDialog.OpenUserTimeline = _cfgCommon.OpenUserTimeline;
SettingDialog.ListDoubleClickAction = _cfgCommon.ListDoubleClickAction;
SettingDialog.UserAppointUrl = _cfgCommon.UserAppointUrl;
- SettingDialog.HideDuplicatedRetweets = _cfgCommon.HideDuplicatedRetweets;
SettingDialog.EnableImgAzyobuziNet = _cfgCommon.EnableImgAzyobuziNet;
SettingDialog.ImgAzyobuziNetDisabledInDM = _cfgCommon.ImgAzyobuziNetDisabledInDM;
SettingDialog.MapThumbnailHeight = _cfgCommon.MapThumbnailHeight;
SettingDialog.MapThumbnailWidth = _cfgCommon.MapThumbnailWidth;
SettingDialog.MapThumbnailZoom = _cfgCommon.MapThumbnailZoom;
- SettingDialog.IsListStatusesIncludeRts = _cfgCommon.IsListsIncludeRts;
SettingDialog.TabMouseLock = _cfgCommon.TabMouseLock;
SettingDialog.IsRemoveSameEvent = _cfgCommon.IsRemoveSameEvent;
SettingDialog.IsNotifyUseGrowl = _cfgCommon.IsUseNotifyGrowl;
_statuses.SortMode = mode;
////////////////////////////////////////////////////////////////////////////////
- ApplyListViewIconSize(SettingDialog.IconSz);
-
- tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
+ ApplyListViewIconSize(this._cfgCommon.IconSize);
StatusLabel.Text = Properties.Resources.Form1_LoadText1; //画面右下の状態表示を変更
StatusLabelUrl.Text = ""; //画面左下のリンク先URL表示部を初期化
{
tab.TabType = MyCommon.TabUsageType.UserDefined;
}
- if (!AddNewTab(tab.TabName, true, tab.TabType, tab.ListInfo)) throw new Exception(Properties.Resources.TweenMain_LoadText1);
+ if (!AddNewTab(tab.TabName, true, tab.TabType, tab.ListInfo))
+ throw new TabException(Properties.Resources.TweenMain_LoadText1);
}
this.JumpReadOpMenuItem.ShortcutKeyDisplayString = "Space";
private void LoadConfig()
{
_cfgCommon = SettingCommon.Load();
+ SettingCommon.Instance = this._cfgCommon;
if (_cfgCommon.UserAccounts == null || _cfgCommon.UserAccounts.Count == 0)
{
_cfgCommon.UserAccounts = new List<UserAccount>();
}
}
- private void TimerInterval_Changed(object sender, AppendSettingDialog.IntervalChangedEventArgs e) //Handles SettingDialog.IntervalChanged
+ private void TimerInterval_Changed(object sender, IntervalChangedEventArgs e) //Handles SettingDialog.IntervalChanged
{
if (!TimerTimeline.Enabled) return;
ResetTimers = e;
}
- private AppendSettingDialog.IntervalChangedEventArgs ResetTimers = new AppendSettingDialog.IntervalChangedEventArgs();
+ private IntervalChangedEventArgs ResetTimers = new IntervalChangedEventArgs();
private static int homeCounter = 0;
private static int mentionCounter = 0;
Interlocked.Increment(ref refreshFollowers);
////タイマー初期化
- if (ResetTimers.Timeline || homeCounter <= 0 && SettingDialog.TimelinePeriodInt > 0)
+ if (ResetTimers.Timeline || homeCounter <= 0 && this._cfgCommon.TimelinePeriod > 0)
{
- Interlocked.Exchange(ref homeCounter, SettingDialog.TimelinePeriodInt);
- if (!tw.IsUserstreamDataReceived && !ResetTimers.Timeline) GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+ Interlocked.Exchange(ref homeCounter, this._cfgCommon.TimelinePeriod);
+ if (!tw.IsUserstreamDataReceived && !ResetTimers.Timeline) GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
ResetTimers.Timeline = false;
}
- if (ResetTimers.Reply || mentionCounter <= 0 && SettingDialog.ReplyPeriodInt > 0)
+ if (ResetTimers.Reply || mentionCounter <= 0 && this._cfgCommon.ReplyPeriod > 0)
{
- Interlocked.Exchange(ref mentionCounter, SettingDialog.ReplyPeriodInt);
- if (!tw.IsUserstreamDataReceived && !ResetTimers.Reply) GetTimeline(MyCommon.WORKERTYPE.Reply, 1, 0, "");
+ Interlocked.Exchange(ref mentionCounter, this._cfgCommon.ReplyPeriod);
+ if (!tw.IsUserstreamDataReceived && !ResetTimers.Reply) GetTimeline(MyCommon.WORKERTYPE.Reply, 1, "");
ResetTimers.Reply = false;
}
- if (ResetTimers.DirectMessage || dmCounter <= 0 && SettingDialog.DMPeriodInt > 0)
+ if (ResetTimers.DirectMessage || dmCounter <= 0 && this._cfgCommon.DMPeriod > 0)
{
- Interlocked.Exchange(ref dmCounter, SettingDialog.DMPeriodInt);
- if (!tw.IsUserstreamDataReceived && !ResetTimers.DirectMessage) GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
+ Interlocked.Exchange(ref dmCounter, this._cfgCommon.DMPeriod);
+ if (!tw.IsUserstreamDataReceived && !ResetTimers.DirectMessage) GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
ResetTimers.DirectMessage = false;
}
- if (ResetTimers.PublicSearch || pubSearchCounter <= 0 && SettingDialog.PubSearchPeriodInt > 0)
+ if (ResetTimers.PublicSearch || pubSearchCounter <= 0 && this._cfgCommon.PubSearchPeriod > 0)
{
- Interlocked.Exchange(ref pubSearchCounter, SettingDialog.PubSearchPeriodInt);
- if (!ResetTimers.PublicSearch) GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, "");
+ Interlocked.Exchange(ref pubSearchCounter, this._cfgCommon.PubSearchPeriod);
+ if (!ResetTimers.PublicSearch) GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, "");
ResetTimers.PublicSearch = false;
}
- if (ResetTimers.UserTimeline || userTimelineCounter <= 0 && SettingDialog.UserTimelinePeriodInt > 0)
+ if (ResetTimers.UserTimeline || userTimelineCounter <= 0 && this._cfgCommon.UserTimelinePeriod > 0)
{
- Interlocked.Exchange(ref userTimelineCounter, SettingDialog.UserTimelinePeriodInt);
- if (!ResetTimers.UserTimeline) GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, 0, "");
+ Interlocked.Exchange(ref userTimelineCounter, this._cfgCommon.UserTimelinePeriod);
+ if (!ResetTimers.UserTimeline) GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, "");
ResetTimers.UserTimeline = false;
}
- if (ResetTimers.Lists || listsCounter <= 0 && SettingDialog.ListsPeriodInt > 0)
+ if (ResetTimers.Lists || listsCounter <= 0 && this._cfgCommon.ListsPeriod > 0)
{
- Interlocked.Exchange(ref listsCounter, SettingDialog.ListsPeriodInt);
- if (!ResetTimers.Lists) GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, "");
+ Interlocked.Exchange(ref listsCounter, this._cfgCommon.ListsPeriod);
+ if (!ResetTimers.Lists) GetTimeline(MyCommon.WORKERTYPE.List, 1, "");
ResetTimers.Lists = false;
}
- if (ResetTimers.UserStream || usCounter <= 0 && SettingDialog.UserstreamPeriodInt > 0)
+ if (ResetTimers.UserStream || usCounter <= 0 && this._cfgCommon.UserstreamPeriod > 0)
{
- Interlocked.Exchange(ref usCounter, SettingDialog.UserstreamPeriodInt);
+ Interlocked.Exchange(ref usCounter, this._cfgCommon.UserstreamPeriod);
if (this._isActiveUserstream) RefreshTimeline(true);
ResetTimers.UserStream = false;
}
{
Interlocked.Exchange(ref refreshFollowers, 0);
doGetFollowersMenu();
- GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
}
if (osResumed)
{
{
osResumed = false;
Interlocked.Exchange(ref ResumeWait, 0);
- GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.Reply, 1, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.List, 1, "");
doGetFollowersMenu();
- GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
}
}
}
cl = _clFav;
else if (Post.RetweetedId != null)
cl = _clRetweet;
- else if (Post.IsOwl && (Post.IsDm || SettingDialog.OneWayLove))
+ else if (Post.IsOwl && (Post.IsDm || this._cfgCommon.OneWayLove))
cl = _clOWL;
- else if (Read || !SettingDialog.UseUnreadStyle)
+ else if (Read || !this._cfgCommon.UseUnreadStyle)
cl = _clReaded;
else
cl = _clUnread;
if (DList == null || Item.Index == -1)
{
Item.ForeColor = cl;
- if (SettingDialog.UseUnreadStyle)
+ if (this._cfgCommon.UseUnreadStyle)
Item.Font = fnt;
}
else
{
DList.Update();
- if (SettingDialog.UseUnreadStyle)
+ if (this._cfgCommon.UseUnreadStyle)
DList.ChangeItemFontAndColor(Item.Index, cl, fnt);
else
DList.ChangeItemForeColor(Item.Index, cl);
StatusText.SelectionStart = StatusText.Text.Length;
GetWorkerArg args = new GetWorkerArg();
args.page = 0;
- args.endPage = 0;
args.type = MyCommon.WORKERTYPE.PostMessage;
CheckReplyTo(StatusText.Text);
bool isCutOff = false;
bool isRemoveFooter = MyCommon.IsKeyDown(Keys.Shift);
- if (StatusText.Multiline && !SettingDialog.PostCtrlEnter)
+ if (StatusText.Multiline && !this._cfgCommon.PostCtrlEnter)
{
//複数行でEnter投稿の場合、Ctrlも押されていたらフッタ付加しない
isRemoveFooter = MyCommon.IsKeyDown(Keys.Control);
}
- if (SettingDialog.PostShiftEnter)
+ if (this._cfgCommon.PostShiftEnter)
{
isRemoveFooter = MyCommon.IsKeyDown(Keys.Control);
}
}
if (!isRemoveFooter)
{
- if (SettingDialog.UseRecommendStatus)
+ if (this._cfgLocal.UseRecommendStatus)
// 推奨ステータスを使用する
footer += SettingDialog.RecommendStatusText;
else
// テキストボックスに入力されている文字列を使用する
- footer += " " + SettingDialog.Status.Trim();
+ footer += " " + this._cfgLocal.StatusText.Trim();
}
}
args.status.status = header + StatusText.Text + footer;
GetWorkerResult rslt = new GetWorkerResult();
bool read = !SettingDialog.UnreadManage;
- if (_initial && SettingDialog.UnreadManage) read = SettingDialog.Readed;
+ if (_initial && SettingDialog.UnreadManage) read = this._cfgCommon.Read;
GetWorkerArg args = (GetWorkerArg)e.Argument;
rslt.retMsg = ret;
rslt.type = args.type;
rslt.tName = args.tName;
- if (args.type == MyCommon.WORKERTYPE.DirectMessegeRcv ||
- args.type == MyCommon.WORKERTYPE.DirectMessegeSnt ||
- args.type == MyCommon.WORKERTYPE.Reply ||
- args.type == MyCommon.WORKERTYPE.Timeline ||
- args.type == MyCommon.WORKERTYPE.Favorites)
- {
- rslt.page = args.page - 1; //値が正しいか後でチェック。10ページ毎の継続確認
- }
e.Result = rslt;
}
_waitReply = false;
if (rslt.newDM && !_initial)
{
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
}
break;
case MyCommon.WORKERTYPE.Favorites:
{
GetWorkerArg args = new GetWorkerArg();
args.page = 0;
- args.endPage = 0;
args.type = MyCommon.WORKERTYPE.PostMessage;
args.status = rslt.status;
RunAsync(args);
}
}
}
- if (rslt.retMsg.Length == 0 && SettingDialog.PostAndGet)
+ if (rslt.retMsg.Length == 0 && this._cfgCommon.PostAndGet)
{
if (_isActiveUserstream)
{
}
else
{
- GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
}
}
break;
_postTimestamps.RemoveAt(i);
}
}
- if (!_isActiveUserstream && SettingDialog.PostAndGet) GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+ if (!_isActiveUserstream && this._cfgCommon.PostAndGet) GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
}
break;
case MyCommon.WORKERTYPE.Follower:
private static Dictionary<MyCommon.WORKERTYPE, DateTime> lastTime = new Dictionary<MyCommon.WORKERTYPE, DateTime>();
- private void GetTimeline(MyCommon.WORKERTYPE WkType, int fromPage, int toPage, string tabName)
+ private void GetTimeline(MyCommon.WORKERTYPE WkType, int fromPage, string tabName)
{
if (!this.IsNetworkAvailable()) return;
//非同期実行引数設定
GetWorkerArg args = new GetWorkerArg();
args.page = fromPage;
- args.endPage = toPage;
args.type = WkType;
args.tName = tabName;
private void MyList_ColumnClick(object sender, ColumnClickEventArgs e)
{
- if (SettingDialog.SortOrderLock) return;
+ if (this._cfgCommon.SortOrderLock) return;
IdComparerClass.ComparerMode mode = IdComparerClass.ComparerMode.Id;
if (_iconCol)
{
switch (_statuses.Tabs[_curTab.Text].TabType)
{
case MyCommon.TabUsageType.Mentions:
- GetTimeline(MyCommon.WORKERTYPE.Reply, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, 1, "");
break;
case MyCommon.TabUsageType.DirectMessage:
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
break;
case MyCommon.TabUsageType.Favorites:
- GetTimeline(MyCommon.WORKERTYPE.Favorites, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Favorites, 1, "");
break;
//case MyCommon.TabUsageType.Profile:
//// TODO
//// TODO
TabClass tb = _statuses.Tabs[_curTab.Text];
if (string.IsNullOrEmpty(tb.SearchWords)) return;
- GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, _curTab.Text);
break;
case MyCommon.TabUsageType.UserTimeline:
- GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, _curTab.Text);
break;
case MyCommon.TabUsageType.Lists:
//// TODO
TabClass tab = _statuses.Tabs[_curTab.Text];
if (tab.ListInfo == null || tab.ListInfo.Id == 0) return;
- GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.List, 1, _curTab.Text);
break;
default:
- GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
break;
}
}
else
{
- GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
}
}
switch (_statuses.Tabs[_curTab.Text].TabType)
{
case MyCommon.TabUsageType.Mentions:
- GetTimeline(MyCommon.WORKERTYPE.Reply, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, -1, "");
break;
case MyCommon.TabUsageType.DirectMessage:
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, -1, "");
break;
case MyCommon.TabUsageType.Favorites:
- GetTimeline(MyCommon.WORKERTYPE.Favorites, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Favorites, -1, "");
break;
case MyCommon.TabUsageType.Profile:
//// TODO
// TODO
TabClass tb = _statuses.Tabs[_curTab.Text];
if (string.IsNullOrEmpty(tb.SearchWords)) return;
- GetTimeline(MyCommon.WORKERTYPE.PublicSearch, -1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.PublicSearch, -1, _curTab.Text);
break;
case MyCommon.TabUsageType.UserTimeline:
- GetTimeline(MyCommon.WORKERTYPE.UserTimeline, -1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.UserTimeline, -1, _curTab.Text);
break;
case MyCommon.TabUsageType.Lists:
//// TODO
TabClass tab = _statuses.Tabs[_curTab.Text];
if (tab.ListInfo == null || tab.ListInfo.Id == 0) return;
- GetTimeline(MyCommon.WORKERTYPE.List, -1, 0, _curTab.Text);
+ GetTimeline(MyCommon.WORKERTYPE.List, -1, _curTab.Text);
break;
default:
- GetTimeline(MyCommon.WORKERTYPE.Timeline, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, -1, "");
break;
}
}
else
{
- GetTimeline(MyCommon.WORKERTYPE.Timeline, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, -1, "");
}
}
{
DialogResult result;
string uid = tw.Username.ToLower();
- var oldIconSz = SettingDialog.IconSz;
try
{
{
lock (_syncObject)
{
- tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
+ var oldIconSz = this._cfgCommon.IconSize;
+
+ this.SettingDialog.SaveConfig(this._cfgCommon, this._cfgLocal);
+
tw.RestrictFavCheck = SettingDialog.RestrictFavCheck;
tw.ReadOwnPost = SettingDialog.ReadOwnPost;
ShortUrl.Instance.DisableExpanding = !SettingDialog.TinyUrlResolve;
{
var oldIconCol = _iconCol;
- if (SettingDialog.IconSz != oldIconSz)
- ApplyListViewIconSize(SettingDialog.IconSz);
+ if (this._cfgCommon.IconSize != oldIconSz)
+ ApplyListViewIconSize(this._cfgCommon.IconSize);
foreach (TabPage tp in ListTab.TabPages)
{
using (ControlTransaction.Update(lst))
{
- lst.GridLines = SettingDialog.ShowGrid;
+ lst.GridLines = this._cfgCommon.ShowGrid;
lst.Font = _fntReaded;
lst.BackColor = _clListBackcolor;
/// </summary>
private void SetTabAlignment()
{
- var newAlignment = SettingDialog.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top;
+ var newAlignment = this._cfgCommon.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top;
if (ListTab.Alignment == newAlignment) return;
//現在の選択状態を退避
SaveConfigsTabs();
//検索実行
- GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, 0, tabName);
+ GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, tabName);
}
public bool AddNewTab(string tabName, bool startup, MyCommon.TabUsageType tabType, ListElement listInfo = null)
_listCustom.Font = _fntReaded;
_listCustom.BackColor = _clListBackcolor;
- _listCustom.GridLines = SettingDialog.ShowGrid;
+ _listCustom.GridLines = this._cfgCommon.ShowGrid;
_listCustom.AllowDrop = true;
_listCustom.SmallImageList = _listViewImageList;
{
if (e.KeyChar == '@')
{
- if (!SettingDialog.UseAtIdSupplement) return;
+ if (!this._cfgCommon.UseAtIdSupplement) return;
//@マーク
int cnt = AtIdSupl.ItemCount;
ShowSuplDialog(StatusText, AtIdSupl);
}
else if (e.KeyChar == '#')
{
- if (!SettingDialog.UseHashSupplement) return;
+ if (!this._cfgCommon.UseHashSupplement) return;
ShowSuplDialog(StatusText, HashSupl);
e.Handled = true;
}
int pLen = 140 - statusText.Length;
if (this.NotifyIcon1 == null || !this.NotifyIcon1.Visible) return pLen;
- if ((isAuto && !MyCommon.IsKeyDown(Keys.Control) && SettingDialog.PostShiftEnter) ||
- (isAuto && !MyCommon.IsKeyDown(Keys.Shift) && !SettingDialog.PostShiftEnter) ||
+ if ((isAuto && !MyCommon.IsKeyDown(Keys.Control) && this._cfgCommon.PostShiftEnter) ||
+ (isAuto && !MyCommon.IsKeyDown(Keys.Shift) && !this._cfgCommon.PostShiftEnter) ||
(!isAuto && isAddFooter))
{
- if (SettingDialog.UseRecommendStatus)
+ if (this._cfgLocal.UseRecommendStatus)
pLen -= SettingDialog.RecommendStatusText.Length;
- else if (SettingDialog.Status.Length > 0)
- pLen -= SettingDialog.Status.Length + 1;
+ else if (this._cfgLocal.StatusText.Length > 0)
+ pLen -= this._cfgLocal.StatusText.Length + 1;
}
if (!string.IsNullOrEmpty(HashMgr.UseHash))
{
string[] sitem= {"",
Post.Nickname,
Post.IsDeleted ? "(DELETED)" : Post.TextSingleLine,
- Post.CreatedAt.ToString(SettingDialog.DateTimeFormat),
+ Post.CreatedAt.ToString(this._cfgCommon.DateTimeFormat),
Post.ScreenName,
"",
mk.ToString(),
string[] sitem = {"",
Post.Nickname,
Post.IsDeleted ? "(DELETED)" : Post.TextSingleLine,
- Post.CreatedAt.ToString(SettingDialog.DateTimeFormat),
+ Post.CreatedAt.ToString(this._cfgCommon.DateTimeFormat),
Post.ScreenName + Environment.NewLine + "(RT:" + Post.RetweetedBy + ")",
"",
mk.ToString(),
NameLabel.Tag = _curPost.ScreenName;
var nameForeColor = SystemColors.ControlText;
- if (_curPost.IsOwl && (this.SettingDialog.OneWayLove || _curPost.IsDm))
+ if (_curPost.IsOwl && (this._cfgCommon.OneWayLove || _curPost.IsDm))
nameForeColor = this._clOWL;
if (_curPost.RetweetedId != null)
nameForeColor = this._clRetweet;
DoRefresh();
return true;
case Keys.F6:
- GetTimeline(MyCommon.WORKERTYPE.Reply, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, 1, "");
return true;
case Keys.F7:
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
return true;
}
if (Focused != FocusedControl.StatusText)
DoRefreshMore();
return true;
case Keys.F6:
- GetTimeline(MyCommon.WORKERTYPE.Reply, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, -1, "");
return true;
case Keys.F7:
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, -1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, -1, "");
return true;
}
//フォーカスStatusText以外
private void SaveConfigsAtId()
{
- if (_ignoreConfigSave || !SettingDialog.UseAtIdSupplement && AtIdSupl == null) return;
+ if (_ignoreConfigSave || !this._cfgCommon.UseAtIdSupplement && AtIdSupl == null) return;
_modifySettingAtId = false;
SettingAtIdList cfgAtId = new SettingAtIdList(AtIdSupl.GetItemList());
_cfgCommon.Token = tw.AccessToken;
_cfgCommon.TokenSecret = tw.AccessTokenSecret;
_cfgCommon.UserAccounts = SettingDialog.UserAccounts;
- _cfgCommon.UserstreamStartup = SettingDialog.UserstreamStartup;
- _cfgCommon.UserstreamPeriod = SettingDialog.UserstreamPeriodInt;
- _cfgCommon.TimelinePeriod = SettingDialog.TimelinePeriodInt;
- _cfgCommon.ReplyPeriod = SettingDialog.ReplyPeriodInt;
- _cfgCommon.DMPeriod = SettingDialog.DMPeriodInt;
- _cfgCommon.PubSearchPeriod = SettingDialog.PubSearchPeriodInt;
- _cfgCommon.ListsPeriod = SettingDialog.ListsPeriodInt;
- _cfgCommon.UserTimelinePeriod = SettingDialog.UserTimelinePeriodInt;
- _cfgCommon.Read = SettingDialog.Readed;
- _cfgCommon.IconSize = SettingDialog.IconSz;
_cfgCommon.UnreadManage = SettingDialog.UnreadManage;
_cfgCommon.PlaySound = SettingDialog.PlaySound;
- _cfgCommon.OneWayLove = SettingDialog.OneWayLove;
_cfgCommon.NameBalloon = SettingDialog.NameBalloon;
- _cfgCommon.PostCtrlEnter = SettingDialog.PostCtrlEnter;
- _cfgCommon.PostShiftEnter = SettingDialog.PostShiftEnter;
_cfgCommon.CountApi = SettingDialog.CountApi;
_cfgCommon.CountApiReply = SettingDialog.CountApiReply;
- _cfgCommon.PostAndGet = SettingDialog.PostAndGet;
_cfgCommon.DispUsername = SettingDialog.DispUsername;
_cfgCommon.MinimizeToTray = SettingDialog.MinimizeToTray;
_cfgCommon.CloseToExit = SettingDialog.CloseToExit;
_cfgCommon.DispLatestPost = SettingDialog.DispLatestPost;
- _cfgCommon.SortOrderLock = SettingDialog.SortOrderLock;
- _cfgCommon.ViewTabBottom = SettingDialog.ViewTabBottom;
_cfgCommon.TinyUrlResolve = SettingDialog.TinyUrlResolve;
- _cfgCommon.StartupVersion = SettingDialog.StartupVersion;
- _cfgCommon.StartupFollowers = SettingDialog.StartupFollowers;
_cfgCommon.RestrictFavCheck = SettingDialog.RestrictFavCheck;
_cfgCommon.AlwaysTop = SettingDialog.AlwaysTop;
_cfgCommon.UrlConvertAuto = SettingDialog.UrlConvertAuto;
- _cfgCommon.UseUnreadStyle = SettingDialog.UseUnreadStyle;
- _cfgCommon.DateTimeFormat = SettingDialog.DateTimeFormat;
_cfgCommon.DefaultTimeOut = SettingDialog.DefaultTimeOut;
- _cfgCommon.RetweetNoConfirm = SettingDialog.RetweetNoConfirm;
_cfgCommon.LimitBalloon = SettingDialog.LimitBalloon;
_cfgCommon.EventNotifyEnabled = SettingDialog.EventNotifyEnabled;
_cfgCommon.EventNotifyFlag = SettingDialog.EventNotifyFlag;
_cfgCommon.TabIconDisp = SettingDialog.TabIconDisp;
_cfgCommon.ReplyIconState = SettingDialog.ReplyIconState;
_cfgCommon.ReadOwnPost = SettingDialog.ReadOwnPost;
- _cfgCommon.GetFav = SettingDialog.GetFav;
_cfgCommon.IsMonospace = SettingDialog.IsMonospace;
if (IdeographicSpaceToSpaceToolStripMenuItem != null &&
IdeographicSpaceToSpaceToolStripMenuItem.IsDisposed == false)
_cfgCommon.ReadOldPosts = SettingDialog.ReadOldPosts;
_cfgCommon.BilyUser = SettingDialog.BitlyUser;
_cfgCommon.BitlyPwd = SettingDialog.BitlyPwd;
- _cfgCommon.ShowGrid = SettingDialog.ShowGrid;
- _cfgCommon.UseAtIdSupplement = SettingDialog.UseAtIdSupplement;
- _cfgCommon.UseHashSupplement = SettingDialog.UseHashSupplement;
_cfgCommon.PreviewEnable = SettingDialog.PreviewEnable;
_cfgCommon.StatusAreaAtBottom = SettingDialog.StatusAreaAtBottom;
_cfgCommon.Language = SettingDialog.Language;
_cfgCommon.UseImageServiceName = ImageSelector.ServiceName;
_cfgCommon.ListDoubleClickAction = SettingDialog.ListDoubleClickAction;
_cfgCommon.UserAppointUrl = SettingDialog.UserAppointUrl;
- _cfgCommon.HideDuplicatedRetweets = SettingDialog.HideDuplicatedRetweets;
_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.IsListsIncludeRts = SettingDialog.IsListStatusesIncludeRts;
_cfgCommon.TabMouseLock = SettingDialog.TabMouseLock;
_cfgCommon.IsRemoveSameEvent = SettingDialog.IsRemoveSameEvent;
_cfgCommon.IsUseNotifyGrowl = SettingDialog.IsNotifyUseGrowl;
_cfgLocal.PreviewDistance = _mySpDis3;
_cfgLocal.StatusMultiline = StatusText.Multiline;
_cfgLocal.StatusTextHeight = _mySpDis2;
- _cfgLocal.StatusText = SettingDialog.Status;
_cfgLocal.FontUnread = _fntUnread;
_cfgLocal.ColorUnread = _clUnread;
_cfgLocal.FontInputFont = _fntInputFont;
_cfgLocal.BrowserPath = SettingDialog.BrowserPath;
- _cfgLocal.UseRecommendStatus = SettingDialog.UseRecommendStatus;
_cfgLocal.ProxyType = SettingDialog.SelectedProxyType;
_cfgLocal.ProxyAddress = SettingDialog.ProxyAddress;
_cfgLocal.ProxyPort = SettingDialog.ProxyPort;
{
ListTab.SelectedIndex = ListTab.TabPages.Count - 1;
ListTabSelect(ListTab.TabPages[ListTab.TabPages.Count - 1]);
- GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, tabName);
+ GetTimeline(MyCommon.WORKERTYPE.List, 1, tabName);
}
}
}
bool _NewLine = false;
bool _Post = false;
- if (SettingDialog.PostCtrlEnter) //Ctrl+Enter投稿時
+ if (this._cfgCommon.PostCtrlEnter) //Ctrl+Enter投稿時
{
if (StatusText.Multiline)
{
}
}
- else if (SettingDialog.PostShiftEnter) //SHift+Enter投稿時
+ else if (this._cfgCommon.PostShiftEnter) //SHift+Enter投稿時
{
if (StatusText.Multiline)
{
UnreadAtCounter = urat;
slbl.AppendFormat(Properties.Resources.SetStatusLabelText1, tur, tal, ur, al, urat, _postTimestamps.Count, _favTimestamps.Count, _tlCount);
- if (SettingDialog.TimelinePeriodInt == 0)
+ if (this._cfgCommon.TimelinePeriod == 0)
{
slbl.Append(Properties.Resources.SetStatusLabelText2);
}
else
{
- slbl.Append(SettingDialog.TimelinePeriodInt.ToString() + Properties.Resources.SetStatusLabelText3);
+ slbl.Append(this._cfgCommon.TimelinePeriod + Properties.Resources.SetStatusLabelText3);
}
return slbl.ToString();
}
// 本当にリプライ先指定すべきかどうかの判定
m = Regex.Matches(StatusText, "(^|[ -/:-@[-^`{-~])(?<id>@[a-zA-Z0-9_]+)");
- if (SettingDialog.UseAtIdSupplement)
+ if (this._cfgCommon.UseAtIdSupplement)
{
int bCnt = AtIdSupl.ItemCount;
foreach (Match mid in m)
MenuItemUserStream.Enabled = true;
StopToolStripMenuItem.Text = "&Start";
StopToolStripMenuItem.Enabled = true;
- if (SettingDialog.UserstreamStartup) tw.StartUserStream();
+ if (this._cfgCommon.UserstreamStartup) tw.StartUserStream();
}
private async void TweenMain_Shown(object sender, EventArgs e)
if (this.IsNetworkAvailable())
{
this.RefreshMuteUserIdsAsync();
- GetTimeline(MyCommon.WORKERTYPE.BlockIds, 0, 0, "");
- GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, 0, "");
- if (SettingDialog.StartupFollowers)
+ GetTimeline(MyCommon.WORKERTYPE.BlockIds, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, "");
+ if (this._cfgCommon.StartupFollowers)
{
- GetTimeline(MyCommon.WORKERTYPE.Follower, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Follower, 0, "");
}
- GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
StartUserStream();
_waitTimeline = true;
- GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
_waitReply = true;
- GetTimeline(MyCommon.WORKERTYPE.Reply, 1, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.Reply, 1, "");
_waitDm = true;
- GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 1, "");
- if (SettingDialog.GetFav)
+ GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
+ if (this._cfgCommon.GetFav)
{
_waitFav = true;
- GetTimeline(MyCommon.WORKERTYPE.Favorites, 1, 1, "");
+ GetTimeline(MyCommon.WORKERTYPE.Favorites, 1, "");
}
_waitPubSearch = true;
- GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, ""); //tabname="":全タブ
+ GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, ""); //tabname="":全タブ
_waitUserTimeline = true;
- GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, 0, ""); //tabname="":全タブ
+ GetTimeline(MyCommon.WORKERTYPE.UserTimeline, 1, ""); //tabname="":全タブ
_waitLists = true;
- GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, ""); //tabname="":全タブ
+ GetTimeline(MyCommon.WORKERTYPE.List, 1, ""); //tabname="":全タブ
var i = 0;
while (this.IsInitialRead())
if (ApplicationSettings.VersionInfoUrl != null)
{
//バージョンチェック(引数:起動時チェックの場合はtrue・・・チェック結果のメッセージを表示しない)
- if (SettingDialog.StartupVersion)
+ if (this._cfgCommon.StartupVersion)
await this.CheckNewVersion(true);
}
else
}
// 取得失敗の場合は再試行する
- if (!tw.GetFollowersSuccess && SettingDialog.StartupFollowers)
- GetTimeline(MyCommon.WORKERTYPE.Follower, 0, 0, "");
+ if (!tw.GetFollowersSuccess && this._cfgCommon.StartupFollowers)
+ GetTimeline(MyCommon.WORKERTYPE.Follower, 0, "");
// 取得失敗の場合は再試行する
if (!tw.GetNoRetweetSuccess)
- GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, "");
// 取得失敗の場合は再試行する
if (SettingDialog.TwitterConfiguration.PhotoSizeLimit == 0)
- GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
// 権限チェック read/write権限(xAuthで取得したトークン)の場合は再認証を促す
if (MyCommon.TwitterApiInfo.AccessLevel == TwitterApiAccessLevel.ReadWrite)
private void doGetFollowersMenu()
{
- GetTimeline(MyCommon.WORKERTYPE.Follower, 1, 0, "");
+ GetTimeline(MyCommon.WORKERTYPE.Follower, 1, "");
DispSelectedPost(true);
}
_DoFavRetweetFlags = false;
return;
}
- if (!SettingDialog.RetweetNoConfirm)
+ if (!this._cfgCommon.RetweetNoConfirm)
{
string Questiontext = Properties.Resources.RetweetQuestion1;
if (_DoFavRetweetFlags) Questiontext = Properties.Resources.FavoritesRetweetQuestionText2;
public string id = "";
public bool isFollowing = false;
public bool isFollowed = false;
- public bool isError = false;
public FriendshipInfo(string id)
{
this.id = id;
if (!string.IsNullOrEmpty(rt))
{
if (string.IsNullOrEmpty(result)) result = rt;
- fInfo.isError = true;
}
}
e.Result = result;
TabClass tb = _statuses.Tabs[tbName];
ComboBox cmb = (ComboBox)pnl.Controls["comboSearch"];
ComboBox cmbLang = (ComboBox)pnl.Controls["comboLang"];
- ComboBox cmbusline = (ComboBox)pnl.Controls["comboUserline"];
cmb.Text = cmb.Text.Trim();
// 検索式演算子 OR についてのみ大文字しか認識しないので強制的に大文字とする
bool Quote = false;
SaveConfigsTabs(); //検索条件の保存
}
- GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, tbName);
+ GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, tbName);
((DetailsListView)ListTab.SelectedTab.Tag).Focus();
}
private void SelectMedia_DragEnter(DragEventArgs e)
{
- if (ImageSelector.HasUploadableService(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0]))
+ if (ImageSelector.HasUploadableService(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0], true))
{
e.Effect = DragDropEffects.Copy;
return;
}
}
- this.GetTimeline(MyCommon.WORKERTYPE.Related, 1, 1, tabName);
+ this.GetTimeline(MyCommon.WORKERTYPE.Related, 1, tabName);
}
private void CacheInfoMenuItem_Click(object sender, EventArgs e)
//before = Now;
}
- if (SettingDialog.UserstreamPeriodInt > 0) return;
+ if (this._cfgCommon.UserstreamPeriod > 0) return;
try
{
langFrom: null,
langTo: this.SettingDialog.TranslateLanguage);
- this.PostBrowser.DocumentText = translatedText;
+ this.PostBrowser.DocumentText = this.createDetailHtml(translatedText);
}
catch (HttpRequestException e)
{
private void ContextMenuColumnHeader_Opening(object sender, CancelEventArgs e)
{
- this.IconSizeNoneToolStripMenuItem.Checked = SettingDialog.IconSz == MyCommon.IconSizes.IconNone;
- this.IconSize16ToolStripMenuItem.Checked = SettingDialog.IconSz == MyCommon.IconSizes.Icon16;
- this.IconSize24ToolStripMenuItem.Checked = SettingDialog.IconSz == MyCommon.IconSizes.Icon24;
- this.IconSize48ToolStripMenuItem.Checked = SettingDialog.IconSz == MyCommon.IconSizes.Icon48;
- this.IconSize48_2ToolStripMenuItem.Checked = SettingDialog.IconSz == MyCommon.IconSizes.Icon48_2;
+ this.IconSizeNoneToolStripMenuItem.Checked = this._cfgCommon.IconSize == MyCommon.IconSizes.IconNone;
+ this.IconSize16ToolStripMenuItem.Checked = this._cfgCommon.IconSize == MyCommon.IconSizes.Icon16;
+ this.IconSize24ToolStripMenuItem.Checked = this._cfgCommon.IconSize == MyCommon.IconSizes.Icon24;
+ this.IconSize48ToolStripMenuItem.Checked = this._cfgCommon.IconSize == MyCommon.IconSizes.Icon48;
+ this.IconSize48_2ToolStripMenuItem.Checked = this._cfgCommon.IconSize == MyCommon.IconSizes.Icon48_2;
- this.LockListSortOrderToolStripMenuItem.Checked = SettingDialog.SortOrderLock;
+ this.LockListSortOrderToolStripMenuItem.Checked = this._cfgCommon.SortOrderLock;
}
private void IconSizeNoneToolStripMenuItem_Click(object sender, EventArgs e)
private void ChangeListViewIconSize(MyCommon.IconSizes iconSize)
{
- if (SettingDialog.IconSz == iconSize) return;
+ if (this._cfgCommon.IconSize == iconSize) return;
var oldIconCol = _iconCol;
- SettingDialog.IconSz = iconSize;
+ this._cfgCommon.IconSize = iconSize;
ApplyListViewIconSize(iconSize);
if (_iconCol != oldIconCol)
private void LockListSortToolStripMenuItem_Click(object sender, EventArgs e)
{
var state = this.LockListSortOrderToolStripMenuItem.Checked;
- if (SettingDialog.SortOrderLock == state) return;
+ if (this._cfgCommon.SortOrderLock == state) return;
- SettingDialog.SortOrderLock = state;
+ this._cfgCommon.SortOrderLock = state;
_modifySettingCommon = true;
}