OSDN Git Service

TweetActPanelに対する設定値の設定・取得を LoadConfing/SaveConfig メソッドに移動
[opentween/open-tween.git] / OpenTween / Tween.cs
index a30bea1..eebdbc4 100644 (file)
@@ -20,7 +20,7 @@
 // for more details. 
 // 
 // You should have received a copy of the GNU General public License along
-// with this program. if (not, see <http://www.gnu.org/licenses/>, or write to
+// with this program. If not, see <http://www.gnu.org/licenses/>, or write to
 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
 // Boston, MA 02110-1301, USA.
 
@@ -37,13 +37,13 @@ using System.IO;
 using System.Linq;
 using System.Media;
 using System.Net;
+using System.Net.Http;
 using System.Reflection;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-
 using OpenTween.Api;
 using OpenTween.Connection;
 using OpenTween.OpenTweenCustomControl;
@@ -59,7 +59,6 @@ namespace OpenTween
         private int _mySpDis;           //区切り位置
         private int _mySpDis2;          //発言欄区切り位置
         private int _mySpDis3;          //プレビュー区切り位置
-        private int _myAdSpDis;         //Ad区切り位置
         private int _iconSz;            //アイコンサイズ(現在は16、24、48の3種類。将来直接数字指定可能とする 注:24x24の場合に26と指定しているのはMSゴシック系フォントのための仕様)
         private bool _iconCol;          //1列表示の時true(48サイズのとき)
 
@@ -105,7 +104,7 @@ namespace OpenTween
 
         //サブ画面インスタンス
         private AppendSettingDialog SettingDialog = AppendSettingDialog.Instance;       //設定画面インスタンス
-        private SearchWord SearchDialog = new SearchWord();     //検索画面インスタンス
+        private SearchWordDialog SearchDialog = new SearchWordDialog();     //検索画面インスタンス
         private FilterDialog fltDialog = new FilterDialog(); //フィルター編集画面
         private OpenURL UrlDialog = new OpenURL();
         public AtIdSupplement AtIdSupl;     //@id補助
@@ -146,6 +145,8 @@ namespace OpenTween
         private Icon ReplyIcon;               //5g
         private Icon ReplyIconBlink;          //6g
 
+        private ImageList _listViewImageList = new ImageList();    //ListViewItemの高さ変更用
+
         private PostClass _anchorPost;
         private bool _anchorFlag;        //true:関連発言移動中(関連移動以外のオペレーションをするとfalseへ。trueだとリスト背景色をアンカー発言選択中として描画)
 
@@ -198,7 +199,6 @@ namespace OpenTween
         private bool _waitLists = false;
         private BackgroundWorker[] _bw = new BackgroundWorker[20];
         private BackgroundWorker _bwFollower;
-        private InternetSecurityManager SecurityManager;
 
         private int UnreadCounter = -1;
         private int UnreadAtCounter = -1;
@@ -208,7 +208,6 @@ namespace OpenTween
 
         private bool _DoFavRetweetFlags = false;
         private bool osResumed = false;
-        private Dictionary<string, IMultimediaShareService> pictureService;
 
         //////////////////////////////////////////////////////////////////////////////////////////////////////////
         private string _postBrowserStatusText = "";
@@ -254,12 +253,8 @@ namespace OpenTween
         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;
@@ -270,9 +265,7 @@ namespace OpenTween
         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
@@ -293,7 +286,7 @@ namespace OpenTween
             public long? inReplyToId = null;
             public string inReplyToName = null;
             public string imageService = "";      //画像投稿サービス名
-            public string imagePath = "";
+            public string[] imagePath = null;
             public PostingStatus()
             {
             }
@@ -314,53 +307,81 @@ namespace OpenTween
             }
         }
 
-        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();
-            _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)
@@ -605,7 +626,7 @@ namespace OpenTween
             TraceOutToolStripMenuItem.Checked = true;
             MyCommon.TraceFlag = true;
 #endif
-            if (!MyCommon.fileVersion.EndsWith("0"))
+            if (!MyCommon.FileVersion.EndsWith("0"))
             {
                 TraceOutToolStripMenuItem.Checked = true;
                 MyCommon.TraceFlag = true;
@@ -619,7 +640,7 @@ namespace OpenTween
 
             //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;
@@ -630,16 +651,9 @@ namespace OpenTween
 
             Regex.CacheSize = 100;
 
-            MyCommon.fileVersion = ((AssemblyFileVersionAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false)[0]).Version;
             InitializeTraceFrag();
             LoadIcons(); // アイコン読み込み
 
-            ThumbnailGenerator.InitializeGenerator();
-
-            Thumbnail.Services.TonTwitterCom.InitializeOAuthToken = x =>
-                x.Initialize(ApplicationSettings.TwitterConsumerKey, ApplicationSettings.TwitterConsumerSecret,
-                    this.tw.AccessToken, this.tw.AccessTokenSecret, "", "");
-
             //発言保持クラス
             _statuses = TabInformations.GetInstance();
 
@@ -665,6 +679,16 @@ namespace OpenTween
             ////設定読み出し
             LoadConfig();
 
+            ThumbnailGenerator.InitializeGenerator();
+
+            var imgazyobizinet = ThumbnailGenerator.ImgAzyobuziNetInstance;
+            imgazyobizinet.Enabled = this._cfgCommon.EnableImgAzyobuziNet;
+            imgazyobizinet.DisabledInDM = this._cfgCommon.ImgAzyobuziNetDisabledInDM;
+
+            Thumbnail.Services.TonTwitterCom.InitializeOAuthToken = x =>
+                x.Initialize(ApplicationSettings.TwitterConsumerKey, ApplicationSettings.TwitterConsumerSecret,
+                    this.tw.AccessToken, this.tw.AccessTokenSecret, "", "");
+
             //新着バルーン通知のチェック状態設定
             NewPostPopMenuItem.Checked = _cfgCommon.NewAllPop;
             this.NotifyFileMenuItem.Checked = NewPostPopMenuItem.Checked;
@@ -699,15 +723,6 @@ namespace OpenTween
                 this.Font = fontUIGlobal;
             }
 
-            _brsBackColorMine = new SolidBrush(_clSelf);
-            _brsBackColorAt = new SolidBrush(_clAtSelf);
-            _brsBackColorYou = new SolidBrush(_clTarget);
-            _brsBackColorAtYou = new SolidBrush(_clAtTarget);
-            _brsBackColorAtFromTarget = new SolidBrush(_clAtFromTarget);
-            _brsBackColorAtTo = new SolidBrush(_clAtTo);
-            //_brsBackColorNone = new SolidBrush(Color.FromKnownColor(KnownColor.Window));
-            _brsBackColorNone = new SolidBrush(_clListBackcolor);
-
             // StringFormatオブジェクトへの事前設定
             //sf.Alignment = StringAlignment.Near;             // Textを近くへ配置(左から右の場合は左寄せ)
             //sf.LineAlignment = StringAlignment.Near;         // Textを近くへ配置(上寄せ)
@@ -715,7 +730,30 @@ namespace OpenTween
             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;
 
@@ -725,39 +763,15 @@ namespace OpenTween
 
             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;
@@ -782,8 +796,6 @@ namespace OpenTween
             SettingDialog.FontInputFont = _fntInputFont;
 
             SettingDialog.NameBalloon = _cfgCommon.NameBalloon;
-            SettingDialog.PostCtrlEnter = _cfgCommon.PostCtrlEnter;
-            SettingDialog.PostShiftEnter = _cfgCommon.PostShiftEnter;
 
             SettingDialog.CountApi = _cfgCommon.CountApi;
             SettingDialog.CountApiReply = _cfgCommon.CountApiReply;
@@ -792,13 +804,10 @@ namespace OpenTween
 
             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;
@@ -807,18 +816,13 @@ namespace OpenTween
             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;
@@ -836,58 +840,21 @@ namespace OpenTween
             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, "@");
 
             SettingDialog.IsMonospace = _cfgCommon.IsMonospace;
-            if (SettingDialog.IsMonospace)
-            {
-                detailHtmlFormatHeader = detailHtmlFormatMono1;
-                detailHtmlFormatFooter = detailHtmlFormatMono7;
-            }
-            else
-            {
-                detailHtmlFormatHeader = detailHtmlFormat1;
-                detailHtmlFormatFooter = detailHtmlFormat7;
-            }
-            detailHtmlFormatHeader += _fntDetail.Name + detailHtmlFormat2 + _fntDetail.Size.ToString() + detailHtmlFormat3 + _clDetail.R.ToString() + "," + _clDetail.G.ToString() + "," + _clDetail.B.ToString() + detailHtmlFormat4 + _clDetailLink.R.ToString() + "," + _clDetailLink.G.ToString() + "," + _clDetailLink.B.ToString() + detailHtmlFormat5 + _clDetailBackcolor.R.ToString() + "," + _clDetailBackcolor.G.ToString() + "," + _clDetailBackcolor.B.ToString();
-            if (SettingDialog.IsMonospace)
-            {
-                detailHtmlFormatHeader += detailHtmlFormatMono6;
-            }
-            else
-            {
-                detailHtmlFormatHeader += detailHtmlFormat6;
-            }
+
             this.IdeographicSpaceToSpaceToolStripMenuItem.Checked = _cfgCommon.WideSpaceConvert;
             this.ToolStripFocusLockMenuItem.Checked = _cfgCommon.FocusLockToStatusText;
 
             //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.RecommendStatusText = " [TWNv" + Regex.Replace(MyCommon.FileVersion.Replace(".", ""), "^0*", "") + "]";
 
             SettingDialog.Nicoms = _cfgCommon.Nicoms;
             SettingDialog.HotkeyEnabled = _cfgCommon.HotkeyEnabled;
@@ -905,19 +872,16 @@ namespace OpenTween
             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.IsPreviewFoursquare = _cfgCommon.IsPreviewFoursquare;
+            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.IsListStatusesIncludeRts = _cfgCommon.IsListsIncludeRts;
             SettingDialog.TabMouseLock = _cfgCommon.TabMouseLock;
             SettingDialog.IsRemoveSameEvent = _cfgCommon.IsRemoveSameEvent;
             SettingDialog.IsNotifyUseGrowl = _cfgCommon.IsUseNotifyGrowl;
@@ -934,6 +898,8 @@ namespace OpenTween
 
             _initial = true;
 
+            Networking.Initialize();
+
             //アイコンリスト作成
             this.IconCache = new ImageCache();
 
@@ -960,6 +926,7 @@ namespace OpenTween
                     return;
                 }
                 SettingDialog.ShowInTaskbar = false;
+
                 //新しい設定を反映
                 //フォント&文字色&背景色保持
                 _fntUnread = SettingDialog.FontUnread;
@@ -983,43 +950,21 @@ namespace OpenTween
                 _clInputBackcolor = SettingDialog.ColorInputBackcolor;
                 _clInputFont = SettingDialog.ColorInputFont;
                 _fntInputFont = SettingDialog.FontInputFont;
-                _brsBackColorMine.Dispose();
-                _brsBackColorAt.Dispose();
-                _brsBackColorYou.Dispose();
-                _brsBackColorAtYou.Dispose();
-                _brsBackColorAtFromTarget.Dispose();
-                _brsBackColorAtTo.Dispose();
-                _brsBackColorNone.Dispose();
-                _brsBackColorMine = new SolidBrush(_clSelf);
-                _brsBackColorAt = new SolidBrush(_clAtSelf);
-                _brsBackColorYou = new SolidBrush(_clTarget);
-                _brsBackColorAtYou = new SolidBrush(_clAtTarget);
-                _brsBackColorAtFromTarget = new SolidBrush(_clAtFromTarget);
-                _brsBackColorAtTo = new SolidBrush(_clAtTo);
-                _brsBackColorNone = new SolidBrush(_clListBackcolor);
-
-                if (SettingDialog.IsMonospace)
-                {
-                    detailHtmlFormatHeader = detailHtmlFormatMono1;
-                    detailHtmlFormatFooter = detailHtmlFormatMono7;
-                }
-                else
-                {
-                    detailHtmlFormatHeader = detailHtmlFormat1;
-                    detailHtmlFormatFooter = detailHtmlFormat7;
-                }
-                detailHtmlFormatHeader += _fntDetail.Name + detailHtmlFormat2 + _fntDetail.Size.ToString() + detailHtmlFormat3 + _clDetail.R.ToString() + "," + _clDetail.G.ToString() + "," + _clDetail.B.ToString() + detailHtmlFormat4 + _clDetailLink.R.ToString() + "," + _clDetailLink.G.ToString() + "," + _clDetailLink.B.ToString() + detailHtmlFormat5 + _clDetailBackcolor.R.ToString() + "," + _clDetailBackcolor.G.ToString() + "," + _clDetailBackcolor.B.ToString();
-                if (SettingDialog.IsMonospace)
-                {
-                    detailHtmlFormatHeader += detailHtmlFormatMono6;
-                }
-                else
-                {
-                    detailHtmlFormatHeader += detailHtmlFormat6;
-                }
+
                 //他の設定項目は、随時設定画面で保持している値を読み出して使用
             }
 
+            _brsBackColorMine = new SolidBrush(_clSelf);
+            _brsBackColorAt = new SolidBrush(_clAtSelf);
+            _brsBackColorYou = new SolidBrush(_clTarget);
+            _brsBackColorAtYou = new SolidBrush(_clAtTarget);
+            _brsBackColorAtFromTarget = new SolidBrush(_clAtFromTarget);
+            _brsBackColorAtTo = new SolidBrush(_clAtTo);
+            //_brsBackColorNone = new SolidBrush(Color.FromKnownColor(KnownColor.Window));
+            _brsBackColorNone = new SolidBrush(_clListBackcolor);
+
+            InitDetailHtmlFormat();
+
             if (SettingDialog.HotkeyEnabled)
             {
                 //////グローバルホットキーの登録
@@ -1033,12 +978,10 @@ namespace OpenTween
             }
 
             //Twitter用通信クラス初期化
-            HttpConnection.InitializeConnection(SettingDialog.DefaultTimeOut,
-                                                SettingDialog.SelectedProxyType,
-                                                SettingDialog.ProxyAddress,
-                                                SettingDialog.ProxyPort,
-                                                SettingDialog.ProxyUser,
-                                                SettingDialog.ProxyPassword);
+            Networking.DefaultTimeout = TimeSpan.FromSeconds(this.SettingDialog.DefaultTimeOut);
+            Networking.SetWebProxy(this.SettingDialog.SelectedProxyType,
+                this.SettingDialog.ProxyAddress, this.SettingDialog.ProxyPort,
+                this.SettingDialog.ProxyUser, this.SettingDialog.ProxyPassword);
 
             tw.RestrictFavCheck = SettingDialog.RestrictFavCheck;
             tw.ReadOwnPost = SettingDialog.ReadOwnPost;
@@ -1052,11 +995,7 @@ namespace OpenTween
             AllrepliesToolStripMenuItem.Checked = tw.AllAtReply;
 
             //画像投稿サービス
-            this.CreatePictureServices();
-            SetImageServiceCombo();
-            ImageSelectionPanel.Enabled = false;
-
-            SelectImageServiceComboItem(_cfgCommon.UseImageServiceName, _cfgCommon.UseImageService);
+            ImageSelector.Initialize(tw, SettingDialog.TwitterConfiguration, _cfgCommon.UseImageServiceName, _cfgCommon.UseImageService);
 
             //ウィンドウ設定
             this.ClientSize = _cfgLocal.FormSize;
@@ -1095,7 +1034,6 @@ namespace OpenTween
                 if (_mySpDis3 < 1) _mySpDis3 = 50;
                 _cfgLocal.PreviewDistance = _mySpDis3;
             }
-            _myAdSpDis = _cfgLocal.AdSplitterDistance;
             MultiLineMenuItem.Checked = _cfgLocal.StatusMultiline;
             //this.Tween_ClientSizeChanged(this, null);
             PlaySoundMenuItem.Checked = SettingDialog.PlaySound;
@@ -1107,6 +1045,9 @@ namespace OpenTween
             // NameLabel のフォントを OTBaseForm.GlobalFont に変更
             this.NameLabel.Font = this.ReplaceToGlobalFont(this.NameLabel.Font);
 
+            // 必要であれば、発言一覧と発言詳細部・入力欄の上下を入れ替える
+            SplitContainer1.IsPanelInverted = !SettingDialog.StatusAreaAtBottom;
+
             //全新着通知のチェック状態により、Reply&DMの新着通知有効無効切り替え(タブ別設定にするため削除予定)
             if (SettingDialog.UnreadManage == false)
             {
@@ -1164,42 +1105,7 @@ namespace OpenTween
             _statuses.SortMode = mode;
             ////////////////////////////////////////////////////////////////////////////////
 
-            switch (SettingDialog.IconSz)
-            {
-                case MyCommon.IconSizes.IconNone:
-                    _iconSz = 0;
-                    break;
-                case MyCommon.IconSizes.Icon16:
-                    _iconSz = 16;
-                    break;
-                case MyCommon.IconSizes.Icon24:
-                    _iconSz = 26;
-                    break;
-                case MyCommon.IconSizes.Icon48:
-                    _iconSz = 48;
-                    break;
-                case MyCommon.IconSizes.Icon48_2:
-                    _iconSz = 48;
-                    _iconCol = true;
-                    break;
-            }
-            if (_iconSz == 0)
-            {
-                tw.GetIcon = false;
-            }
-            else
-            {
-                tw.GetIcon = true;
-                tw.IconSize = _iconSz;
-            }
-            tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
-
-            //発言詳細部アイコンをリストアイコンにサイズ変更
-            int sz = _iconSz;
-            if (_iconSz == 0)
-            {
-                sz = 16;
-            }
+            ApplyListViewIconSize(this._cfgCommon.IconSize);
 
             StatusLabel.Text = Properties.Resources.Form1_LoadText1;       //画面右下の状態表示を変更
             StatusLabelUrl.Text = "";            //画面左下のリンク先URL表示部を初期化
@@ -1257,13 +1163,14 @@ namespace OpenTween
                     tab.TabType = MyCommon.TabUsageType.Favorites;
                 }
             }
-            foreach (string tn in _statuses.Tabs.Keys)
+            foreach (var tab in _statuses.Tabs.Values)
             {
-                if (_statuses.Tabs[tn].TabType == MyCommon.TabUsageType.Undefined)
+                if (tab.TabType == MyCommon.TabUsageType.Undefined)
                 {
-                    _statuses.Tabs[tn].TabType = MyCommon.TabUsageType.UserDefined;
+                    tab.TabType = MyCommon.TabUsageType.UserDefined;
                 }
-                if (!AddNewTab(tn, true, _statuses.Tabs[tn].TabType, _statuses.Tabs[tn].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";
@@ -1327,18 +1234,27 @@ namespace OpenTween
             SetTabAlignment();
         }
 
-        private void CreatePictureServices()
+        private void InitDetailHtmlFormat()
         {
-            if (this.pictureService != null) this.pictureService.Clear();
-            this.pictureService = null;
-            this.pictureService = new Dictionary<string, IMultimediaShareService> {
-                {"TwitPic", new TwitPic(tw)},
-                {"img.ly", new imgly(tw)},
-                {"yfrog", new yfrog(tw)},
-                {"Twitter", new TwitterPhoto(tw)},
-                {"ついっぷるフォト", new TwipplePhoto(tw)},
-                {"Imgur", new Imgur(tw)},
-            };
+            if (SettingDialog.IsMonospace)
+            {
+                detailHtmlFormatHeader = detailHtmlFormatMono1;
+                detailHtmlFormatFooter = detailHtmlFormatMono7;
+            }
+            else
+            {
+                detailHtmlFormatHeader = detailHtmlFormat1;
+                detailHtmlFormatFooter = detailHtmlFormat7;
+            }
+            detailHtmlFormatHeader += _fntDetail.Name + detailHtmlFormat2 + _fntDetail.Size.ToString() + detailHtmlFormat3 + _clDetail.R.ToString() + "," + _clDetail.G.ToString() + "," + _clDetail.B.ToString() + detailHtmlFormat4 + _clDetailLink.R.ToString() + "," + _clDetailLink.G.ToString() + "," + _clDetailLink.B.ToString() + detailHtmlFormat5 + _clDetailBackcolor.R.ToString() + "," + _clDetailBackcolor.G.ToString() + "," + _clDetailBackcolor.B.ToString();
+            if (SettingDialog.IsMonospace)
+            {
+                detailHtmlFormatHeader += detailHtmlFormatMono6;
+            }
+            else
+            {
+                detailHtmlFormatHeader += detailHtmlFormat6;
+            }
         }
 
         private void ListTab_DrawItem(object sender, DrawItemEventArgs e)
@@ -1376,6 +1292,7 @@ namespace OpenTween
         private void LoadConfig()
         {
             _cfgCommon = SettingCommon.Load();
+            SettingCommon.Instance = this._cfgCommon;
             if (_cfgCommon.UserAccounts == null || _cfgCommon.UserAccounts.Count == 0)
             {
                 _cfgCommon.UserAccounts = new List<UserAccount>();
@@ -1413,13 +1330,13 @@ namespace OpenTween
             }
         }
 
-        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;
@@ -1443,45 +1360,45 @@ namespace OpenTween
             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;
             }
@@ -1489,9 +1406,8 @@ namespace OpenTween
             {
                 Interlocked.Exchange(ref refreshFollowers, 0);
                 doGetFollowersMenu();
-                GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, 0, "");
-                GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, 0, "");
-                if (InvokeRequired && !IsDisposed) this.Invoke(new MethodInvoker(this.TrimPostChain));
+                GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, "");
+                GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
             }
             if (osResumed)
             {
@@ -1500,15 +1416,14 @@ namespace OpenTween
                 {
                     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, "");
-                    if (InvokeRequired && !IsDisposed) this.Invoke(new MethodInvoker(this.TrimPostChain));
+                    GetTimeline(MyCommon.WORKERTYPE.Configuration, 0, "");
                 }
             }
         }
@@ -1563,8 +1478,8 @@ namespace OpenTween
                                 //アイコン描画不具合あり?
                             }
                             this.SelectListItem(lst,
-                                                _statuses.IndexOf(tab.Text, selId[tab.Text]),
-                                                _statuses.IndexOf(tab.Text, focusedId[tab.Text]));
+                                                tabInfo.IndexOf(selId[tab.Text]),
+                                                tabInfo.IndexOf(focusedId[tab.Text]));
                         }
                     }
                     if (tabInfo.UnreadCount > 0)
@@ -1713,10 +1628,11 @@ namespace OpenTween
             if (MyCommon._endingFlag) return;
             foreach (TabPage tab in ListTab.TabPages)
             {
-                DetailsListView lst = (DetailsListView)tab.Tag;
+                var lst = (DetailsListView)tab.Tag;
+                var tabInfo = _statuses.Tabs[tab.Text];
                 if (lst.SelectedIndices.Count > 0 && lst.SelectedIndices.Count < 61)
                 {
-                    selId.Add(tab.Text, _statuses.GetId(tab.Text, lst.SelectedIndices));
+                    selId.Add(tab.Text, tabInfo.GetId(lst.SelectedIndices));
                 }
                 else
                 {
@@ -1725,9 +1641,9 @@ namespace OpenTween
 
                 var fIds = new long[2];  // 0 = focus, 1 = selection mark
                 var item = lst.FocusedItem;
-                fIds[0] = (item != null) ? _statuses.GetId(tab.Text, item.Index) : -2;
+                fIds[0] = (item != null) ? tabInfo.GetId(item.Index) : -2;
                 var mIdx = lst.SelectionMark;
-                fIds[1] = (mIdx > -1) ? _statuses.GetId(tab.Text, mIdx) : -2;
+                fIds[1] = (mIdx > -1) ? tabInfo.GetId(mIdx) : -2;
                 focusedId.Add(tab.Text, fIds);
             }
 
@@ -1769,7 +1685,7 @@ namespace OpenTween
                     !SettingDialog.LimitBalloon
                     )
                 ) &&
-                !Win32Api.IsScreenSaverRunning())
+                !NativeMethods.IsScreenSaverRunning())
             {
                 return true;
             }
@@ -1986,7 +1902,7 @@ namespace OpenTween
             //mentions新着時に画面ブリンク
             if (!_initial && SettingDialog.BlinkNewMentions && newMentions && Form.ActiveForm == null)
             {
-                Win32Api.FlashMyWindow(this.Handle, Win32Api.FlashSpecification.FlashTray, 3);
+                NativeMethods.FlashMyWindow(this.Handle, NativeMethods.FlashSpecification.FlashTray, 3);
             }
         }
 
@@ -2010,35 +1926,33 @@ namespace OpenTween
 
             if (SettingDialog.UnreadManage) _statuses.SetReadAllTab(true, _curTab.Text, _curItemIndex);
             //キャッシュの書き換え
-            ChangeCacheStyleRead(true, _curItemIndex, _curTab);   //既読へ(フォント、文字色)
+            ChangeCacheStyleRead(true, _curItemIndex);   //既読へ(フォント、文字色)
 
             ColorizeList();
             _colorize = true;
         }
 
-        private void ChangeCacheStyleRead(bool Read, int Index, TabPage Tab)
+        private void ChangeCacheStyleRead(bool Read, int Index)
         {
+            var tabInfo = _statuses.Tabs[_curTab.Text];
             //Read:true=既読 false=未読
             //未読管理していなかったら既読として扱う
-            if (!_statuses.Tabs[_curTab.Text].UnreadManage ||
+            if (!tabInfo.UnreadManage ||
                !SettingDialog.UnreadManage) Read = true;
 
             //対象の特定
             ListViewItem itm = null;
             PostClass post = null;
 
-            if (Tab.Equals(this._curTab))
-            {
-                this.TryGetListViewItemCache(Index, out itm, out post);
-            }
+            this.TryGetListViewItemCache(Index, out itm, out post);
 
             if (itm == null || post == null)
             {
-                itm = ((DetailsListView)Tab.Tag).Items[Index];
-                post = _statuses[Tab.Text, Index];
+                itm = ((DetailsListView)_curTab.Tag).Items[Index];
+                post = tabInfo[Index];
             }
 
-            ChangeItemStyleRead(Read, itm, post, ((DetailsListView)Tab.Tag));
+            ChangeItemStyleRead(Read, itm, post, ((DetailsListView)_curTab.Tag));
         }
 
         private void ChangeItemStyleRead(bool Read, ListViewItem Item, PostClass Post, DetailsListView DList)
@@ -2061,9 +1975,9 @@ namespace OpenTween
                 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;
@@ -2071,13 +1985,13 @@ namespace OpenTween
             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);
@@ -2172,11 +2086,11 @@ namespace OpenTween
             return cl;
         }
 
-        private void PostButton_Click(object sender, EventArgs e)
+        private async void PostButton_Click(object sender, EventArgs e)
         {
             if (StatusText.Text.Trim().Length == 0)
             {
-                if (!ImageSelectionPanel.Enabled)
+                if (!ImageSelector.Enabled)
                 {
                     DoRefresh();
                     return;
@@ -2205,7 +2119,7 @@ namespace OpenTween
             if (SettingDialog.Nicoms)
             {
                 StatusText.SelectionStart = StatusText.Text.Length;
-                UrlConvert(MyCommon.UrlConverter.Nicoms);
+                await UrlConvertAsync(MyCommon.UrlConverter.Nicoms);
             }
             //if (SettingDialog.UrlConvertAuto)
             //{
@@ -2220,7 +2134,6 @@ namespace OpenTween
             StatusText.SelectionStart = StatusText.Text.Length;
             GetWorkerArg args = new GetWorkerArg();
             args.page = 0;
-            args.endPage = 0;
             args.type = MyCommon.WORKERTYPE.PostMessage;
             CheckReplyTo(StatusText.Text);
 
@@ -2244,12 +2157,12 @@ namespace OpenTween
 
             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);
             }
@@ -2306,12 +2219,12 @@ namespace OpenTween
                 }
                 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;
@@ -2356,55 +2269,15 @@ namespace OpenTween
 
             args.status.inReplyToId = _reply_to_id;
             args.status.inReplyToName = _reply_to_name;
-            if (ImageSelectionPanel.Visible)
+            if (ImageSelector.Visible)
             {
                 //画像投稿
-                if (ImageSelectedPicture.Image != ImageSelectedPicture.InitialImage &&
-                    ImageServiceCombo.SelectedIndex > -1 &&
-                    !string.IsNullOrEmpty(ImagefilePathText.Text))
-                {
-                    if (MessageBox.Show(Properties.Resources.PostPictureConfirm1,
-                                       Properties.Resources.PostPictureConfirm2,
-                                       MessageBoxButtons.OKCancel,
-                                       MessageBoxIcon.Question,
-                                       MessageBoxDefaultButton.Button1)
-                                   == DialogResult.Cancel)
-                    {
-                        TimelinePanel.Visible = true;
-                        TimelinePanel.Enabled = true;
-                        ImageSelectionPanel.Visible = false;
-                        ImageSelectionPanel.Enabled = false;
-                        if (_curList != null)
-                            _curList.Focus();
-                        return;
-                    }
-                    args.status.imageService = ImageServiceCombo.Text;
-                    args.status.imagePath = ImagefilePathText.Text;
-                    ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                    ImagefilePathText.Text = "";
-                    TimelinePanel.Visible = true;
-                    TimelinePanel.Enabled = true;
-                    ImageSelectionPanel.Visible = false;
-                    ImageSelectionPanel.Enabled = false;
-                    if (_curList != null)
-                        _curList.Focus();
-                }
-                else
-                {
-                    MessageBox.Show(Properties.Resources.PostPictureWarn1, Properties.Resources.PostPictureWarn2);
+                if (!ImageSelector.TryGetSelectedMedia(out args.status.imageService, out args.status.imagePath))
                     return;
-                }
             }
 
             RunAsync(args);
 
-            //Google検索(試験実装)
-            if (StatusText.Text.StartsWith("Google:", StringComparison.OrdinalIgnoreCase) && StatusText.Text.Trim().Length > 7)
-            {
-                string tmp = string.Format(Properties.Resources.SearchItem2Url, Uri.EscapeUriString(StatusText.Text.Substring(7)));
-                OpenUriAsync(tmp);
-            }
-
             _reply_to_id = null;
             _reply_to_name = null;
             StatusText.Text = "";
@@ -2414,6 +2287,13 @@ namespace OpenTween
                 ((Control)ListTab.SelectedTab.Tag).Focus();
             urlUndoBuffer = null;
             UrlUndoToolStripMenuItem.Enabled = false;  //Undoをできないように設定
+
+            //Google検索(試験実装)
+            if (StatusText.Text.StartsWith("Google:", StringComparison.OrdinalIgnoreCase) && StatusText.Text.Trim().Length > 7)
+            {
+                string tmp = string.Format(Properties.Resources.SearchItem2Url, Uri.EscapeUriString(StatusText.Text.Substring(7)));
+                await this.OpenUriAsync(tmp);
+            }
         }
 
         private void EndToolStripMenuItem_Click(object sender, EventArgs e)
@@ -2487,7 +2367,7 @@ namespace OpenTween
             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;
 
@@ -2529,9 +2409,7 @@ namespace OpenTween
                     {
                         for (int i = 0; i <= args.ids.Count - 1; i++)
                         {
-                            var post = tab.IsInnerStorageTabType
-                                ? tab.Posts[args.ids[i]]
-                                : _statuses[args.ids[i]];
+                            var post = tab.Posts[args.ids[i]];
 
                             args.page = i + 1;
                             bw.ReportProgress(50, MakeStatusMessage(args, false));
@@ -2583,9 +2461,7 @@ namespace OpenTween
                     {
                         for (int i = 0; i <= args.ids.Count - 1; i++)
                         {
-                            var post = tab.IsInnerStorageTabType
-                                ? tab.Posts[args.ids[i]]
-                                : _statuses[args.ids[i]];
+                            var post = tab.Posts[args.ids[i]];
 
                             args.page = i + 1;
                             bw.ReportProgress(50, MakeStatusMessage(args, false));
@@ -2616,15 +2492,22 @@ namespace OpenTween
 
                 case MyCommon.WORKERTYPE.PostMessage:
                     bw.ReportProgress(200);
-                    if (string.IsNullOrEmpty(args.status.imagePath))
+                    if (args.status.imagePath == null || args.status.imagePath.Length == 0 || string.IsNullOrEmpty(args.status.imagePath[0]))
                     {
                         ret = tw.PostStatus(args.status.status, args.status.inReplyToId);
                     }
                     else
                     {
-                        ret = this.pictureService[args.status.imageService].Upload(ref args.status.imagePath,
-                                                                                   ref args.status.status,
-                                                                                   args.status.inReplyToId);
+                        var service = ImageSelector.GetService(args.status.imageService);
+                        try
+                        {
+                            service.PostStatusAsync(args.status.status, args.status.inReplyToId, args.status.imagePath)
+                                .Wait();
+                        }
+                        catch (AggregateException ex)
+                        {
+                            ret = ex.InnerException.Message;
+                        }
                     }
                     bw.ReportProgress(300);
                     rslt.status = args.status;
@@ -2811,14 +2694,6 @@ namespace OpenTween
             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;
         }
@@ -3014,7 +2889,7 @@ namespace OpenTween
                     _waitReply = false;
                     if (rslt.newDM && !_initial)
                     {
-                        GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, 0, "");
+                        GetTimeline(MyCommon.WORKERTYPE.DirectMessegeRcv, 1, "");
                     }
                     break;
                 case MyCommon.WORKERTYPE.Favorites:
@@ -3054,7 +2929,7 @@ namespace OpenTween
                                                 {
                                                     post = _statuses[rslt.sIds[i]];
                                                 }
-                                                ChangeCacheStyleRead(post.IsRead, idx, _curTab);
+                                                ChangeCacheStyleRead(post.IsRead, idx);
                                             }
                                             if (idx == _curItemIndex) DispSelectedPost(true); //選択アイテム再表示
                                         }
@@ -3109,7 +2984,6 @@ namespace OpenTween
                         {
                             GetWorkerArg args = new GetWorkerArg();
                             args.page = 0;
-                            args.endPage = 0;
                             args.type = MyCommon.WORKERTYPE.PostMessage;
                             args.status = rslt.status;
                             RunAsync(args);
@@ -3123,7 +2997,7 @@ namespace OpenTween
                             }
                         }
                     }
-                    if (rslt.retMsg.Length == 0 && SettingDialog.PostAndGet)
+                    if (rslt.retMsg.Length == 0 && this._cfgCommon.PostAndGet)
                     {
                         if (_isActiveUserstream)
                         {
@@ -3131,7 +3005,7 @@ namespace OpenTween
                         }
                         else
                         {
-                            GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, 0, "");
+                            GetTimeline(MyCommon.WORKERTYPE.Timeline, 1, "");
                         }
                     }
                     break;
@@ -3147,7 +3021,7 @@ namespace OpenTween
                                 _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:
@@ -3161,7 +3035,10 @@ namespace OpenTween
                     //_waitFollower = false
                     if (SettingDialog.TwitterConfiguration.PhotoSizeLimit != 0)
                     {
-                        pictureService["Twitter"].Configuration("MaxUploadFilesize", SettingDialog.TwitterConfiguration.PhotoSizeLimit);
+                        foreach (var service in this.ImageSelector.GetServices())
+                        {
+                            service.UpdateTwitterConfiguration(this.SettingDialog.TwitterConfiguration);
+                        }
                     }
                     this.PurgeListViewItemCache();
                     if (_curList != null) _curList.Refresh();
@@ -3193,6 +3070,23 @@ namespace OpenTween
             }
         }
 
+        private async Task RefreshMuteUserIdsAsync()
+        {
+            this.StatusLabel.Text = Properties.Resources.UpdateMuteUserIds_Start;
+
+            try
+            {
+                await tw.RefreshMuteUserIdsAsync();
+            }
+            catch (WebApiException ex)
+            {
+                this.StatusLabel.Text = string.Format(Properties.Resources.UpdateMuteUserIds_Error, ex.Message);
+                return;
+            }
+
+            this.StatusLabel.Text = Properties.Resources.UpdateMuteUserIds_Finish;
+        }
+
         private void RemovePostFromFavTab(Int64[] ids)
         {
             string favTabName = _statuses.GetTabByType(MyCommon.TabUsageType.Favorites).TabName;
@@ -3261,14 +3155,13 @@ namespace OpenTween
 
         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;
 
@@ -3481,7 +3374,7 @@ namespace OpenTween
 
         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)
             {
@@ -3828,7 +3721,7 @@ namespace OpenTween
                 }
                 foreach (int idx in _curList.SelectedIndices)
                 {
-                    ChangeCacheStyleRead(true, idx, _curTab);
+                    ChangeCacheStyleRead(true, idx);
                 }
                 ColorizeList();
             }
@@ -3858,7 +3751,7 @@ namespace OpenTween
                 }
                 foreach (int idx in _curList.SelectedIndices)
                 {
-                    ChangeCacheStyleRead(false, idx, _curTab);
+                    ChangeCacheStyleRead(false, idx);
                 }
                 ColorizeList();
             }
@@ -3887,13 +3780,13 @@ namespace OpenTween
                 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
@@ -3901,25 +3794,25 @@ namespace OpenTween
                         //// 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, "");
             }
         }
 
@@ -3931,13 +3824,13 @@ namespace OpenTween
                 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
@@ -3946,25 +3839,25 @@ namespace OpenTween
                         // 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, "");
             }
         }
 
@@ -3972,7 +3865,6 @@ namespace OpenTween
         {
             DialogResult result;
             string uid = tw.Username.ToLower();
-            var oldIconSz = SettingDialog.IconSz;
 
             try
             {
@@ -3987,7 +3879,10 @@ namespace OpenTween
             {
                 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;
@@ -3995,13 +3890,12 @@ namespace OpenTween
                     ShortUrl.Instance.BitlyKey = SettingDialog.BitlyPwd;
                     HttpTwitter.TwitterUrl = _cfgCommon.TwitterUrl;
 
-                    HttpConnection.InitializeConnection(SettingDialog.DefaultTimeOut,
-                                                        SettingDialog.SelectedProxyType,
-                                                        SettingDialog.ProxyAddress,
-                                                        SettingDialog.ProxyPort,
-                                                        SettingDialog.ProxyUser,
-                                                        SettingDialog.ProxyPassword);
-                    this.CreatePictureServices();
+                    Networking.DefaultTimeout = TimeSpan.FromSeconds(this.SettingDialog.DefaultTimeOut);
+                    Networking.SetWebProxy(this.SettingDialog.SelectedProxyType,
+                        this.SettingDialog.ProxyAddress, this.SettingDialog.ProxyPort,
+                        this.SettingDialog.ProxyUser, this.SettingDialog.ProxyPassword);
+
+                    ImageSelector.Reset(tw, SettingDialog.TwitterConfiguration);
 
                     try
                     {
@@ -4056,6 +3950,12 @@ namespace OpenTween
                     // タブの表示位置の決定
                     SetTabAlignment();
 
+                    SplitContainer1.IsPanelInverted = !SettingDialog.StatusAreaAtBottom;
+
+                    var imgazyobizinet = ThumbnailGenerator.ImgAzyobuziNetInstance;
+                    imgazyobizinet.Enabled = this.SettingDialog.EnableImgAzyobuziNet;
+                    imgazyobizinet.DisabledInDM = this.SettingDialog.ImgAzyobuziNetDisabledInDM;
+
                     PlaySoundMenuItem.Checked = SettingDialog.PlaySound;
                     this.PlaySoundFileMenuItem.Checked = SettingDialog.PlaySound;
                     _fntUnread = SettingDialog.FontUnread;
@@ -4107,25 +4007,7 @@ namespace OpenTween
 
                     try
                     {
-                        if (SettingDialog.IsMonospace)
-                        {
-                            detailHtmlFormatHeader = detailHtmlFormatMono1;
-                            detailHtmlFormatFooter = detailHtmlFormatMono7;
-                        }
-                        else
-                        {
-                            detailHtmlFormatHeader = detailHtmlFormat1;
-                            detailHtmlFormatFooter = detailHtmlFormat7;
-                        }
-                        detailHtmlFormatHeader += _fntDetail.Name + detailHtmlFormat2 + _fntDetail.Size.ToString() + detailHtmlFormat3 + _clDetail.R.ToString() + "," + _clDetail.G.ToString() + "," + _clDetail.B.ToString() + detailHtmlFormat4 + _clDetailLink.R.ToString() + "," + _clDetailLink.G.ToString() + "," + _clDetailLink.B.ToString() + detailHtmlFormat5 + _clDetailBackcolor.R.ToString() + "," + _clDetailBackcolor.G.ToString() + "," + _clDetailBackcolor.B.ToString();
-                        if (SettingDialog.IsMonospace)
-                        {
-                            detailHtmlFormatHeader += detailHtmlFormatMono6;
-                        }
-                        else
-                        {
-                            detailHtmlFormatHeader += detailHtmlFormat6;
-                        }
+                        InitDetailHtmlFormat();
                     }
                     catch (Exception ex)
                     {
@@ -4167,18 +4049,23 @@ namespace OpenTween
 
                     try
                     {
+                        var oldIconCol = _iconCol;
+
+                        if (this._cfgCommon.IconSize != oldIconSz)
+                            ApplyListViewIconSize(this._cfgCommon.IconSize);
+
                         foreach (TabPage tp in ListTab.TabPages)
                         {
                             DetailsListView lst = (DetailsListView)tp.Tag;
 
                             using (ControlTransaction.Update(lst))
                             {
-                                lst.GridLines = SettingDialog.ShowGrid;
+                                lst.GridLines = this._cfgCommon.ShowGrid;
                                 lst.Font = _fntReaded;
                                 lst.BackColor = _clListBackcolor;
 
-                                if (SettingDialog.IconSz != oldIconSz)
-                                    ApplyListViewIconSize(lst);
+                                if (_iconCol != oldIconCol)
+                                    ResetColumns(lst);
                             }
                         }
                     }
@@ -4211,7 +4098,6 @@ namespace OpenTween
 
                     if (uid != tw.Username) this.doGetFollowersMenu();
 
-                    SetImageServiceCombo();
                     if (SettingDialog.IsNotifyUseGrowl) gh.RegisterGrowl();
                     try
                     {
@@ -4234,84 +4120,99 @@ namespace OpenTween
         /// </summary>
         private void SetTabAlignment()
         {
-            ListTab.Alignment = (SettingDialog.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top);
-        }
+            var newAlignment = this._cfgCommon.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top;
+            if (ListTab.Alignment == newAlignment) return;
 
-        private void ApplyListViewIconSize(DetailsListView list)
-        {
-            using (ControlTransaction.Update(list))
-            using (ControlTransaction.Layout(list, false))
-            {
-                // アイコンサイズの再設定
-                _iconCol = false;
-                switch (SettingDialog.IconSz)
-                {
-                    case MyCommon.IconSizes.IconNone:
-                        _iconSz = 0;
-                        break;
-                    case MyCommon.IconSizes.Icon16:
-                        _iconSz = 16;
-                        break;
-                    case MyCommon.IconSizes.Icon24:
-                        _iconSz = 26;
-                        break;
-                    case MyCommon.IconSizes.Icon48:
-                        _iconSz = 48;
-                        break;
-                    case MyCommon.IconSizes.Icon48_2:
-                        _iconSz = 48;
-                        _iconCol = true;
-                        break;
-                }
-                if (_iconSz == 0)
-                {
-                    tw.GetIcon = false;
-                }
-                else
-                {
-                    tw.GetIcon = true;
-                    tw.IconSize = _iconSz;
-                }
+            //現在の選択状態を退避
+            Dictionary<string, long[]> selId = new Dictionary<string, long[]>();
+            Dictionary<string, long[]> focusedId = new Dictionary<string, long[]>();
+            SaveSelectedStatus(selId, focusedId);
 
-                if (_iconSz > 0)
-                {
-                    // ディスプレイの DPI 設定を考慮したサイズを設定する
-                    list.SmallImageList.ImageSize = new Size(
-                        (int)Math.Ceiling(this._iconSz * this.currentScaleFactor.Width),
-                        (int)Math.Ceiling(this._iconSz * this.currentScaleFactor.Height));
-                }
-                else
+            ListTab.Alignment = newAlignment;
+
+            //選択状態を復帰
+            foreach (TabPage tab in ListTab.TabPages)
+            {
+                DetailsListView lst = (DetailsListView)tab.Tag;
+                TabClass tabInfo = _statuses.Tabs[tab.Text];
+                using (ControlTransaction.Update(lst))
                 {
-                    list.SmallImageList.ImageSize = new Size(1, 1);
+                    this.SelectListItem(lst,
+                                        tabInfo.IndexOf(selId[tab.Text]),
+                                        tabInfo.IndexOf(focusedId[tab.Text]));
                 }
-
-                // カラムヘッダの再設定
-                list.ColumnClick -= MyList_ColumnClick;
-                list.DrawColumnHeader -= MyList_DrawColumnHeader;
-                list.ColumnReordered -= MyList_ColumnReordered;
-                list.ColumnWidthChanged -= MyList_ColumnWidthChanged;
-
-                var cols = list.Columns.Cast<ColumnHeader>().ToList();
-                list.Columns.Clear();
-                cols.ForEach(col => col.Dispose());
-                cols.Clear();
-
-                InitColumns(list, true);
-
-                list.ColumnClick += MyList_ColumnClick;
-                list.DrawColumnHeader += MyList_DrawColumnHeader;
-                list.ColumnReordered += MyList_ColumnReordered;
-                list.ColumnWidthChanged += MyList_ColumnWidthChanged;
             }
         }
 
-        private void PostBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
+        private void ApplyListViewIconSize(MyCommon.IconSizes iconSz)
         {
-            if (e.Url.AbsoluteUri != "about:blank")
+            // アイコンサイズの再設定
+            _iconCol = false;
+            switch (iconSz)
             {
-                DispSelectedPost();
-                OpenUriAsync(e.Url.OriginalString);
-            }
+                case MyCommon.IconSizes.IconNone:
+                    _iconSz = 0;
+                    break;
+                case MyCommon.IconSizes.Icon16:
+                    _iconSz = 16;
+                    break;
+                case MyCommon.IconSizes.Icon24:
+                    _iconSz = 26;
+                    break;
+                case MyCommon.IconSizes.Icon48:
+                    _iconSz = 48;
+                    break;
+                case MyCommon.IconSizes.Icon48_2:
+                    _iconSz = 48;
+                    _iconCol = true;
+                    break;
+            }
+
+            if (_iconSz > 0)
+            {
+                // ディスプレイの DPI 設定を考慮したサイズを設定する
+                _listViewImageList.ImageSize = new Size(
+                    1,
+                    (int)Math.Ceiling(this._iconSz * this.currentScaleFactor.Height));
+            }
+            else
+            {
+                _listViewImageList.ImageSize = new Size(1, 1);
+            }
+        }
+
+        private void ResetColumns(DetailsListView list)
+        {
+            using (ControlTransaction.Update(list))
+            using (ControlTransaction.Layout(list, false))
+            {
+                // カラムヘッダの再設定
+                list.ColumnClick -= MyList_ColumnClick;
+                list.DrawColumnHeader -= MyList_DrawColumnHeader;
+                list.ColumnReordered -= MyList_ColumnReordered;
+                list.ColumnWidthChanged -= MyList_ColumnWidthChanged;
+
+                var cols = list.Columns.Cast<ColumnHeader>().ToList();
+                list.Columns.Clear();
+                cols.ForEach(col => col.Dispose());
+                cols.Clear();
+
+                InitColumns(list, true);
+
+                list.ColumnClick += MyList_ColumnClick;
+                list.DrawColumnHeader += MyList_DrawColumnHeader;
+                list.ColumnReordered += MyList_ColumnReordered;
+                list.ColumnWidthChanged += MyList_ColumnWidthChanged;
+            }
+        }
+
+        private void PostBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
+        {
+            if (e.Url.AbsoluteUri != "about:blank")
+            {
+                DispSelectedPost();
+                OpenUriAsync(e.Url.OriginalString);
+            }
         }
 
         private void PostBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
@@ -4456,7 +4357,7 @@ namespace OpenTween
             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)
@@ -4635,21 +4536,10 @@ namespace OpenTween
                 _listCustom.Font = _fntReaded;
                 _listCustom.BackColor = _clListBackcolor;
 
-                _listCustom.GridLines = SettingDialog.ShowGrid;
+                _listCustom.GridLines = this._cfgCommon.ShowGrid;
                 _listCustom.AllowDrop = true;
 
-                _listCustom.SmallImageList = new ImageList();
-                if (_iconSz > 0)
-                {
-                    // ディスプレイの DPI 設定を考慮したサイズを設定する
-                    _listCustom.SmallImageList.ImageSize = new Size(
-                        (int)Math.Ceiling(this._iconSz * this.currentScaleFactor.Width),
-                        (int)Math.Ceiling(this._iconSz * this.currentScaleFactor.Height));
-                }
-                else
-                {
-                    _listCustom.SmallImageList.ImageSize = new Size(1, 1);
-                }
+                _listCustom.SmallImageList = _listViewImageList;
 
                 InitColumns(_listCustom, startup);
 
@@ -4658,6 +4548,7 @@ namespace OpenTween
                 _listCustom.ColumnClick += MyList_ColumnClick;
                 _listCustom.DrawColumnHeader += MyList_DrawColumnHeader;
                 _listCustom.DragDrop += TweenMain_DragDrop;
+                _listCustom.DragEnter += TweenMain_DragEnter;
                 _listCustom.DragOver += TweenMain_DragOver;
                 _listCustom.DrawItem += MyList_DrawItem;
                 _listCustom.MouseClick += MyList_MouseClick;
@@ -4753,6 +4644,7 @@ namespace OpenTween
                 _listCustom.ColumnClick -= MyList_ColumnClick;
                 _listCustom.DrawColumnHeader -= MyList_DrawColumnHeader;
                 _listCustom.DragDrop -= TweenMain_DragDrop;
+                _listCustom.DragEnter -= TweenMain_DragEnter;
                 _listCustom.DragOver -= TweenMain_DragOver;
                 _listCustom.DrawItem -= MyList_DrawItem;
                 _listCustom.MouseClick -= MyList_MouseClick;
@@ -4772,7 +4664,6 @@ namespace OpenTween
                 _listCustom.ColumnHeaderContextMenuStrip = null;
                 _listCustom.Font = null;
 
-                _listCustom.SmallImageList.Dispose();
                 _listCustom.SmallImageList = null;
                 _listCustom.ListViewItemSorter = null;
 
@@ -4926,7 +4817,7 @@ namespace OpenTween
         {
             if (e.KeyChar == '@')
             {
-                if (!SettingDialog.UseAtIdSupplement) return;
+                if (!this._cfgCommon.UseAtIdSupplement) return;
                 //@マーク
                 int cnt = AtIdSupl.ItemCount;
                 ShowSuplDialog(StatusText, AtIdSupl);
@@ -4935,7 +4826,7 @@ namespace OpenTween
             }
             else if (e.KeyChar == '#')
             {
-                if (!SettingDialog.UseHashSupplement) return;
+                if (!this._cfgCommon.UseHashSupplement) return;
                 ShowSuplDialog(StatusText, HashSupl);
                 e.Handled = true;
             }
@@ -5060,14 +4951,14 @@ namespace OpenTween
 
             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))
             {
@@ -5126,7 +5017,7 @@ namespace OpenTween
                 //    pLen += m.Result("${url}").Length - SettingDialog.TwitterConfiguration.ShortUrlLength;
                 //}
             }
-            if (ImageSelectionPanel.Visible && ImageSelectedPicture.Tag != null && !string.IsNullOrEmpty(this.ImageService))
+            if (ImageSelector.Visible && !string.IsNullOrEmpty(ImageSelector.ServiceName))
             {
                 pLen -= SettingDialog.TwitterConfiguration.CharactersReservedPerMedia;
             }
@@ -5156,34 +5047,34 @@ namespace OpenTween
             finally { this.itemCacheLock.ExitUpgradeableReadLock(); }
         }
 
-        private void MyList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
+        private async void MyList_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
         {
-            ListViewItem cacheItem = null;
+            ListViewItem item = null;
             PostClass cacheItemPost = null;
 
-            this.TryGetListViewItemCache(e.ItemIndex, out cacheItem, out cacheItemPost);
+            if (_curList.Equals(sender))
+                this.TryGetListViewItemCache(e.ItemIndex, out item, out cacheItemPost);
 
-            if (cacheItem != null)
-            {
-                e.Item = cacheItem;
-            }
-            else
+            if (item == null)
             {
                 //A cache miss, so create a new ListViewItem and pass it back.
                 TabPage tb = (TabPage)((DetailsListView)sender).Parent;
                 try
                 {
-                    e.Item = CreateItem(tb,
-                                        _statuses[tb.Text, e.ItemIndex],
-                                        e.ItemIndex);
+                    item = this.CreateItem(tb, _statuses[tb.Text, e.ItemIndex], e.ItemIndex);
                 }
                 catch (Exception)
                 {
                     //不正な要求に対する間に合わせの応答
                     string[] sitem = {"", "", "", "", "", "", "", ""};
-                    e.Item = new ImageListViewItem(sitem);
+                    item = new ImageListViewItem(sitem);
                 }
             }
+
+            // e.Item に値をセットする前に await しないこと
+            e.Item = item;
+
+            await ((ImageListViewItem)item).GetImageAsync();
         }
 
         private void CreateCache(int StartIndex, int EndIndex)
@@ -5191,12 +5082,14 @@ namespace OpenTween
             this.itemCacheLock.EnterWriteLock();
             try
             {
+                var tabInfo = _statuses.Tabs[_curTab.Text];
+
                 //キャッシュ要求(要求範囲±30を作成)
                 StartIndex -= 30;
                 if (StartIndex < 0) StartIndex = 0;
                 EndIndex += 30;
-                if (EndIndex >= _statuses.Tabs[_curTab.Text].AllCount) EndIndex = _statuses.Tabs[_curTab.Text].AllCount - 1;
-                _postCache = _statuses[_curTab.Text, StartIndex, EndIndex]; //配列で取得
+                if (EndIndex >= tabInfo.AllCount) EndIndex = tabInfo.AllCount - 1;
+                _postCache = tabInfo[StartIndex, EndIndex]; //配列で取得
                 _itemCacheIndex = StartIndex;
 
                 _itemCache = new ListViewItem[0] {};
@@ -5265,7 +5158,7 @@ namespace OpenTween
                 string[] sitem= {"",
                                  Post.Nickname,
                                  Post.IsDeleted ? "(DELETED)" : Post.TextSingleLine,
-                                 Post.CreatedAt.ToString(SettingDialog.DateTimeFormat),
+                                 Post.CreatedAt.ToString(this._cfgCommon.DateTimeFormat),
                                  Post.ScreenName,
                                  "",
                                  mk.ToString(),
@@ -5277,14 +5170,14 @@ namespace OpenTween
                 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(),
                                   Post.Source};
                 itm = new ImageListViewItem(sitem, this.IconCache, Post.ImageUrl);
             }
-            itm.StateImageIndex = Post.StateIndex;
+            itm.StateIndex = Post.StateIndex;
 
             bool read = Post.IsRead;
             //未読管理していなかったら既読として扱う
@@ -5294,6 +5187,45 @@ namespace OpenTween
             return itm;
         }
 
+        /// <summary>
+        /// 全てのタブの振り分けルールを反映し直します
+        /// </summary>
+        private void ApplyPostFilters()
+        {
+            try
+            {
+                this.Cursor = Cursors.WaitCursor;
+
+                this.PurgeListViewItemCache();
+                this._curPost = null;
+                this._curItemIndex = -1;
+                this._statuses.FilterAll();
+
+                foreach (TabPage tabPage in this.ListTab.TabPages)
+                {
+                    var tab = this._statuses.Tabs[tabPage.Text];
+
+                    var listview = (DetailsListView)tabPage.Tag;
+                    listview.VirtualListSize = tab.AllCount;
+
+                    if (this.SettingDialog.TabIconDisp)
+                    {
+                        if (tab.UnreadCount > 0)
+                            tabPage.ImageIndex = 0;
+                        else
+                            tabPage.ImageIndex = -1;
+                    }
+                }
+
+                if (!this.SettingDialog.TabIconDisp)
+                    this.ListTab.Refresh();
+            }
+            finally
+            {
+                this.Cursor = Cursors.Default;
+            }
+        }
+
         private void MyList_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
         {
             e.DrawDefault = true;
@@ -5309,10 +5241,10 @@ namespace OpenTween
         {
             if (e.State == 0) return;
             e.DrawDefault = false;
+
+            SolidBrush brs2 = null;
             if (!e.Item.Selected)     //e.ItemStateでうまく判定できない???
             {
-                SolidBrush brs2 = null;
-
                 if (e.Item.BackColor == _clSelf)
                     brs2 = _brsBackColorMine;
                 else if (e.Item.BackColor == _clAtSelf)
@@ -5327,18 +5259,17 @@ namespace OpenTween
                     brs2 = _brsBackColorAtTo;
                 else
                     brs2 = _brsBackColorNone;
-
-                e.Graphics.FillRectangle(brs2, e.Bounds);
             }
             else
             {
                 //選択中の行
                 if (((Control)sender).Focused)
-                    e.Graphics.FillRectangle(_brsHighLight, e.Bounds);
+                    brs2 = _brsHighLight;
                 else
-                    e.Graphics.FillRectangle(_brsDeactiveSelection, e.Bounds);
+                    brs2 = _brsDeactiveSelection;
             }
-            if ((e.State & ListViewItemStates.Focused) == ListViewItemStates.Focused) e.DrawFocusRectangle();
+            e.Graphics.FillRectangle(brs2, e.Bounds);
+            e.DrawFocusRectangle();
             this.DrawListViewItemIcon(e);
         }
 
@@ -5351,18 +5282,19 @@ namespace OpenTween
                 //アイコン以外の列
                 RectangleF rct = e.Bounds;
                 rct.Width = e.Header.Width;
+                int fontHeight = e.Item.Font.Height;
                 if (_iconCol)
                 {
-                    rct.Y += e.Item.Font.Height;
-                    rct.Height -= e.Item.Font.Height;
+                    rct.Y += fontHeight;
+                    rct.Height -= fontHeight;
                 }
 
                 int heightDiff;
-                int drawLineCount = Math.Max(1, Math.DivRem((int)rct.Height, e.Item.Font.Height, out heightDiff));
+                int drawLineCount = Math.Max(1, Math.DivRem((int)rct.Height, fontHeight, out heightDiff));
 
-                //if (heightDiff > e.Item.Font.Height * 0.7)
+                //if (heightDiff > fontHeight * 0.7)
                 //{
-                //    rct.Height += e.Item.Font.Height;
+                //    rct.Height += fontHeight;
                 //    drawLineCount += 1;
                 //}
 
@@ -5370,13 +5302,13 @@ namespace OpenTween
                 if (!_iconCol && drawLineCount <= 1)
                 {
                     //rct.Inflate(0, heightDiff / -2);
-                    //rct.Height += e.Item.Font.Height / 2;
+                    //rct.Height += fontHeight / 2;
                 }
-                else if (heightDiff < e.Item.Font.Height * 0.7)
+                else if (heightDiff < fontHeight * 0.7)
                 {
                     //最終行が70%以上欠けていたら、最終行は表示しない
-                    //rct.Height = (float)((e.Item.Font.Height * drawLineCount) + (e.Item.Font.Height / 2));
-                    rct.Height = (e.Item.Font.Height * drawLineCount) - 1;
+                    //rct.Height = (float)((fontHeight * drawLineCount) + (fontHeight / 2));
+                    rct.Height = (fontHeight * drawLineCount) - 1;
                 }
                 else
                 {
@@ -5385,8 +5317,8 @@ namespace OpenTween
 
                 //if (!_iconCol && drawLineCount > 1)
                 //{
-                //    rct.Y += e.Item.Font.Height * 0.2;
-                //    if (heightDiff >= e.Item.Font.Height * 0.8) rct.Height -= e.Item.Font.Height * 0.2;
+                //    rct.Y += fontHeight * 0.2;
+                //    if (heightDiff >= fontHeight * 0.8) rct.Height -= fontHeight * 0.2;
                 //}
 
                 if (rct.Width > 0)
@@ -5397,9 +5329,9 @@ namespace OpenTween
 
                     if (_iconCol)
                     {
-                        RectangleF rctB = e.Bounds;
+                        Rectangle rctB = e.Bounds;
                         rctB.Width = e.Header.Width;
-                        rctB.Height = e.Item.Font.Height;
+                        rctB.Height = fontHeight;
 
                         using (Font fnt = new Font(e.Item.Font, FontStyle.Bold))
                         {
@@ -5415,7 +5347,7 @@ namespace OpenTween
                             TextRenderer.DrawText(e.Graphics,
                                                     e.Item.SubItems[4].Text + " / " + e.Item.SubItems[1].Text + " (" + e.Item.SubItems[3].Text + ") " + e.Item.SubItems[5].Text + e.Item.SubItems[6].Text + " [" + e.Item.SubItems[7].Text + "]",
                                                     fnt,
-                                                    Rectangle.Round(rctB),
+                                                    rctB,
                                                     color,
                                                     TextFormatFlags.SingleLine |
                                                     TextFormatFlags.EndEllipsis |
@@ -5455,16 +5387,22 @@ namespace OpenTween
 
         private void DrawListViewItemIcon(DrawListViewItemEventArgs e)
         {
+            if (_iconSz == 0) return;
+
             ImageListViewItem item = (ImageListViewItem)e.Item;
 
             //e.Bounds.Leftが常に0を指すから自前で計算
             Rectangle itemRect = item.Bounds;
-            itemRect.Width = e.Item.ListView.Columns[0].Width;
+            var col0 = e.Item.ListView.Columns[0];
+            itemRect.Width = col0.Width;
 
-            foreach (ColumnHeader clm in e.Item.ListView.Columns)
+            if (col0.DisplayIndex > 0)
             {
-                if (clm.DisplayIndex < e.Item.ListView.Columns[0].DisplayIndex)
-                    itemRect.X += clm.Width;
+                foreach (ColumnHeader clm in e.Item.ListView.Columns)
+                {
+                    if (clm.DisplayIndex < col0.DisplayIndex)
+                        itemRect.X += clm.Width;
+                }
             }
 
             // ディスプレイの DPI 設定を考慮したアイコンサイズ
@@ -5472,42 +5410,40 @@ namespace OpenTween
             var realStateSize = new SizeF(16 * this.currentScaleFactor.Width, 16 * this.currentScaleFactor.Height).ToSize();
 
             Rectangle iconRect;
-            Rectangle stateRect;
-            if (item.Image != null)
+            var img = item.Image;
+            if (img != null)
             {
                 iconRect = Rectangle.Intersect(new Rectangle(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, realIconSize), itemRect);
                 iconRect.Offset(0, Math.Max(0, (itemRect.Height - realIconSize.Height) / 2));
-                stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + iconRect.Width + 2, iconRect.Y), realStateSize), itemRect);
+
+                if (iconRect.Width > 0)
+                {
+                    e.Graphics.FillRectangle(Brushes.White, iconRect);
+                    e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
+                    try
+                    {
+                        e.Graphics.DrawImage(img.Image, iconRect);
+                    }
+                    catch (ArgumentException)
+                    {
+                        item.RefreshImageAsync();
+                    }
+                }
             }
             else
             {
                 iconRect = Rectangle.Intersect(new Rectangle(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, new Size(1, 1)), itemRect);
                 //iconRect.Offset(0, Math.Max(0, (itemRect.Height - realIconSize.Height) / 2));
-                stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + iconRect.Width + 2, iconRect.Y), realStateSize), itemRect);
-            }
-
-            var img = item.Image;
-            if (img != null && iconRect.Width > 0)
-            {
-                e.Graphics.FillRectangle(Brushes.White, iconRect);
-                e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
-                try
-                {
-                    e.Graphics.DrawImage(img.Image, iconRect);
-                }
-                catch (ArgumentException)
-                {
-                    item.RefreshImage();
-                }
             }
 
-            if (item.StateImageIndex > -1)
+            if (item.StateIndex > -1)
             {
+                Rectangle stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + realIconSize.Width + 2, iconRect.Y), realStateSize), itemRect);
                 if (stateRect.Width > 0)
                 {
                     //e.Graphics.FillRectangle(Brushes.White, stateRect);
                     //e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.High;
-                    e.Graphics.DrawImage(this.PostStateImageList.Images[item.StateImageIndex], stateRect);
+                    e.Graphics.DrawImage(this.PostStateImageList.Images[item.StateIndex], stateRect);
                 }
             }
         }
@@ -5704,69 +5640,113 @@ namespace OpenTween
 
         private void MenuItemSubSearch_Click(object sender, EventArgs e)
         {
-            //検索メニュー
-            SearchDialog.Owner = this;
-            if (SearchDialog.ShowDialog() == DialogResult.Cancel)
+            // 検索メニュー
+            this.ShowSearchDialog();
+        }
+
+        private void MenuItemSearchNext_Click(object sender, EventArgs e)
+        {
+            var previousSearch = this.SearchDialog.ResultOptions;
+            if (previousSearch == null || previousSearch.Type != SearchWordDialog.SearchType.Timeline)
             {
-                this.TopMost = SettingDialog.AlwaysTop;
+                this.SearchDialog.Reset();
+                this.ShowSearchDialog();
                 return;
             }
-            this.TopMost = SettingDialog.AlwaysTop;
 
-            if (!string.IsNullOrEmpty(SearchDialog.SWord))
-            {
-                DoTabSearch(SearchDialog.SWord,
-                            SearchDialog.CheckCaseSensitive,
-                            SearchDialog.CheckRegex,
-                            SEARCHTYPE.DialogSearch);
-            }
+            // 次を検索
+            this.DoTabSearch(
+                previousSearch.Query,
+                previousSearch.CaseSensitive,
+                previousSearch.UseRegex,
+                SEARCHTYPE.NextSearch);
         }
 
-        private void MenuItemSearchNext_Click(object sender, EventArgs e)
+        private void MenuItemSearchPrev_Click(object sender, EventArgs e)
         {
-            //次を検索
-            if (string.IsNullOrEmpty(SearchDialog.SWord))
+            var previousSearch = this.SearchDialog.ResultOptions;
+            if (previousSearch == null || previousSearch.Type != SearchWordDialog.SearchType.Timeline)
             {
-                if (SearchDialog.ShowDialog() == DialogResult.Cancel)
-                {
-                    this.TopMost = SettingDialog.AlwaysTop;
-                    return;
-                }
-                this.TopMost = SettingDialog.AlwaysTop;
-                if (string.IsNullOrEmpty(SearchDialog.SWord)) return;
-
-                DoTabSearch(SearchDialog.SWord,
-                            SearchDialog.CheckCaseSensitive,
-                            SearchDialog.CheckRegex,
-                            SEARCHTYPE.DialogSearch);
+                this.SearchDialog.Reset();
+                this.ShowSearchDialog();
+                return;
             }
+
+            // 前を検索
+            this.DoTabSearch(
+                previousSearch.Query,
+                previousSearch.CaseSensitive,
+                previousSearch.UseRegex,
+                SEARCHTYPE.PrevSearch);
+        }
+
+        /// <summary>
+        /// 検索ダイアログを表示し、検索を実行します
+        /// </summary>
+        private void ShowSearchDialog()
+        {
+            // Recentタブの検索時以外では「新規タブに表示」ボタンを無効化する
+            if (this._statuses.Tabs[this._curTab.Text].TabType == MyCommon.TabUsageType.Home)
+                this.SearchDialog.DisableNewTabButton = false;
             else
+                this.SearchDialog.DisableNewTabButton = true;
+
+            if (this.SearchDialog.ShowDialog(this) != DialogResult.OK)
             {
-                DoTabSearch(SearchDialog.SWord,
-                            SearchDialog.CheckCaseSensitive,
-                            SearchDialog.CheckRegex,
-                            SEARCHTYPE.NextSearch);
+                this.TopMost = this.SettingDialog.AlwaysTop;
+                return;
             }
-        }
+            this.TopMost = this.SettingDialog.AlwaysTop;
 
-        private void MenuItemSearchPrev_Click(object sender, EventArgs e)
-        {
-            //前を検索
-            if (string.IsNullOrEmpty(SearchDialog.SWord))
+            var searchOptions = this.SearchDialog.ResultOptions;
+            if (searchOptions.Type == SearchWordDialog.SearchType.Timeline)
             {
-                if (SearchDialog.ShowDialog() == DialogResult.Cancel)
+                if (searchOptions.NewTab)
                 {
-                    this.TopMost = SettingDialog.AlwaysTop;
-                    return;
+                    var tabName = searchOptions.Query;
+
+                    try
+                    {
+                        tabName = this._statuses.MakeTabName(tabName);
+                    }
+                    catch (TabException ex)
+                    {
+                        MessageBox.Show(this, ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    }
+
+                    this.AddNewTab(tabName, false, MyCommon.TabUsageType.UserDefined);
+                    this._statuses.AddTab(tabName, MyCommon.TabUsageType.UserDefined, null);
+
+                    var filter = new PostFilterRule
+                    {
+                        FilterBody = new[] { searchOptions.Query },
+                        UseRegex = searchOptions.UseRegex,
+                        CaseSensitive = searchOptions.CaseSensitive,
+                    };
+                    this._statuses.Tabs[tabName].AddFilter(filter);
+
+                    var tabPage = this.ListTab.TabPages.Cast<TabPage>()
+                        .First(x => x.Text == tabName);
+
+                    this.ListTab.SelectedTab = tabPage;
+                    this.ListTabSelect(tabPage);
+
+                    this.ApplyPostFilters();
+                    this.SaveConfigsTabs();
+                }
+                else
+                {
+                    this.DoTabSearch(
+                        searchOptions.Query,
+                        searchOptions.CaseSensitive,
+                        searchOptions.UseRegex,
+                        SEARCHTYPE.DialogSearch);
                 }
-                this.TopMost = SettingDialog.AlwaysTop;
-                if (string.IsNullOrEmpty(SearchDialog.SWord)) return;
             }
-
-            DoTabSearch(SearchDialog.SWord,
-                        SearchDialog.CheckCaseSensitive,
-                        SearchDialog.CheckRegex,
-                        SEARCHTYPE.PrevSearch);
+            else if (searchOptions.Type == SearchWordDialog.SearchType.Public)
+            {
+                this.AddNewTabForSearch(searchOptions.Query);
+            }
         }
 
         private void AboutMenuItem_Click(object sender, EventArgs e)
@@ -5784,7 +5764,7 @@ namespace OpenTween
             int idx = -1;
             DetailsListView lst = null;
 
-            if (ImageSelectionPanel.Enabled)
+            if (ImageSelector.Enabled)
                 return;
 
             //現在タブから最終タブまで探索
@@ -5870,9 +5850,9 @@ namespace OpenTween
             }
         }
 
-        private void VerUpMenuItem_Click(object sender, EventArgs e)
+        private async void VerUpMenuItem_Click(object sender, EventArgs e)
         {
-            CheckNewVersion();
+            await this.CheckNewVersion(false);
         }
 
         private void RunTweenUp()
@@ -5892,62 +5872,85 @@ namespace OpenTween
             }
         }
 
-        private void CheckNewVersion(bool startup = false)
+        public class VersionInfo
         {
-            if (ApplicationSettings.VersionInfoUrl == null)
-                return; // 更新チェック無効化
-
-            if (string.IsNullOrEmpty(MyCommon.fileVersion))
-            {
-                return;
-            }
+            public Version Version { get; set; }
+            public Uri DownloadUri { get; set; }
+            public string ReleaseNote { get; set; }
+        }
 
-            string retMsg;
-            try
-            {
-                retMsg = tw.GetVersionInfo();
-            }
-            catch
-            {
-                retMsg = "";
-            }
+        /// <summary>
+        /// OpenTween の最新バージョンの情報を取得します
+        /// </summary>
+        public async Task<VersionInfo> GetVersionInfoAsync()
+        {
+            var versionInfoUrl = new Uri(ApplicationSettings.VersionInfoUrl + "?" +
+                DateTime.Now.ToString("yyMMddHHmmss") + Environment.TickCount);
 
-            if (string.IsNullOrEmpty(retMsg))
-            {
-                StatusLabel.Text = Properties.Resources.CheckNewVersionText9;
-                if (!startup) MessageBox.Show(Properties.Resources.CheckNewVersionText10, MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
-                return;
-            }
+            var responseText = await Networking.Http.GetStringAsync(versionInfoUrl)
+                .ConfigureAwait(false);
 
             // 改行2つで前後パートを分割(前半がバージョン番号など、後半が詳細テキスト)
-            string[] msgPart = retMsg.Split(new string[] {"\n\n", "\r\n\r\n"}, 2, StringSplitOptions.None);
+            var msgPart = responseText.Split(new[] { "\n\n", "\r\n\r\n" }, 2, StringSplitOptions.None);
 
-            string[] msgHeader = msgPart[0].Split(new string[] {"\n", "\r\n"}, StringSplitOptions.None);
-            string msgBody = msgPart.Length == 2 ? msgPart[1] : "";
+            var msgHeader = msgPart[0].Split(new[] { "\n", "\r\n" }, StringSplitOptions.None);
+            var msgBody = msgPart.Length == 2 ? msgPart[1] : "";
 
             msgBody = Regex.Replace(msgBody, "(?<!\r)\n", "\r\n"); // LF -> CRLF
 
-            string currentVersion = msgHeader[0];
-            string downloadUrl = msgHeader[1];
+            return new VersionInfo
+            {
+                Version = Version.Parse(msgHeader[0]),
+                DownloadUri = new Uri(msgHeader[1]),
+                ReleaseNote = msgBody,
+            };
+        }
+
+        private async Task CheckNewVersion(bool startup = false)
+        {
+            if (ApplicationSettings.VersionInfoUrl == null)
+                return; // 更新チェック無効化
 
-            if (currentVersion.Replace(".", "").CompareTo(MyCommon.fileVersion.Replace(".", "")) > 0)
+            try
             {
+                var versionInfo = await this.GetVersionInfoAsync();
+
+                if (versionInfo.Version <= Version.Parse(MyCommon.FileVersion))
+                {
+                    // 更新不要
+                    if (!startup)
+                    {
+                        var msgtext = string.Format(Properties.Resources.CheckNewVersionText7,
+                            MyCommon.GetReadableVersion(), MyCommon.GetReadableVersion(versionInfo.Version));
+                        msgtext = MyCommon.ReplaceAppName(msgtext);
+
+                        MessageBox.Show(msgtext,
+                            MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2),
+                            MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    }
+                    return;
+                }
+
                 using (var dialog = new UpdateDialog())
                 {
-                    dialog.SummaryText = string.Format(Properties.Resources.CheckNewVersionText3, MyCommon.GetReadableVersion(currentVersion));
-                    dialog.DetailsText = msgBody;
+                    dialog.SummaryText = string.Format(Properties.Resources.CheckNewVersionText3,
+                        MyCommon.GetReadableVersion(versionInfo.Version));
+                    dialog.DetailsText = versionInfo.ReleaseNote;
+
                     if (dialog.ShowDialog(this) == DialogResult.Yes)
                     {
-                        this.OpenUriAsync(downloadUrl);
+                        await this.OpenUriAsync(versionInfo.DownloadUri.OriginalString);
                     }
                 }
             }
-            else
+            catch (Exception)
             {
+                this.StatusLabel.Text = Properties.Resources.CheckNewVersionText9;
                 if (!startup)
                 {
-                    var msgtext = MyCommon.ReplaceAppName(string.Format(Properties.Resources.CheckNewVersionText7, MyCommon.GetReadableVersion(), MyCommon.GetReadableVersion(currentVersion)));
-                    MessageBox.Show(msgtext, MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2), MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    MessageBox.Show(Properties.Resources.CheckNewVersionText10,
+                        MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2),
+                        MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
                 }
             }
         }
@@ -5983,7 +5986,7 @@ namespace OpenTween
             return detailHtmlFormatHeader + orgdata + detailHtmlFormatFooter;
         }
 
-        private void DisplayItemImage_Downloaded(object sender, EventArgs e)
+        private async void DisplayItemImage_Downloaded(object sender, EventArgs e)
         {
             if (sender.Equals(displayItem))
             {
@@ -5992,7 +5995,10 @@ namespace OpenTween
                 var img = displayItem.Image;
                 try
                 {
-                    UserPicture.Image = img != null ? img.Clone() : null;
+                    if (img != null)
+                        img = await img.CloneAsync();
+
+                    UserPicture.Image = img;
                 }
                 catch (Exception)
                 {
@@ -6006,17 +6012,29 @@ namespace OpenTween
             DispSelectedPost(false);
         }
 
-        private static PostClass displaypost = new PostClass();
+        private PostClass displayPost = new PostClass();
+
+        /// <summary>
+        /// サムネイルの表示処理を表すタスク
+        /// </summary>
+        private Task thumbnailTask = null;
+
+        /// <summary>
+        /// サムネイル表示に使用する CancellationToken の生成元
+        /// </summary>
+        private CancellationTokenSource thumbnailTokenSource = null;
 
         private void DispSelectedPost(bool forceupdate)
         {
             if (_curList.SelectedIndices.Count == 0 || _curPost == null)
                 return;
 
-            if (!forceupdate && _curPost.Equals(displaypost))
+            var oldDisplayPost = this.displayPost;
+            this.displayPost = this._curPost;
+
+            if (!forceupdate && this._curPost.Equals(oldDisplayPost))
                 return;
 
-            displaypost = _curPost;
             if (displayItem != null)
             {
                 displayItem.ImageDownloaded -= this.DisplayItemImage_Downloaded;
@@ -6025,153 +6043,147 @@ namespace OpenTween
             displayItem = (ImageListViewItem)_curList.Items[_curList.SelectedIndices[0]];
             displayItem.ImageDownloaded += this.DisplayItemImage_Downloaded;
 
-            string dTxt = createDetailHtml(_curPost.IsDeleted ? "(DELETED)" : _curPost.Text);
-            if (_curPost.IsDm)
+            using (ControlTransaction.Update(this.TableLayoutPanel1))
             {
-                SourceLinkLabel.Tag = null;
-                SourceLinkLabel.Text = "";
-            }
-            else
-            {
-                Match mc = Regex.Match(_curPost.SourceHtml, "<a href=\"(?<sourceurl>.+?)\"");
-                if (mc.Success)
+                var sourceText = "";
+                string sourceUrl = null;
+                if (!_curPost.IsDm)
                 {
-                    string src = mc.Groups["sourceurl"].Value;
-                    SourceLinkLabel.Tag = mc.Groups["sourceurl"].Value;
-                    mc = Regex.Match(src, "^https?://");
-                    if (!mc.Success)
+                    var mc = Regex.Match(_curPost.SourceHtml, "<a href=\"(?<sourceurl>.+?)\"");
+                    if (mc.Success)
                     {
-                        src = src.Insert(0, "https://twitter.com");
+                        var src = mc.Groups["sourceurl"].Value;
+                        if (Regex.IsMatch(src, "^https?://"))
+                            sourceUrl = src;
+                        else
+                            sourceUrl = "https://twitter.com/" + src;
                     }
-                    SourceLinkLabel.Tag = src;
-                }
-                else
-                {
-                    SourceLinkLabel.Tag = null;
+
+                    if (_curPost.Source != null)
+                        sourceText = _curPost.Source;
                 }
-                if (string.IsNullOrEmpty(_curPost.Source))
+                SourceLinkLabel.Text = sourceText;
+                SourceLinkLabel.Tag = sourceUrl;
+                SourceLinkLabel.TabStop = false; // Text を更新すると勝手に true にされる
+
+                string nameText;
+                if (_curPost.IsDm)
                 {
-                    SourceLinkLabel.Text = "";
-                    //SourceLinkLabel.Visible = false;
+                    if (_curPost.IsOwl)
+                        nameText = "DM FROM <- ";
+                    else
+                        nameText = "DM TO -> ";
                 }
                 else
                 {
-                    SourceLinkLabel.Text = _curPost.Source;
-                    //SourceLinkLabel.Visible = true;
+                    nameText = "";
                 }
-            }
-            SourceLinkLabel.TabStop = false;
+                nameText += _curPost.ScreenName + "/" + _curPost.Nickname;
+                if (_curPost.RetweetedId != null)
+                    nameText += " (RT:" + _curPost.RetweetedBy + ")";
 
-            if (_statuses.Tabs[_curTab.Text].TabType == MyCommon.TabUsageType.DirectMessage && !_curPost.IsOwl)
-            {
-                NameLabel.Text = "DM TO -> ";
-            }
-            else if (_statuses.Tabs[_curTab.Text].TabType == MyCommon.TabUsageType.DirectMessage)
-            {
-                NameLabel.Text = "DM FROM <- ";
-            }
-            else
-            {
-                NameLabel.Text = "";
-            }
-            NameLabel.Text += _curPost.ScreenName + "/" + _curPost.Nickname;
-            NameLabel.Tag = _curPost.ScreenName;
-            if (!string.IsNullOrEmpty(_curPost.RetweetedBy))
-            {
-                NameLabel.Text += " (RT:" + _curPost.RetweetedBy + ")";
-            }
+                NameLabel.Text = nameText;
+                NameLabel.Tag = _curPost.ScreenName;
 
-            this.ClearUserPicture();
+                var nameForeColor = SystemColors.ControlText;
+                if (_curPost.IsOwl && (this._cfgCommon.OneWayLove || _curPost.IsDm))
+                    nameForeColor = this._clOWL;
+                if (_curPost.RetweetedId != null)
+                    nameForeColor = this._clRetweet;
+                if (_curPost.IsFav)
+                    nameForeColor = this._clFav;
+                NameLabel.ForeColor = nameForeColor;
 
-            if (!string.IsNullOrEmpty(_curPost.ImageUrl))
-            {
-                var image = IconCache.TryGetFromCache(_curPost.ImageUrl);
-                try
+                this.ClearUserPicture();
+
+                if (!string.IsNullOrEmpty(_curPost.ImageUrl))
                 {
-                    UserPicture.Image = image != null ? image.Clone() : null;
+                    var image = IconCache.TryGetFromCache(_curPost.ImageUrl);
+                    try
+                    {
+                        UserPicture.Image = image != null ? image.Clone() : null;
+                    }
+                    catch (Exception)
+                    {
+                        UserPicture.ShowErrorImage();
+                    }
                 }
-                catch (Exception)
+
+                DateTimeLabel.Text = _curPost.CreatedAt.ToString();
+
+                if (DumpPostClassToolStripMenuItem.Checked)
                 {
-                    UserPicture.ShowErrorImage();
-                }
-            }
+                    StringBuilder sb = new StringBuilder(512);
 
-            NameLabel.ForeColor = System.Drawing.SystemColors.ControlText;
-            DateTimeLabel.Text = _curPost.CreatedAt.ToString();
-            if (_curPost.IsOwl && (SettingDialog.OneWayLove || _statuses.Tabs[_curTab.Text].TabType == MyCommon.TabUsageType.DirectMessage)) NameLabel.ForeColor = _clOWL;
-            if (_curPost.RetweetedId != null) NameLabel.ForeColor = _clRetweet;
-            if (_curPost.IsFav) NameLabel.ForeColor = _clFav;
-
-            if (DumpPostClassToolStripMenuItem.Checked)
-            {
-                StringBuilder sb = new StringBuilder(512);
-
-                sb.Append("-----Start PostClass Dump<br>");
-                sb.AppendFormat("TextFromApi           : {0}<br>", _curPost.TextFromApi);
-                sb.AppendFormat("(PlainText)    : <xmp>{0}</xmp><br>", _curPost.TextFromApi);
-                sb.AppendFormat("StatusId             : {0}<br>", _curPost.StatusId.ToString());
-                //sb.AppendFormat("ImageIndex     : {0}<br>", _curPost.ImageIndex.ToString());
-                sb.AppendFormat("ImageUrl       : {0}<br>", _curPost.ImageUrl);
-                sb.AppendFormat("InReplyToStatusId    : {0}<br>", _curPost.InReplyToStatusId.ToString());
-                sb.AppendFormat("InReplyToUser  : {0}<br>", _curPost.InReplyToUser);
-                sb.AppendFormat("IsDM           : {0}<br>", _curPost.IsDm.ToString());
-                sb.AppendFormat("IsFav          : {0}<br>", _curPost.IsFav.ToString());
-                sb.AppendFormat("IsMark         : {0}<br>", _curPost.IsMark.ToString());
-                sb.AppendFormat("IsMe           : {0}<br>", _curPost.IsMe.ToString());
-                sb.AppendFormat("IsOwl          : {0}<br>", _curPost.IsOwl.ToString());
-                sb.AppendFormat("IsProtect      : {0}<br>", _curPost.IsProtect.ToString());
-                sb.AppendFormat("IsRead         : {0}<br>", _curPost.IsRead.ToString());
-                sb.AppendFormat("IsReply        : {0}<br>", _curPost.IsReply.ToString());
-            
-                foreach (string nm in _curPost.ReplyToList)
-                {
-                    sb.AppendFormat("ReplyToList    : {0}<br>", nm);
-                }
-
-                sb.AppendFormat("ScreenName           : {0}<br>", _curPost.ScreenName);
-                sb.AppendFormat("NickName       : {0}<br>", _curPost.Nickname);
-                sb.AppendFormat("Text   : {0}<br>", _curPost.Text);
-                sb.AppendFormat("(PlainText)    : <xmp>{0}</xmp><br>", _curPost.Text);
-                sb.AppendFormat("CreatedAt          : {0}<br>", _curPost.CreatedAt.ToString());
-                sb.AppendFormat("Source         : {0}<br>", _curPost.Source);
-                sb.AppendFormat("UserId            : {0}<br>", _curPost.UserId);
-                sb.AppendFormat("FilterHit      : {0}<br>", _curPost.FilterHit);
-                sb.AppendFormat("RetweetedBy    : {0}<br>", _curPost.RetweetedBy);
-                sb.AppendFormat("RetweetedId    : {0}<br>", _curPost.RetweetedId);
-                sb.AppendFormat("SearchTabName  : {0}<br>", _curPost.RelTabName);
-                sb.Append("-----End PostClass Dump<br>");
-
-                PostBrowser.Visible = false;
-                PostBrowser.DocumentText = detailHtmlFormatHeader + sb.ToString() + detailHtmlFormatFooter;
-                PostBrowser.Visible = true;
-            }
-            else
-            {
-                try
+                    sb.Append("-----Start PostClass Dump<br>");
+                    sb.AppendFormat("TextFromApi           : {0}<br>", _curPost.TextFromApi);
+                    sb.AppendFormat("(PlainText)    : <xmp>{0}</xmp><br>", _curPost.TextFromApi);
+                    sb.AppendFormat("StatusId             : {0}<br>", _curPost.StatusId.ToString());
+                    //sb.AppendFormat("ImageIndex     : {0}<br>", _curPost.ImageIndex.ToString());
+                    sb.AppendFormat("ImageUrl       : {0}<br>", _curPost.ImageUrl);
+                    sb.AppendFormat("InReplyToStatusId    : {0}<br>", _curPost.InReplyToStatusId.ToString());
+                    sb.AppendFormat("InReplyToUser  : {0}<br>", _curPost.InReplyToUser);
+                    sb.AppendFormat("IsDM           : {0}<br>", _curPost.IsDm.ToString());
+                    sb.AppendFormat("IsFav          : {0}<br>", _curPost.IsFav.ToString());
+                    sb.AppendFormat("IsMark         : {0}<br>", _curPost.IsMark.ToString());
+                    sb.AppendFormat("IsMe           : {0}<br>", _curPost.IsMe.ToString());
+                    sb.AppendFormat("IsOwl          : {0}<br>", _curPost.IsOwl.ToString());
+                    sb.AppendFormat("IsProtect      : {0}<br>", _curPost.IsProtect.ToString());
+                    sb.AppendFormat("IsRead         : {0}<br>", _curPost.IsRead.ToString());
+                    sb.AppendFormat("IsReply        : {0}<br>", _curPost.IsReply.ToString());
+
+                    foreach (string nm in _curPost.ReplyToList)
+                    {
+                        sb.AppendFormat("ReplyToList    : {0}<br>", nm);
+                    }
+
+                    sb.AppendFormat("ScreenName           : {0}<br>", _curPost.ScreenName);
+                    sb.AppendFormat("NickName       : {0}<br>", _curPost.Nickname);
+                    sb.AppendFormat("Text   : {0}<br>", _curPost.Text);
+                    sb.AppendFormat("(PlainText)    : <xmp>{0}</xmp><br>", _curPost.Text);
+                    sb.AppendFormat("CreatedAt          : {0}<br>", _curPost.CreatedAt.ToString());
+                    sb.AppendFormat("Source         : {0}<br>", _curPost.Source);
+                    sb.AppendFormat("UserId            : {0}<br>", _curPost.UserId);
+                    sb.AppendFormat("FilterHit      : {0}<br>", _curPost.FilterHit);
+                    sb.AppendFormat("RetweetedBy    : {0}<br>", _curPost.RetweetedBy);
+                    sb.AppendFormat("RetweetedId    : {0}<br>", _curPost.RetweetedId);
+                    sb.AppendFormat("SearchTabName  : {0}<br>", _curPost.RelTabName);
+                    sb.Append("-----End PostClass Dump<br>");
+
+                    PostBrowser.DocumentText = detailHtmlFormatHeader + sb.ToString() + detailHtmlFormatFooter;
+                }
+                else
                 {
-                    if (PostBrowser.DocumentText != dTxt)
+                    // 同じIDのツイートであれば WebBrowser とサムネイルの更新を行わない
+                    // (同一ツイートの RT は文面が同じであるため同様に更新しない)
+                    if (_curPost.StatusId != oldDisplayPost.StatusId)
                     {
-                        PostBrowser.Visible = false;
-                        PostBrowser.DocumentText = dTxt;
+                        this.PostBrowser.DocumentText =
+                            this.createDetailHtml(_curPost.IsDeleted ? "(DELETED)" : _curPost.Text);
+
+                        this.PostBrowser.Document.Window.ScrollTo(0, 0);
 
                         this.SplitContainer3.Panel2Collapsed = true;
 
                         if (this.IsPreviewEnable)
-                            this.tweetThumbnail1.ShowThumbnailAsync(_curPost);
+                        {
+                            if (this.thumbnailTokenSource != null)
+                            {
+                                var oldTokenSource = this.thumbnailTokenSource;
+
+                                var cancelTask = Task.Run(() => oldTokenSource.Cancel());
+
+                                Task.WhenAll(this.thumbnailTask, cancelTask)
+                                    .ContinueWith(_ => oldTokenSource.Dispose(), TaskScheduler.Default);
+                            }
+
+                            this.thumbnailTokenSource = new CancellationTokenSource();
+
+                            var token = this.thumbnailTokenSource.Token;
+                            this.thumbnailTask = this.tweetThumbnail1.ShowThumbnailAsync(_curPost, token);
+                        }
                     }
                 }
-                catch (System.Runtime.InteropServices.COMException)
-                {
-                    //原因不明
-                }
-                catch (UriFormatException)
-                {
-                    PostBrowser.DocumentText = dTxt;
-                }
-                finally
-                {
-                    PostBrowser.Visible = true;
-                }
             }
         }
 
@@ -6300,10 +6312,10 @@ namespace OpenTween
                             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)
@@ -6599,10 +6611,10 @@ namespace OpenTween
                             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以外
@@ -7351,16 +7363,11 @@ namespace OpenTween
             string inReplyToTabName;
             long inReplyToId = _curPost.InReplyToStatusId.Value;
             string inReplyToUser = _curPost.InReplyToUser;
-            Dictionary<long, PostClass> curTabPosts;
-
-            if (_statuses.Tabs[_curTab.Text].IsInnerStorageTabType)
-                curTabPosts = curTabClass.Posts;
-            else
-                curTabPosts = _statuses.Posts;
+            //Dictionary<long, PostClass> curTabPosts = curTabClass.Posts;
 
             var inReplyToPosts = from tab in _statuses.Tabs.Values
                                  orderby tab != curTabClass
-                                 from post in ((Dictionary<long, PostClass>)(tab.IsInnerStorageTabType ? tab.Posts : _statuses.Posts)).Values
+                                 from post in tab.Posts.Values
                                  where post.StatusId == inReplyToId
                                  let index = tab.IndexOf(post.StatusId)
                                  where index != -1
@@ -7420,14 +7427,14 @@ namespace OpenTween
             if (_curPost == null) return;
 
             TabClass curTabClass = _statuses.Tabs[_curTab.Text];
-            Dictionary<long, PostClass> curTabPosts = curTabClass.IsInnerStorageTabType ? curTabClass.Posts : _statuses.Posts;
+            //Dictionary<long, PostClass> curTabPosts = curTabClass.Posts;
 
             if (parallel)
             {
                 if (_curPost.InReplyToStatusId != null)
                 {
                     var posts = from t in _statuses.Tabs
-                                from p in t.Value.IsInnerStorageTabType ? t.Value.Posts : _statuses.Posts
+                                from p in t.Value.Posts
                                 where p.Value.StatusId != _curPost.StatusId && p.Value.InReplyToStatusId == _curPost.InReplyToStatusId
                                 let indexOf = t.Value.IndexOf(p.Value.StatusId)
                                 where indexOf > -1
@@ -7464,7 +7471,7 @@ namespace OpenTween
                 if (replyChains == null || replyChains.Count < 1)
                 {
                     var posts = from t in _statuses.Tabs
-                                from p in t.Value.IsInnerStorageTabType ? t.Value.Posts : _statuses.Posts
+                                from p in t.Value.Posts
                                 where p.Value.InReplyToStatusId == _curPost.StatusId
                                 let indexOf = t.Value.IndexOf(p.Value.StatusId)
                                 where indexOf > -1
@@ -7519,35 +7526,78 @@ namespace OpenTween
 
         private void GoBackSelectPostChain()
         {
-            try
+            if (this.selectPostChains.Count > 1)
             {
-                this.selectPostChains.Pop();
-                Tuple<TabPage, PostClass> tabPostPair = this.selectPostChains.Pop();
-                if (!this.ListTab.TabPages.Contains(tabPostPair.Item1)) return;
-                this.ListTab.SelectedTab = tabPostPair.Item1;
-                if (tabPostPair.Item2 != null && this._statuses.Tabs[this._curTab.Text].IndexOf(tabPostPair.Item2.StatusId) > -1)
+                var idx = -1;
+                TabPage tp = null;
+
+                do
                 {
-                    this.SelectListItem(this._curList, this._statuses.Tabs[this._curTab.Text].IndexOf(tabPostPair.Item2.StatusId));
-                    this._curList.EnsureVisible(this._statuses.Tabs[this._curTab.Text].IndexOf(tabPostPair.Item2.StatusId));
+                    try
+                    {
+                        this.selectPostChains.Pop();
+                        var tabPostPair = this.selectPostChains.Peek();
+
+                        if (!this.ListTab.TabPages.Contains(tabPostPair.Item1)) continue;  //該当タブが存在しないので無視
+
+                        if (tabPostPair.Item2 != null)
+                        {
+                            idx = this._statuses.Tabs[tabPostPair.Item1.Text].IndexOf(tabPostPair.Item2.StatusId);
+                            if (idx == -1) continue;  //該当ポストが存在しないので無視
+                        }
+
+                        tp = tabPostPair.Item1;
+
+                        this.selectPostChains.Pop();
+                    }
+                    catch (InvalidOperationException)
+                    {
+                    }
+
+                    break;
                 }
-            }
-            catch (InvalidOperationException)
-            {
+                while (this.selectPostChains.Count > 1);
+
+                if (tp == null)
+                {
+                    //状態がおかしいので処理を中断
+                    //履歴が残り1つであればクリアしておく
+                    if (this.selectPostChains.Count == 1)
+                        this.selectPostChains.Clear();
+                    return;
+                }
+
+                DetailsListView lst = (DetailsListView)tp.Tag;
+                this.ListTab.SelectedTab = tp;
+                if (idx > -1)
+                {
+                    SelectListItem(lst, idx);
+                    lst.EnsureVisible(idx);
+                }
+                lst.Focus();
             }
         }
 
         private void PushSelectPostChain()
         {
-            if (this.selectPostChains.Count == 0 || (this.selectPostChains.Peek().Item1.Text != this._curTab.Text || this._curPost != this.selectPostChains.Peek().Item2))
+            int count = this.selectPostChains.Count;
+            if (count > 0)
             {
-                this.selectPostChains.Push(Tuple.Create(this._curTab, _curPost));
+                var p = this.selectPostChains.Peek();
+                if (p.Item1 == this._curTab)
+                {
+                    if (p.Item2 == this._curPost) return;  //最新の履歴と同一
+                    if (p.Item2 == null) this.selectPostChains.Pop();  //置き換えるため削除
+                }
             }
+            if (count >= 2500) TrimPostChain();
+            this.selectPostChains.Push(Tuple.Create(this._curTab, this._curPost));
         }
 
         private void TrimPostChain()
         {
-            if (this.selectPostChains.Count < 2000) return;
-            Stack<Tuple<TabPage, PostClass>> p = new Stack<Tuple<TabPage, PostClass>>();
+            if (this.selectPostChains.Count <= 2000) return;
+            var p = new Stack<Tuple<TabPage, PostClass>>(2000);
             for (int i = 0; i < 2000; i++)
             {
                 p.Push(this.selectPostChains.Pop());
@@ -7652,7 +7702,7 @@ namespace OpenTween
 
         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());
@@ -7672,42 +7722,21 @@ namespace OpenTween
                 _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;
@@ -7720,7 +7749,6 @@ namespace OpenTween
                 _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)
@@ -7730,10 +7758,8 @@ namespace OpenTween
                 _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.SortOrder = (int)_statuses.SortOrder;
@@ -7790,17 +7816,16 @@ namespace OpenTween
                 _cfgCommon.AllAtReply = tw.AllAtReply;
                 _cfgCommon.OpenUserTimeline = SettingDialog.OpenUserTimeline;
                 _cfgCommon.ListCountApi = SettingDialog.ListCountApi;
-                _cfgCommon.UseImageService = ImageServiceCombo.SelectedIndex;
-                _cfgCommon.UseImageServiceName = this.ImageService;
+                _cfgCommon.UseImageService = ImageSelector.ServiceIndex;
+                _cfgCommon.UseImageServiceName = ImageSelector.ServiceName;
                 _cfgCommon.ListDoubleClickAction = SettingDialog.ListDoubleClickAction;
                 _cfgCommon.UserAppointUrl = SettingDialog.UserAppointUrl;
-                _cfgCommon.HideDuplicatedRetweets = SettingDialog.HideDuplicatedRetweets;
-                _cfgCommon.IsPreviewFoursquare = SettingDialog.IsPreviewFoursquare;
+                _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;
@@ -7821,8 +7846,6 @@ namespace OpenTween
                 _cfgLocal.PreviewDistance = _mySpDis3;
                 _cfgLocal.StatusMultiline = StatusText.Multiline;
                 _cfgLocal.StatusTextHeight = _mySpDis2;
-                _cfgLocal.AdSplitterDistance = _myAdSpDis;
-                _cfgLocal.StatusText = SettingDialog.Status;
 
                 _cfgLocal.FontUnread = _fntUnread;
                 _cfgLocal.ColorUnread = _clUnread;
@@ -7847,7 +7870,6 @@ namespace OpenTween
                 _cfgLocal.FontInputFont = _fntInputFont;
 
                 _cfgLocal.BrowserPath = SettingDialog.BrowserPath;
-                _cfgLocal.UseRecommendStatus = SettingDialog.UseRecommendStatus;
                 _cfgLocal.ProxyType = SettingDialog.SelectedProxyType;
                 _cfgLocal.ProxyAddress = SettingDialog.ProxyAddress;
                 _cfgLocal.ProxyPort = SettingDialog.ProxyPort;
@@ -7868,7 +7890,7 @@ namespace OpenTween
             tabSetting.Save();
         }
 
-        private /* async */ void OpenURLFileMenuItem_Click(object sender, EventArgs e)
+        private async void OpenURLFileMenuItem_Click(object sender, EventArgs e)
         {
             string inputText;
             var ret = InputDialog.Show(this, Properties.Resources.OpenURL_InputText, Properties.Resources.OpenURL_Caption, out inputText);
@@ -7884,40 +7906,40 @@ namespace OpenTween
             }
 
             var statusId = long.Parse(match.Groups["StatusId"].Value);
-            var uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();
 
-            Task.Factory.StartNew(() =>
+            var post = this._statuses[statusId];
+            if (post == null)
+            {
+                try
                 {
-                    var post = this._statuses[statusId];
-                    if (post == null)
+                    post = await Task.Run(() =>
                     {
-                        var err = this.tw.GetStatusApi(false, statusId, ref post);
+                        PostClass newPost = null;
+
+                        var err = this.tw.GetStatusApi(false, statusId, ref newPost);
                         if (!string.IsNullOrEmpty(err))
                             throw new WebApiException(err);
-                    }
-                    return post;
-                }, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default)
-                .ContinueWith(t =>
-                {
-                    if (t.IsFaulted)
-                    {
-                        t.Exception.Flatten().Handle(x => x is WebApiException);
 
-                        var message = t.Exception.InnerException.Message;
-                        MessageBox.Show(this, string.Format(Properties.Resources.OpenURL_LoadFailed, message),
-                            Properties.Resources.OpenURL_Caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return newPost;
+                    });
+                }
+                catch (WebApiException ex)
+                {
+                    var message = ex.Message;
+                    MessageBox.Show(this, string.Format(Properties.Resources.OpenURL_LoadFailed, message),
+                        Properties.Resources.OpenURL_Caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+            }
 
-                        return;
-                    }
-                    try
-                    {
-                        this.OpenRelatedTab(t.Result);
-                    }
-                    catch (TabException ex)
-                    {
-                        MessageBox.Show(this, ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    }
-                }, uiScheduler);
+            try
+            {
+                this.OpenRelatedTab(post);
+            }
+            catch (TabException ex)
+            {
+                MessageBox.Show(this, ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
         }
 
         private void SaveLogMenuItem_Click(object sender, EventArgs e)
@@ -8731,55 +8753,29 @@ namespace OpenTween
 
         private void SoundFileComboBox_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (soundfileListup || string.IsNullOrEmpty(_rclickTabName)) return;
-
-            _statuses.Tabs[_rclickTabName].SoundFile = (string)((ToolStripComboBox)sender).SelectedItem;
-
-            SaveConfigsTabs();
-        }
-
-        private void DeleteTabMenuItem_Click(object sender, EventArgs e)
-        {
-            if (string.IsNullOrEmpty(_rclickTabName) || sender == this.DeleteTbMenuItem) _rclickTabName = ListTab.SelectedTab.Text;
-
-            RemoveSpecifiedTab(_rclickTabName, true);
-            SaveConfigsTabs();
-        }
-
-        private void FilterEditMenuItem_Click(object sender, EventArgs e)
-        {
-            if (string.IsNullOrEmpty(_rclickTabName)) _rclickTabName = _statuses.GetTabByType(MyCommon.TabUsageType.Home).TabName;
-            fltDialog.SetCurrent(_rclickTabName);
-            fltDialog.ShowDialog(this);
-            this.TopMost = SettingDialog.AlwaysTop;
-
-            try
-            {
-                this.Cursor = Cursors.WaitCursor;
-                this.PurgeListViewItemCache();
-                _curPost = null;
-                _curItemIndex = -1;
-                _statuses.FilterAll();
-                foreach (TabPage tb in ListTab.TabPages)
-                {
-                    ((DetailsListView)tb.Tag).VirtualListSize = _statuses.Tabs[tb.Text].AllCount;
-                    if (_statuses.Tabs[tb.Text].UnreadCount > 0)
-                    {
-                        if (SettingDialog.TabIconDisp)
-                            tb.ImageIndex = 0;
-                    }
-                    else
-                    {
-                        if (SettingDialog.TabIconDisp)
-                            tb.ImageIndex = -1;
-                    }
-                }
-                if (!SettingDialog.TabIconDisp) ListTab.Refresh();
-            }
-            finally
-            {
-                this.Cursor = Cursors.Default;
-            }
+            if (soundfileListup || string.IsNullOrEmpty(_rclickTabName)) return;
+
+            _statuses.Tabs[_rclickTabName].SoundFile = (string)((ToolStripComboBox)sender).SelectedItem;
+
+            SaveConfigsTabs();
+        }
+
+        private void DeleteTabMenuItem_Click(object sender, EventArgs e)
+        {
+            if (string.IsNullOrEmpty(_rclickTabName) || sender == this.DeleteTbMenuItem) _rclickTabName = ListTab.SelectedTab.Text;
+
+            RemoveSpecifiedTab(_rclickTabName, true);
+            SaveConfigsTabs();
+        }
+
+        private void FilterEditMenuItem_Click(object sender, EventArgs e)
+        {
+            if (string.IsNullOrEmpty(_rclickTabName)) _rclickTabName = _statuses.GetTabByType(MyCommon.TabUsageType.Home).TabName;
+            fltDialog.SetCurrent(_rclickTabName);
+            fltDialog.ShowDialog(this);
+            this.TopMost = SettingDialog.AlwaysTop;
+
+            this.ApplyPostFilters();
             SaveConfigsTabs();
         }
 
@@ -8829,7 +8825,7 @@ namespace OpenTween
                     {
                         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);
                     }
                 }
             }
@@ -8857,33 +8853,7 @@ namespace OpenTween
                 this.TopMost = SettingDialog.AlwaysTop;
             }
 
-            try
-            {
-                this.Cursor = Cursors.WaitCursor;
-                this.PurgeListViewItemCache();
-                _curPost = null;
-                _curItemIndex = -1;
-                _statuses.FilterAll();
-                foreach (TabPage tb in ListTab.TabPages)
-                {
-                    ((DetailsListView)tb.Tag).VirtualListSize = _statuses.Tabs[tb.Text].AllCount;
-                    if (_statuses.Tabs[tb.Text].UnreadCount > 0)
-                    {
-                        if (SettingDialog.TabIconDisp)
-                            tb.ImageIndex = 0;
-                    }
-                    else
-                    {
-                        if (SettingDialog.TabIconDisp)
-                            tb.ImageIndex = -1;
-                    }
-                }
-                if (!SettingDialog.TabIconDisp) ListTab.Refresh();
-            }
-            finally
-            {
-                this.Cursor = Cursors.Default;
-            }
+            this.ApplyPostFilters();
             SaveConfigsTabs();
             if (this.ListTab.SelectedTab != null &&
                 ((DetailsListView)this.ListTab.SelectedTab.Tag).SelectedIndices.Count > 0)
@@ -8902,7 +8872,7 @@ namespace OpenTween
                     bool _NewLine = false;
                     bool _Post = false;
 
-                    if (SettingDialog.PostCtrlEnter) //Ctrl+Enter投稿時
+                    if (this._cfgCommon.PostCtrlEnter) //Ctrl+Enter投稿時
                     {
                         if (StatusText.Multiline)
                         {
@@ -8916,7 +8886,7 @@ namespace OpenTween
                         }
 
                     }
-                    else if (SettingDialog.PostShiftEnter) //SHift+Enter投稿時
+                    else if (this._cfgCommon.PostShiftEnter) //SHift+Enter投稿時
                     {
                         if (StatusText.Multiline)
                         {
@@ -9031,36 +9001,7 @@ namespace OpenTween
                 if (AtIdSupl.ItemCount != cnt) _modifySettingAtId = true;
             }
 
-            try
-            {
-                this.Cursor = Cursors.WaitCursor;
-                this.PurgeListViewItemCache();
-                _curPost = null;
-                _curItemIndex = -1;
-                _statuses.FilterAll();
-                foreach (TabPage tb in ListTab.TabPages)
-                {
-                    ((DetailsListView)tb.Tag).VirtualListSize = _statuses.Tabs[tb.Text].AllCount;
-                    if (_statuses.ContainsTab(tb.Text))
-                    {
-                        if (_statuses.Tabs[tb.Text].UnreadCount > 0)
-                        {
-                            if (SettingDialog.TabIconDisp)
-                                tb.ImageIndex = 0;
-                        }
-                        else
-                        {
-                            if (SettingDialog.TabIconDisp)
-                                tb.ImageIndex = -1;
-                        }
-                    }
-                }
-                if (!SettingDialog.TabIconDisp) ListTab.Refresh();
-            }
-            finally
-            {
-                this.Cursor = Cursors.Default;
-            }
+            this.ApplyPostFilters();
             SaveConfigsTabs();
         }
 
@@ -9339,10 +9280,10 @@ namespace OpenTween
                 SettingDialog.DispLatestPost != MyCommon.DispTitleEnum.Ver &&
                 SettingDialog.DispLatestPost != MyCommon.DispTitleEnum.OwnStatus)
             {
-                foreach (string key in _statuses.Tabs.Keys)
+                foreach (var tab in _statuses.Tabs.Values)
                 {
-                    ur += _statuses.Tabs[key].UnreadCount;
-                    al += _statuses.Tabs[key].AllCount;
+                    ur += tab.UnreadCount;
+                    al += tab.AllCount;
                 }
             }
 
@@ -9402,14 +9343,14 @@ namespace OpenTween
             StringBuilder slbl = new StringBuilder(256);
             try
             {
-                foreach (string key in _statuses.Tabs.Keys)
+                foreach (var tab in _statuses.Tabs.Values)
                 {
-                    ur += _statuses.Tabs[key].UnreadCount;
-                    al += _statuses.Tabs[key].AllCount;
-                    if (key.Equals(_curTab.Text))
+                    ur += tab.UnreadCount;
+                    al += tab.AllCount;
+                    if (_curTab != null && tab.TabName.Equals(_curTab.Text))
                     {
-                        tur = _statuses.Tabs[key].UnreadCount;
-                        tal = _statuses.Tabs[key].AllCount;
+                        tur = tab.UnreadCount;
+                        tal = tab.AllCount;
                     }
                 }
             }
@@ -9422,13 +9363,13 @@ namespace OpenTween
             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();
         }
@@ -9520,7 +9461,7 @@ namespace OpenTween
             // 本当にリプライ先指定すべきかどうかの判定
             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)
@@ -9578,11 +9519,6 @@ namespace OpenTween
                 //_mySize = this.ClientSize;                     //サイズ保持(最小化・最大化されたまま終了した場合の対応用)
                 this.DesktopLocation = _cfgLocal.FormLocation;
                 //_myLoc = this.DesktopLocation;                        //位置保持(最小化・最大化されたまま終了した場合の対応用)
-                //if (_cfgLocal.AdSplitterDistance > this.SplitContainer4.Panel1MinSize &&
-                //    _cfgLocal.AdSplitterDistance < this.SplitContainer4.Height - this.SplitContainer4.Panel2MinSize - this.SplitContainer4.SplitterWidth)
-                //{
-                //    this.SplitContainer4.SplitterDistance = _cfgLocal.AdSplitterDistance; //Splitterの位置設定
-                //}
                 if (_cfgLocal.SplitterDistance > this.SplitContainer1.Panel1MinSize &&
                     _cfgLocal.SplitterDistance < this.SplitContainer1.Height - this.SplitContainer1.Panel2MinSize - this.SplitContainer1.SplitterWidth)
                 {
@@ -9788,28 +9724,20 @@ namespace OpenTween
             OpenUriAsync(name.Remove(name.LastIndexOf("_normal"), 7)); // "_normal".Length
         }
 
-        private /* async */ void ReloadIconToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void ReloadIconToolStripMenuItem_Click(object sender, EventArgs e)
         {
             if (this._curPost == null) return;
 
-            var imageUrl = this._curPost.ImageUrl;
-            var uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();
+            await this.UserPicture.SetImageFromTask(async () =>
+            {
+                var imageUrl = this._curPost.ImageUrl;
 
-            this.IconCache.DownloadImageAsync(imageUrl, force: true)
-                .ContinueWith(t =>
-                {
-                    this.ClearUserPicture();
+                var image = await this.IconCache.DownloadImageAsync(imageUrl, force: true)
+                    .ConfigureAwait(false);
 
-                    if (t.IsFaulted)
-                    {
-                        t.Exception.Flatten().Handle(x => x is WebException || x is InvalidImageException || x is TaskCanceledException);
-                        this.UserPicture.ShowErrorImage();
-                    }
-                    else
-                    {
-                        this.UserPicture.Image = t.Result.Clone() ;
-                    }
-                }, uiScheduler);
+                return await image.CloneAsync()
+                    .ConfigureAwait(false);
+            });
         }
 
         private void SaveOriginalSizeIconPictureToolStripMenuItem_Click(object sender, EventArgs e)
@@ -9893,7 +9821,7 @@ namespace OpenTween
             _modifySettingLocal = true;
         }
 
-        private bool UrlConvert(MyCommon.UrlConverter Converter_Type)
+        private async Task<bool> UrlConvertAsync(MyCommon.UrlConverter Converter_Type)
         {
             //t.coで投稿時自動短縮する場合は、外部サービスでの短縮禁止
             //if (SettingDialog.UrlConvertAuto && SettingDialog.ShortenTco) return;
@@ -9925,7 +9853,9 @@ namespace OpenTween
                         //短縮URL変換 日本語を含むかもしれないのでURLエンコードする
                         try
                         {
-                            result = ShortUrl.Instance.ShortenUrl(Converter_Type, tmp);
+                            var srcUri = new Uri(MyCommon.urlEncodeMultibyteChar(tmp));
+                            var resultUri = await ShortUrl.Instance.ShortenUrlAsync(Converter_Type, srcUri);
+                            result = resultUri.ToString();
                         }
                         catch (WebApiException e)
                         {
@@ -9992,7 +9922,18 @@ namespace OpenTween
                         //短縮URL変換 日本語を含むかもしれないのでURLエンコードする
                         try
                         {
-                            result = ShortUrl.Instance.ShortenUrl(Converter_Type, tmp);
+                            var srcUri = new Uri(MyCommon.urlEncodeMultibyteChar(tmp));
+                            var resultUri = await ShortUrl.Instance.ShortenUrlAsync(Converter_Type, srcUri);
+                            result = resultUri.ToString();
+                        }
+                        catch (HttpRequestException e)
+                        {
+                            // 例外のメッセージが「Response status code does not indicate success: 500 (Internal Server Error).」
+                            // のように長いので「:」が含まれていればそれ以降のみを抽出する
+                            var message = e.Message.Split(new[] { ':' }, count: 2).Last();
+
+                            this.StatusLabel.Text = Converter_Type + ":" + message;
+                            continue;
                         }
                         catch (WebApiException e)
                         {
@@ -10049,29 +9990,29 @@ namespace OpenTween
             }
         }
 
-        private void TinyURLToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void TinyURLToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.TinyUrl);
+            await UrlConvertAsync(MyCommon.UrlConverter.TinyUrl);
         }
 
-        private void IsgdToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void IsgdToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.Isgd);
+            await UrlConvertAsync(MyCommon.UrlConverter.Isgd);
         }
 
-        private void TwurlnlToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void TwurlnlToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.Twurl);
+            await UrlConvertAsync(MyCommon.UrlConverter.Twurl);
         }
 
-        private void UxnuMenuItem_Click(object sender, EventArgs e)
+        private async void UxnuMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.Uxnu);
+            await UrlConvertAsync(MyCommon.UrlConverter.Uxnu);
         }
 
-        private void UrlConvertAutoToolStripMenuItem_Click(object sender, EventArgs e) 
+        private async void UrlConvertAutoToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            if (!UrlConvert(SettingDialog.AutoShortUrlFirst))
+            if (!await UrlConvertAsync(SettingDialog.AutoShortUrlFirst))
             {
                 MyCommon.UrlConverter svc = SettingDialog.AutoShortUrlFirst;
                 Random rnd = new Random();
@@ -10081,7 +10022,7 @@ namespace OpenTween
                     svc = (MyCommon.UrlConverter)rnd.Next(System.Enum.GetNames(typeof(MyCommon.UrlConverter)).Length);
                 }
                 while (svc == SettingDialog.AutoShortUrlFirst || svc == MyCommon.UrlConverter.Nicoms || svc == MyCommon.UrlConverter.Unu);
-                UrlConvert(svc);
+                await UrlConvertAsync(svc);
             }
         }
 
@@ -10454,14 +10395,20 @@ namespace OpenTween
 
             if (_selText != null)
             {
-                SearchDialog.SWord = _selText;
-                SearchDialog.CheckCaseSensitive = false;
-                SearchDialog.CheckRegex = false;
+                var searchOptions = new SearchWordDialog.SearchOptions(
+                    SearchWordDialog.SearchType.Timeline,
+                    _selText,
+                    newTab: false,
+                    caseSensitive: false,
+                    useRegex: false);
 
-                DoTabSearch(SearchDialog.SWord,
-                            SearchDialog.CheckCaseSensitive,
-                            SearchDialog.CheckRegex,
-                            SEARCHTYPE.NextSearch);
+                this.SearchDialog.ResultOptions = searchOptions;
+
+                this.DoTabSearch(
+                    searchOptions.Query,
+                    searchOptions.CaseSensitive,
+                    searchOptions.UseRegex,
+                    SEARCHTYPE.NextSearch);
             }
         }
 
@@ -10475,15 +10422,7 @@ namespace OpenTween
         {
             if (e.Data.GetDataPresent(DataFormats.FileDrop))
             {
-                ImageSelectionPanel.Visible = true;
-                ImageSelectionPanel.Enabled = true;
-                TimelinePanel.Visible = false;
-                TimelinePanel.Enabled = false;
-                ImagefilePathText.Text = ((string[])e.Data.GetData(DataFormats.FileDrop, false))[0];
-                ImageFromSelectedFile();
-                this.Activate();
-                this.BringToFront();
-                StatusText.Focus();
+                SelectMedia_DragDrop(e);
             }
             else if (e.Data.GetDataPresent("UniformResourceLocatorW"))
             {
@@ -10559,30 +10498,19 @@ namespace OpenTween
             throw new NotSupportedException("サポートされていないデータ形式です: " + data.GetFormats()[0]);
         }
 
-        private void TweenMain_DragOver(object sender, DragEventArgs e)
+        private void TweenMain_DragEnter(object sender, DragEventArgs e)
         {
             if (e.Data.GetDataPresent(DataFormats.FileDrop))
             {
-                string filename = ((string[])e.Data.GetData(DataFormats.FileDrop, false))[0];
-                FileInfo fl = new FileInfo(filename);
-                string ext = fl.Extension;
+                SelectMedia_DragEnter(e);
+            }
+        }
 
-                if (!string.IsNullOrEmpty(this.ImageService) && this.pictureService[this.ImageService].CheckValidFilesize(ext, fl.Length))
-                {
-                    e.Effect = DragDropEffects.Copy;
-                    return;
-                }
-                foreach (string svc in ImageServiceCombo.Items)
-                {
-                    if (string.IsNullOrEmpty(svc)) continue;
-                    if (this.pictureService[svc].CheckValidFilesize(ext, fl.Length))
-                    {
-                        ImageServiceCombo.SelectedItem = svc;
-                        e.Effect = DragDropEffects.Copy;
-                        return;
-                    }
-                }
-                e.Effect = DragDropEffects.None;
+        private void TweenMain_DragOver(object sender, DragEventArgs e)
+        {
+            if (e.Data.GetDataPresent(DataFormats.FileDrop))
+            {
+                SelectMedia_DragOver(e);
             }
             else if (e.Data.GetDataPresent("UniformResourceLocatorW"))
             {
@@ -10608,7 +10536,7 @@ namespace OpenTween
 
         public Task OpenUriAsync(string UriString)
         {
-            return Task.Factory.StartNew(() =>
+            return Task.Run(() =>
             {
                 string myPath = UriString;
 
@@ -10821,10 +10749,10 @@ namespace OpenTween
             MenuItemUserStream.Enabled = true;
             StopToolStripMenuItem.Text = "&Start";
             StopToolStripMenuItem.Enabled = true;
-            if (SettingDialog.UserstreamStartup) tw.StartUserStream();
+            if (this._cfgCommon.UserstreamStartup) tw.StartUserStream();
         }
 
-        private void TweenMain_Shown(object sender, EventArgs e)
+        private async void TweenMain_Shown(object sender, EventArgs e)
         {
             try
             {
@@ -10839,46 +10767,43 @@ namespace OpenTween
 
             if (this.IsNetworkAvailable())
             {
-                GetTimeline(MyCommon.WORKERTYPE.BlockIds, 0, 0, "");
-                GetTimeline(MyCommon.WORKERTYPE.NoRetweetIds, 0, 0, "");
-                if (SettingDialog.StartupFollowers)
+                this.RefreshMuteUserIdsAsync();
+                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="":全タブ
-                int i = 0;
-                int j = 0;
-                while (IsInitialRead() && !MyCommon._endingFlag)
+                GetTimeline(MyCommon.WORKERTYPE.List, 1, "");  //tabname="":全タブ
+
+                var i = 0;
+                while (this.IsInitialRead())
                 {
-                    System.Threading.Thread.Sleep(100);
-                    Application.DoEvents();
+                    await Task.Delay(5000);
+
                     i += 1;
-                    j += 1;
-                    if (j > 1200) break; // 120秒間初期処理が終了しなかったら強制的に打ち切る
-                    if (i > 50)
-                    {
-                        if (MyCommon._endingFlag)
-                            return;
-                        i = 0;
-                    }
+                    if (i > 24) break; // 120秒間初期処理が終了しなかったら強制的に打ち切る
+
+                    if (MyCommon._endingFlag)
+                        return;
                 }
 
                 if (MyCommon._endingFlag) return;
@@ -10886,8 +10811,8 @@ namespace OpenTween
                 if (ApplicationSettings.VersionInfoUrl != null)
                 {
                     //バージョンチェック(引数:起動時チェックの場合はtrue・・・チェック結果のメッセージを表示しない)
-                    if (SettingDialog.StartupVersion)
-                        CheckNewVersion(true);
+                    if (this._cfgCommon.StartupVersion)
+                        await this.CheckNewVersion(true);
                 }
                 else
                 {
@@ -10898,16 +10823,16 @@ namespace OpenTween
                 }
 
                 // 取得失敗の場合は再試行する
-                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)
@@ -10930,7 +10855,7 @@ namespace OpenTween
 
         private void doGetFollowersMenu()
         {
-            GetTimeline(MyCommon.WORKERTYPE.Follower, 1, 0, "");
+            GetTimeline(MyCommon.WORKERTYPE.Follower, 1, "");
             DispSelectedPost(true);
         }
 
@@ -11006,7 +10931,7 @@ namespace OpenTween
                         _DoFavRetweetFlags = false;
                         return;
                     }
-                    if (!SettingDialog.RetweetNoConfirm)
+                    if (!this._cfgCommon.RetweetNoConfirm)
                     {
                         string Questiontext = Properties.Resources.RetweetQuestion1;
                         if (_DoFavRetweetFlags) Questiontext = Properties.Resources.FavoritesRetweetQuestionText2;
@@ -11136,14 +11061,14 @@ namespace OpenTween
             TabRename(ref _rclickTabName);
         }
 
-        private void BitlyToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void BitlyToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.Bitly);
+            await UrlConvertAsync(MyCommon.UrlConverter.Bitly);
         }
 
-        private void JmpToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void JmpToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            UrlConvert(MyCommon.UrlConverter.Jmp);
+            await UrlConvertAsync(MyCommon.UrlConverter.Jmp);
         }
 
 
@@ -11308,7 +11233,6 @@ namespace OpenTween
                 public string id = "";
                 public bool isFollowing = false;
                 public bool isFollowed = false;
-                public bool isError = false;
                 public FriendshipInfo(string id)
                 {
                     this.id = id;
@@ -11327,7 +11251,6 @@ namespace OpenTween
                 if (!string.IsNullOrEmpty(rt))
                 {
                     if (string.IsNullOrEmpty(result)) result = rt;
-                    fInfo.isError = true;
                 }
             }
             e.Result = result;
@@ -11590,7 +11513,6 @@ namespace OpenTween
             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;
@@ -11636,13 +11558,13 @@ namespace OpenTween
                 cmb.Text = tb.SearchWords;
                 cmb.SelectAll();
                 DetailsListView lst = (DetailsListView)pnl.Parent.Tag;
+                this.PurgeListViewItemCache();
                 lst.VirtualListSize = 0;
-                lst.Items.Clear();
                 _statuses.ClearTabIds(tbName);
                 SaveConfigsTabs();   //検索条件の保存
             }
 
-            GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, 0, tbName);
+            GetTimeline(MyCommon.WORKERTYPE.PublicSearch, 1, tbName);
             ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
         }
 
@@ -11758,33 +11680,7 @@ namespace OpenTween
                 fc.FilterByUrl = false;
                 _statuses.Tabs[tabName].AddFilter(fc);
 
-                try
-                {
-                    this.Cursor = Cursors.WaitCursor;
-                    this.PurgeListViewItemCache();
-                    _curPost = null;
-                    _curItemIndex = -1;
-                    _statuses.FilterAll();
-                    foreach (TabPage tb in ListTab.TabPages)
-                    {
-                        ((DetailsListView)tb.Tag).VirtualListSize = _statuses.Tabs[tb.Text].AllCount;
-                        if (_statuses.Tabs[tb.Text].UnreadCount > 0)
-                        {
-                            if (SettingDialog.TabIconDisp)
-                                tb.ImageIndex = 0;
-                        }
-                        else
-                        {
-                            if (SettingDialog.TabIconDisp)
-                                tb.ImageIndex = -1;
-                        }
-                    }
-                    if (!SettingDialog.TabIconDisp) ListTab.Refresh();
-                }
-                finally
-                {
-                    this.Cursor = Cursors.Default;
-                }
+                this.ApplyPostFilters();
                 SaveConfigsTabs();
             }
         }
@@ -11858,7 +11754,7 @@ namespace OpenTween
             Match m = Regex.Match(this._postBrowserStatusText, @"^https?://twitter.com/search\?q=%23(?<hash>.+)$");
             if (m.Success)
             {
-                HashMgr.SetPermanentHash("#" + m.Result("${hash}"));
+                HashMgr.SetPermanentHash("#" + Uri.UnescapeDataString(m.Result("${hash}")));
                 HashStripSplitButton.Text = HashMgr.UseHash;
                 HashToggleMenuItem.Checked = true;
                 HashToggleToolStripMenuItem.Checked = true;
@@ -12124,7 +12020,7 @@ namespace OpenTween
         {
             public Twitter tw;
             public string id;
-            public TwitterDataModel.User user;
+            public TwitterUser user;
         }
 
         private void GetUserInfo_DoWork(object sender, DoWorkEventArgs e)
@@ -12135,7 +12031,7 @@ namespace OpenTween
 
         private void doShowUserStatus(string id, bool ShowInputDialog)
         {
-            TwitterDataModel.User user = null;
+            TwitterUser user = null;
             GetUserInfoArgs args = new GetUserInfoArgs();
             if (ShowInputDialog)
             {
@@ -12190,15 +12086,18 @@ namespace OpenTween
             }
         }
 
-        private void doShowUserStatus(TwitterDataModel.User user)
+        private async void doShowUserStatus(TwitterUser user)
         {
-            using (ShowUserInfo userinfo = new ShowUserInfo())
+            using (var userDialog = new UserInfoDialog(this, this.tw))
             {
-                userinfo.Owner = this;
-                userinfo.User = user;
-                userinfo.ShowDialog(this);
+                var showUserTask = userDialog.ShowUserAsync(user);
+                userDialog.ShowDialog(this);
+
                 this.Activate();
                 this.BringToFront();
+
+                // ユーザー情報の表示が完了するまで userDialog を破棄しない
+                await showUserTask;
             }
         }
 
@@ -12329,6 +12228,7 @@ namespace OpenTween
         public TweenMain()
         {
             _hookGlobalHotkey = new HookGlobalHotkey(this);
+
             // この呼び出しは、Windows フォーム デザイナで必要です。
             InitializeComponent();
 
@@ -12340,12 +12240,16 @@ namespace OpenTween
             this.gh.NotifyClicked += GrowlHelper_Callback;
 
             // メイリオフォント指定時にタブの最小幅が広くなる問題の対策
-            this.ListTab.HandleCreated += (s, e) => Win32Api.SetMinTabWidth((TabControl)s, 40);
+            this.ListTab.HandleCreated += (s, e) => NativeMethods.SetMinTabWidth((TabControl)s, 40);
 
             this._apiGauge = new ToolStripAPIGauge();
             this._apiGauge.BorderSides = ToolStripStatusLabelBorderSides.Right;
             this.StatusStrip1.Items.Insert(2, this._apiGauge);
 
+            this.ImageSelector.Visible = false;
+            this.ImageSelector.Enabled = false;
+            this.ImageSelector.FilePickDialog = OpenFileDialog1;
+
             this.ReplaceAppName();
         }
 
@@ -12402,254 +12306,73 @@ namespace OpenTween
 #region "画像投稿"
         private void ImageSelectMenuItem_Click(object sender, EventArgs e)
         {
-            if (ImageSelectionPanel.Visible == true)
-            {
-                ImagefilePathText.CausesValidation = false;
-                TimelinePanel.Visible = true;
-                TimelinePanel.Enabled = true;
-                ImageSelectionPanel.Visible = false;
-                ImageSelectionPanel.Enabled = false;
-                ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
-                ImagefilePathText.CausesValidation = true;
-            }
+            if (ImageSelector.Visible)
+                ImageSelector.EndSelection();
             else
-            {
-                ImageSelectionPanel.Visible = true;
-                ImageSelectionPanel.Enabled = true;
-                TimelinePanel.Visible = false;
-                TimelinePanel.Enabled = false;
-                ImagefilePathText.Focus();
-            }
+                ImageSelector.BeginSelection();
         }
 
-        private void FilePickButton_Click(object sender, EventArgs e)
+        private void SelectMedia_DragEnter(DragEventArgs e)
         {
-            if (string.IsNullOrEmpty(this.ImageService)) return;
-            OpenFileDialog1.Filter = this.pictureService[this.ImageService].GetFileOpenDialogFilter();
-            OpenFileDialog1.Title = Properties.Resources.PickPictureDialog1;
-            OpenFileDialog1.FileName = "";
-
-            try
+            if (ImageSelector.HasUploadableService(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0], true))
             {
-                this.AllowDrop = false;
-                if (OpenFileDialog1.ShowDialog() == DialogResult.Cancel) return;
-            }
-            finally
-            {
-                this.AllowDrop = true;
+                e.Effect = DragDropEffects.Copy;
+                return;
             }
-
-            ImagefilePathText.Text = OpenFileDialog1.FileName;
-            ImageFromSelectedFile();
+            e.Effect = DragDropEffects.None;
         }
 
-        private void ImagefilePathText_Validating(object sender, CancelEventArgs e)
+        private void SelectMedia_DragOver(DragEventArgs e)
         {
-            if (ImageCancelButton.Focused)
-            {
-                ImagefilePathText.CausesValidation = false;
-                return;
-            }
-            ImagefilePathText.Text = ImagefilePathText.Text.Trim();
-            if (string.IsNullOrEmpty(ImagefilePathText.Text))
-            {
-                ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-            }
-            else
-            {
-                ImageFromSelectedFile();
-            }
+            //何も触らない
         }
 
-        private void ImageFromSelectedFile()
+        private void SelectMedia_DragDrop(DragEventArgs e)
         {
-            try
-            {
-                if (string.IsNullOrEmpty(ImagefilePathText.Text.Trim()) || string.IsNullOrEmpty(this.ImageService))
-                {
-                    ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                    ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                    ImagefilePathText.Text = "";
-                    return;
-                }
-
-                FileInfo fl = new FileInfo(ImagefilePathText.Text.Trim());
-                if (!this.pictureService[this.ImageService].CheckValidExtension(fl.Extension))
-                {
-                    //画像以外の形式
-                    ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                    ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                    ImagefilePathText.Text = "";
-                    return;
-                }
-
-                if (!this.pictureService[this.ImageService].CheckValidFilesize(fl.Extension, fl.Length))
-                {
-                    // ファイルサイズが大きすぎる
-                    ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                    ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                    ImagefilePathText.Text = "";
-                    MessageBox.Show("File is too large.");
-                    return;
-                }
-
-                switch (this.pictureService[this.ImageService].GetFileType(fl.Extension))
-                {
-                    case MyCommon.UploadFileType.Invalid:
-                        ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                        ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                        ImagefilePathText.Text = "";
-                        break;
-                    case MyCommon.UploadFileType.Picture:
-                        Image img = null;
-                        using (FileStream fs = new FileStream(ImagefilePathText.Text, FileMode.Open, FileAccess.Read))
-                        {
-                            img = Image.FromStream(fs);
-                        }
-                        ImageSelectedPicture.Image = (new HttpVarious()).CheckValidImage(
-                                    img,
-                                    img.Width,
-                                    img.Height);
-                        ImageSelectedPicture.Tag = MyCommon.UploadFileType.Picture;
-                        break;
-                    case MyCommon.UploadFileType.MultiMedia:
-                        ImageSelectedPicture.Image = Properties.Resources.MultiMediaImage;
-                        ImageSelectedPicture.Tag = MyCommon.UploadFileType.MultiMedia;
-                        break;
-                    default:
-                        ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                        ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                        ImagefilePathText.Text = "";
-                        break;
-                }
-            }
-            catch (FileNotFoundException)
-            {
-                ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                ImagefilePathText.Text = "";
-                MessageBox.Show("File not found.");
-            }
-            catch (Exception)
-            {
-                ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                ImagefilePathText.Text = "";
-                MessageBox.Show("The type of this file is not image.");
-            }
+            this.Activate();
+            this.BringToFront();
+            ImageSelector.BeginSelection(((string[])e.Data.GetData(DataFormats.FileDrop, false))[0]);
+            StatusText.Focus();
         }
 
-        private void ImageSelection_KeyDown(object sender, KeyEventArgs e)
+        private void ImageSelector_BeginSelecting(object sender, EventArgs e)
         {
-            if (e.KeyCode == Keys.Escape)
-            {
-                ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                TimelinePanel.Visible = true;
-                TimelinePanel.Enabled = true;
-                ImageSelectionPanel.Visible = false;
-                ImageSelectionPanel.Enabled = false;
-                ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
-                ImagefilePathText.CausesValidation = true;
-            }
+            TimelinePanel.Visible = false;
+            TimelinePanel.Enabled = false;
         }
 
-        private void ImageSelection_KeyPress(object sender, KeyPressEventArgs e)
+        private void ImageSelector_EndSelecting(object sender, EventArgs e)
         {
-            if (Convert.ToInt32(e.KeyChar) == 0x1B)
-            {
-                ImagefilePathText.CausesValidation = false;
-                e.Handled = true;
-            }
+            TimelinePanel.Visible = true;
+            TimelinePanel.Enabled = true;
+            ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
         }
 
-        private void ImageSelection_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
+        private void ImageSelector_FilePickDialogOpening(object sender, EventArgs e)
         {
-            if (e.KeyCode == Keys.Escape)
-            {
-                ImagefilePathText.CausesValidation = false;
-            }
+            this.AllowDrop = false;
         }
 
-        private void SetImageServiceCombo()
+        private void ImageSelector_FilePickDialogClosed(object sender, EventArgs e)
         {
-            string svc = "";
-            if (ImageServiceCombo.SelectedIndex > -1) svc = ImageServiceCombo.SelectedItem.ToString();
-            ImageServiceCombo.Items.Clear();
-            
-            // Add service names to combobox
-            foreach (var key in pictureService.Keys)
-            {
-                ImageServiceCombo.Items.Add(key);
-            }
-
-            SelectImageServiceComboItem(svc);
+            this.AllowDrop = true;
         }
 
-        private void SelectImageServiceComboItem(string svc, int? index = null)
+        private void ImageSelector_SelectedServiceChanged(object sender, EventArgs e)
         {
-            int idx;
-            if (string.IsNullOrEmpty(svc))
-            {
-                idx = index ?? 0;
-            }
-            else
+            if (ImageSelector.Visible)
             {
-                idx = ImageServiceCombo.Items.IndexOf(svc);
-                if (idx == -1) idx = index ?? 0;
-            }
+                _modifySettingCommon = true;
+                SaveConfigsAll(true);
 
-            try
-            {
-                ImageServiceCombo.SelectedIndex = idx;
-            }
-            catch (ArgumentOutOfRangeException)
-            {
-                ImageServiceCombo.SelectedIndex = 0;
+                if (ImageSelector.ServiceName.Equals("Twitter"))
+                    this.StatusText_TextChanged(null, null);
             }
         }
 
-        private string ImageService
-        {
-            get { return ImageServiceCombo.SelectedItem.ToString(); }
-        }
-
-        private void ImageCancelButton_Click(object sender, EventArgs e)
-        {
-            ImagefilePathText.CausesValidation = false;
-            TimelinePanel.Visible = true;
-            TimelinePanel.Enabled = true;
-            ImageSelectionPanel.Visible = false;
-            ImageSelectionPanel.Enabled = false;
-            ((DetailsListView)ListTab.SelectedTab.Tag).Focus();
-            ImagefilePathText.CausesValidation = true;
-        }
-
-        private void ImageServiceCombo_SelectedIndexChanged(object sender, EventArgs e)
+        private void ImageSelector_VisibleChanged(object sender, EventArgs e)
         {
-            if (ImageSelectedPicture.Tag != null && !string.IsNullOrEmpty(this.ImageService))
-            {
-                try
-                {
-                    FileInfo fi = new FileInfo(ImagefilePathText.Text.Trim());
-                    if (!this.pictureService[this.ImageService].CheckValidFilesize(fi.Extension, fi.Length))
-                    {
-                        ImagefilePathText.Text = "";
-                        ImageSelectedPicture.Image = ImageSelectedPicture.InitialImage;
-                        ImageSelectedPicture.Tag = MyCommon.UploadFileType.Invalid;
-                    }
-                }
-                catch (Exception)
-                {
-                }
-                _modifySettingCommon = true;
-                SaveConfigsAll(false);
-                if (this.ImageService == "Twitter")
-                {
-                    this.StatusText_TextChanged(null, null);
-                }
-            }
+            this.StatusText_TextChanged(null, null);
         }
 #endregion
 
@@ -12786,7 +12509,7 @@ namespace OpenTween
                 }
             }
 
-            this.GetTimeline(MyCommon.WORKERTYPE.Related, 1, 1, tabName);
+            this.GetTimeline(MyCommon.WORKERTYPE.Related, 1, tabName);
         }
 
         private void CacheInfoMenuItem_Click(object sender, EventArgs e)
@@ -12807,7 +12530,7 @@ namespace OpenTween
 #region "Userstream"
         private bool _isActiveUserstream = false;
 
-        private void tw_PostDeleted(long id)
+        private void tw_PostDeleted(object sender, PostDeletedEventArgs e)
         {
             try
             {
@@ -12815,12 +12538,12 @@ namespace OpenTween
                 {
                     Invoke((Action) (() =>
                            {
-                               _statuses.RemovePostReserve(id);
-                               if (_curTab != null && _statuses.Tabs[_curTab.Text].Contains(id))
+                               _statuses.RemovePostReserve(e.StatusId);
+                               if (_curTab != null && _statuses.Tabs[_curTab.Text].Contains(e.StatusId))
                                {
                                    this.PurgeListViewItemCache();
                                    ((DetailsListView)_curTab.Tag).Update();
-                                   if (_curPost != null && _curPost.StatusId == id) DispSelectedPost(true);
+                                   if (_curPost != null && _curPost.StatusId == e.StatusId) DispSelectedPost(true);
                                }
                            }));
                     return;
@@ -12836,7 +12559,7 @@ namespace OpenTween
             }
         }
 
-        private void tw_NewPostFromStream()
+        private void tw_NewPostFromStream(object sender, EventArgs e)
         {
             if (SettingDialog.ReadOldPosts)
             {
@@ -12876,7 +12599,7 @@ namespace OpenTween
                 //before = Now;
             }
 
-            if (SettingDialog.UserstreamPeriodInt > 0) return;
+            if (this._cfgCommon.UserstreamPeriod > 0) return;
 
             try
             {
@@ -12896,14 +12619,14 @@ namespace OpenTween
             }
         }
 
-        private void tw_UserStreamStarted()
+        private void tw_UserStreamStarted(object sender, EventArgs e)
         {
             this._isActiveUserstream = true;
             try
             {
                 if (InvokeRequired && !IsDisposed)
                 {
-                    Invoke(new MethodInvoker(tw_UserStreamStarted));
+                    Invoke((Action)(() => this.tw_UserStreamStarted(sender, e)));
                     return;
                 }
             }
@@ -12924,14 +12647,14 @@ namespace OpenTween
             StatusLabel.Text = "UserStream Started.";
         }
 
-        private void tw_UserStreamStopped()
+        private void tw_UserStreamStopped(object sender, EventArgs e)
         {
             this._isActiveUserstream = false;
             try
             {
                 if (InvokeRequired && !IsDisposed)
                 {
-                    Invoke(new MethodInvoker(tw_UserStreamStopped));
+                    Invoke((Action)(() => this.tw_UserStreamStopped(sender, e)));
                     return;
                 }
             }
@@ -12952,13 +12675,13 @@ namespace OpenTween
             StatusLabel.Text = "UserStream Stopped.";
         }
 
-        private void tw_UserStreamEventArrived(Twitter.FormattedEvent ev)
+        private void tw_UserStreamEventArrived(object sender, UserStreamEventReceivedEventArgs e)
         {
             try
             {
                 if (InvokeRequired && !IsDisposed)
                 {
-                    Invoke(new Action<Twitter.FormattedEvent>(tw_UserStreamEventArrived), ev);
+                    Invoke((Action)(() => this.tw_UserStreamEventArrived(sender, e)));
                     return;
                 }
             }
@@ -12970,6 +12693,7 @@ namespace OpenTween
             {
                 return;
             }
+            var ev = e.EventData;
             StatusLabel.Text = "Event: " + ev.Event;
             //if (ev.Event == "favorite")
             //{
@@ -13180,34 +12904,38 @@ namespace OpenTween
             OpenUriAsync(MyCommon.TwitterUrl + tw.Username);
         }
 
-        private void doTranslation(string str)
+        private async Task doTranslation(string str)
         {
-            Bing _bing = new Bing();
-            string buf = "";
-            if (string.IsNullOrEmpty(str)) return;
-            string srclng = "";
-            string dstlng = SettingDialog.TranslateLanguage;
-            string msg = "";
-            if (srclng != dstlng && _bing.Translate("", dstlng, str, out buf))
+            if (string.IsNullOrEmpty(str))
+                return;
+
+            var bing = new Bing();
+            try
             {
-                PostBrowser.DocumentText = createDetailHtml(buf);
+                var translatedText = await bing.TranslateAsync(str,
+                    langFrom: null,
+                    langTo: this.SettingDialog.TranslateLanguage);
+
+                this.PostBrowser.DocumentText = this.createDetailHtml(translatedText);
             }
-            else
+            catch (HttpRequestException e)
             {
-                if (msg.StartsWith("Err:"))
-                    StatusLabel.Text = msg;
+                this.StatusLabel.Text = "Err:" + e.Message;
             }
         }
 
-        private void TranslationToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void TranslationToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            if (!this.ExistCurrentPost) return;
-            doTranslation(_curPost.TextFromApi);
+            if (!this.ExistCurrentPost)
+                return;
+
+            await this.doTranslation(this._curPost.TextFromApi);
         }
 
-        private void SelectionTranslationToolStripMenuItem_Click(object sender, EventArgs e)
+        private async void SelectionTranslationToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            doTranslation(WebBrowser_GetSelectionText(ref PostBrowser));
+            var text = this.WebBrowser_GetSelectionText(ref this.PostBrowser);
+            await this.doTranslation(text);
         }
 
         private bool ExistCurrentPost
@@ -13329,11 +13057,6 @@ namespace OpenTween
             OpenUserAppointUrl();
         }
 
-        private void ImageSelectionPanel_VisibleChanged(object sender, EventArgs e)
-        {
-            this.StatusText_TextChanged(null, null);
-        }
-
         private void SourceCopyMenuItem_Click(object sender, EventArgs e)
         {
             string selText = SourceLinkLabel.Text;
@@ -13405,6 +13128,12 @@ namespace OpenTween
         private void tweetThumbnail1_ThumbnailLoading(object sender, EventArgs e)
         {
             this.SplitContainer3.Panel2Collapsed = false;
+
+            // PreviewDistance が起動のたびに広がっていく問題の回避策
+            // FixedPanel が Panel2 に設定された状態で Panel2 を開くと、初回だけ SplitterDistance が再計算されておかしくなるため、
+            // None で開いた後に設定するようにする
+            if (this.SplitContainer3.FixedPanel == FixedPanel.None)
+                this.SplitContainer3.FixedPanel = FixedPanel.Panel2;
         }
 
         private void tweetThumbnail1_ThumbnailDoubleClick(object sender, ThumbnailDoubleClickEventArgs e)
@@ -13439,13 +13168,13 @@ namespace OpenTween
 
         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)
@@ -13475,13 +13204,19 @@ namespace OpenTween
 
         private void ChangeListViewIconSize(MyCommon.IconSizes iconSize)
         {
-            if (SettingDialog.IconSz == iconSize) return;
+            if (this._cfgCommon.IconSize == iconSize) return;
 
-            SettingDialog.IconSz = iconSize;
+            var oldIconCol = _iconCol;
 
-            foreach (TabPage tp in ListTab.TabPages)
+            this._cfgCommon.IconSize = iconSize;
+            ApplyListViewIconSize(iconSize);
+
+            if (_iconCol != oldIconCol)
             {
-                ApplyListViewIconSize((DetailsListView)tp.Tag);
+                foreach (TabPage tp in ListTab.TabPages)
+                {
+                    ResetColumns((DetailsListView)tp.Tag);
+                }
             }
 
             if (_curList != null) _curList.Refresh();
@@ -13492,9 +13227,9 @@ namespace OpenTween
         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;
         }