OSDN Git Service

TweetPrvPanelに対する設定値の設定・取得を LoadConfing/SaveConfig メソッドに移動
authorKimura Youichi <kim.upsilon@bucyou.net>
Sat, 26 Jul 2014 16:22:54 +0000 (01:22 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Thu, 31 Jul 2014 16:16:38 +0000 (01:16 +0900)
OpenTween/AppendSettingDialog.cs
OpenTween/Setting/Panel/TweetPrvPanel.cs
OpenTween/Setting/SettingCommon.cs
OpenTween/StatusDictionary.cs
OpenTween/Tween.cs
OpenTween/Twitter.cs

index 8f02d39..019697f 100644 (file)
@@ -54,15 +54,12 @@ namespace OpenTween
         private MyCommon.EVENTTYPE _isMyEventNotifyFlag;
         private string _MyTranslateLanguage;
 
-        public bool HideDuplicatedRetweets;
-
         public bool EnableImgAzyobuziNet { get; set; }
         public bool ImgAzyobuziNetDisabledInDM { get; set; }
         public MapProvider MapThumbnailProvider;
         public int MapThumbnailHeight;
         public int MapThumbnailWidth;
         public int MapThumbnailZoom;
-        public bool IsListStatusesIncludeRts;
         public List<UserAccount> UserAccounts;
         private long? InitialUserId;
         public bool TabMouseLock;
@@ -79,12 +76,14 @@ namespace OpenTween
         {
             this.GetPeriodPanel.LoadConfig(settingCommon);
             this.StartupPanel.LoadConfig(settingCommon);
+            this.TweetPrvPanel.LoadConfig(settingCommon);
         }
 
         public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
         {
             this.GetPeriodPanel.SaveConfig(settingCommon);
             this.StartupPanel.SaveConfig(settingCommon);
+            this.TweetPrvPanel.SaveConfig(settingCommon);
         }
 
         private void TreeViewSetting_BeforeSelect(object sender, TreeViewCancelEventArgs e)
@@ -210,28 +209,9 @@ namespace OpenTween
 #endif
             try
             {
-                switch (this.TweetPrvPanel.IconSize.SelectedIndex)
-                {
-                    case 0:
-                        IconSz = MyCommon.IconSizes.IconNone;
-                        break;
-                    case 1:
-                        IconSz = MyCommon.IconSizes.Icon16;
-                        break;
-                    case 2:
-                        IconSz = MyCommon.IconSizes.Icon24;
-                        break;
-                    case 3:
-                        IconSz = MyCommon.IconSizes.Icon48;
-                        break;
-                    case 4:
-                        IconSz = MyCommon.IconSizes.Icon48_2;
-                        break;
-                }
                 Status = this.TweetActPanel.StatusText.Text;
                 PlaySound = this.ActionPanel.PlaySnd.Checked;
                 UnreadManage = this.ActionPanel.UReadMng.Checked;
-                OneWayLove = this.TweetPrvPanel.OneWayLv.Checked;
 
                 FontUnread = this.FontPanel.lblUnread.Font;     //未使用
                 ColorUnread = this.FontPanel.lblUnread.ForeColor;
@@ -316,8 +296,6 @@ namespace OpenTween
                         DispLatestPost = MyCommon.DispTitleEnum.OwnStatus;
                         break;
                 }
-                SortOrderLock = this.TweetPrvPanel.CheckSortOrderLock.Checked;
-                ViewTabBottom = this.TweetPrvPanel.CheckViewTabBottom.Checked;
                 TinyUrlResolve = this.ShortUrlPanel.CheckTinyURL.Checked;
                 ShortUrl.Instance.DisableExpanding = !TinyUrlResolve;
                 if (this.ProxyPanel.RadioProxyNone.Checked)
@@ -342,8 +320,6 @@ namespace OpenTween
                 ShortenTco = this.ShortUrlPanel.ShortenTcoCheck.Checked;
 
                 Nicoms = this.CooperatePanel.CheckNicoms.Checked;
-                UseUnreadStyle = this.TweetPrvPanel.chkUnreadStyle.Checked;
-                DateTimeFormat = this.TweetPrvPanel.CmbDateTimeFormat.Text;
                 DefaultTimeOut = int.Parse(this.ConnectionPanel.ConnectionTimeOut.Text);
                 RetweetNoConfirm = this.TweetActPanel.CheckRetweetNoConfirm.Checked;
                 LimitBalloon = this.PreviewPanel.CheckBalloonLimit.Checked;
@@ -360,7 +336,6 @@ namespace OpenTween
                 ReadOldPosts = this.ActionPanel.CheckReadOldPosts.Checked;
                 BitlyUser = this.ShortUrlPanel.TextBitlyId.Text;
                 BitlyPwd = this.ShortUrlPanel.TextBitlyPw.Text;
-                ShowGrid = this.TweetPrvPanel.CheckShowGrid.Checked;
                 UseAtIdSupplement = this.TweetActPanel.CheckAtIdSupple.Checked;
                 UseHashSupplement = this.TweetActPanel.CheckHashSupple.Checked;
                 PreviewEnable = this.PreviewPanel.CheckPreviewEnable.Checked;
@@ -415,14 +390,12 @@ namespace OpenTween
                 OpenUserTimeline = this.ActionPanel.CheckOpenUserTimeline.Checked;
                 ListDoubleClickAction = this.ActionPanel.ListDoubleClickActionComboBox.SelectedIndex;
                 UserAppointUrl = this.CooperatePanel.UserAppointUrlText.Text;
-                this.HideDuplicatedRetweets = this.TweetPrvPanel.HideDuplicatedRetweetsCheck.Checked;
                 this.EnableImgAzyobuziNet = this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked;
                 this.ImgAzyobuziNetDisabledInDM = this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
                 this.MapThumbnailProvider = (MapProvider)this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex;
                 this.MapThumbnailHeight = int.Parse(this.CooperatePanel.MapThumbnailHeightTextBox.Text);
                 this.MapThumbnailWidth = int.Parse(this.CooperatePanel.MapThumbnailWidthTextBox.Text);
                 this.MapThumbnailZoom = int.Parse(this.CooperatePanel.MapThumbnailZoomTextBox.Text);
-                this.IsListStatusesIncludeRts = this.TweetPrvPanel.IsListsIncludeRtsCheckBox.Checked;
                 this.TabMouseLock = this.ActionPanel.TabMouseLockCheck.Checked;
                 this.IsRemoveSameEvent = this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked;
                 this.IsNotifyUseGrowl = this.PreviewPanel.IsNotifyUseGrowlCheckBox.Checked;
@@ -532,28 +505,9 @@ namespace OpenTween
                 }
             }
 
-            switch (IconSz)
-            {
-                case MyCommon.IconSizes.IconNone:
-                    this.TweetPrvPanel.IconSize.SelectedIndex = 0;
-                    break;
-                case MyCommon.IconSizes.Icon16:
-                    this.TweetPrvPanel.IconSize.SelectedIndex = 1;
-                    break;
-                case MyCommon.IconSizes.Icon24:
-                    this.TweetPrvPanel.IconSize.SelectedIndex = 2;
-                    break;
-                case MyCommon.IconSizes.Icon48:
-                    this.TweetPrvPanel.IconSize.SelectedIndex = 3;
-                    break;
-                case MyCommon.IconSizes.Icon48_2:
-                    this.TweetPrvPanel.IconSize.SelectedIndex = 4;
-                    break;
-            }
             this.TweetActPanel.StatusText.Text = Status;
             this.ActionPanel.UReadMng.Checked = UnreadManage;
             this.ActionPanel.PlaySnd.Checked = PlaySound;
-            this.TweetPrvPanel.OneWayLv.Checked = OneWayLove;
 
             this.FontPanel.lblListFont.Font = FontReaded;
             this.FontPanel.lblUnread.Font = FontUnread;
@@ -637,8 +591,6 @@ namespace OpenTween
                     this.PreviewPanel.ComboDispTitle.SelectedIndex = 7;
                     break;
             }
-            this.TweetPrvPanel.CheckSortOrderLock.Checked = SortOrderLock;
-            this.TweetPrvPanel.CheckViewTabBottom.Checked = ViewTabBottom;
             this.ShortUrlPanel.CheckTinyURL.Checked = TinyUrlResolve;
             switch (_MyProxyType)
             {
@@ -674,8 +626,6 @@ namespace OpenTween
             this.ShortUrlPanel.ShortenTcoCheck.Enabled = this.ShortUrlPanel.CheckAutoConvertUrl.Checked;
 
             this.CooperatePanel.CheckNicoms.Checked = Nicoms;
-            this.TweetPrvPanel.chkUnreadStyle.Checked = UseUnreadStyle;
-            this.TweetPrvPanel.CmbDateTimeFormat.Text = DateTimeFormat;
             this.ConnectionPanel.ConnectionTimeOut.Text = DefaultTimeOut.ToString();
             this.TweetActPanel.CheckRetweetNoConfirm.Checked = RetweetNoConfirm;
             this.PreviewPanel.CheckBalloonLimit.Checked = LimitBalloon;
@@ -694,7 +644,6 @@ namespace OpenTween
             this.ShortUrlPanel.TextBitlyPw.Text = BitlyPwd;
             this.ShortUrlPanel.TextBitlyId.Modified = false;
             this.ShortUrlPanel.TextBitlyPw.Modified = false;
-            this.TweetPrvPanel.CheckShowGrid.Checked = ShowGrid;
             this.TweetActPanel.CheckAtIdSupple.Checked = UseAtIdSupplement;
             this.TweetActPanel.CheckHashSupple.Checked = UseHashSupplement;
             this.PreviewPanel.CheckPreviewEnable.Checked = PreviewEnable;
@@ -768,14 +717,12 @@ namespace OpenTween
             this.ActionPanel.CheckOpenUserTimeline.Checked = OpenUserTimeline;
             this.ActionPanel.ListDoubleClickActionComboBox.SelectedIndex = ListDoubleClickAction;
             this.CooperatePanel.UserAppointUrlText.Text = UserAppointUrl;
-            this.TweetPrvPanel.HideDuplicatedRetweetsCheck.Checked = this.HideDuplicatedRetweets;
             this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked = this.EnableImgAzyobuziNet;
             this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked = this.ImgAzyobuziNetDisabledInDM;
             this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex = (int)this.MapThumbnailProvider;
             this.CooperatePanel.MapThumbnailHeightTextBox.Text = this.MapThumbnailHeight.ToString();
             this.CooperatePanel.MapThumbnailWidthTextBox.Text = this.MapThumbnailWidth.ToString();
             this.CooperatePanel.MapThumbnailZoomTextBox.Text = this.MapThumbnailZoom.ToString();
-            this.TweetPrvPanel.IsListsIncludeRtsCheckBox.Checked = this.IsListStatusesIncludeRts;
             this.ActionPanel.TabMouseLockCheck.Checked = this.TabMouseLock;
             this.NotifyPanel.IsRemoveSameFavEventCheckBox.Checked = this.IsRemoveSameEvent;
             this.PreviewPanel.IsNotifyUseGrowlCheckBox.Checked = this.IsNotifyUseGrowl;
@@ -996,11 +943,9 @@ namespace OpenTween
             }
         }
 
-        public MyCommon.IconSizes IconSz { get; set; }
         public string Status { get; set; }
         public bool UnreadManage { get; set; }
         public bool PlaySound { get; set; }
-        public bool OneWayLove { get; set; }
         public Font FontUnread { get; set; } /////未使用
         public Color ColorUnread { get; set; }
         public Font FontReaded { get; set; } /////リストフォントとして使用
@@ -1042,7 +987,6 @@ namespace OpenTween
         public string BrowserPath { get; set; }
         public bool TinyUrlResolve { get; set; }
 
-        public bool SortOrderLock { get; set; }
         public ProxyType SelectedProxyType
         {
             get {
@@ -1052,10 +996,6 @@ namespace OpenTween
                 _MyProxyType = value;
             }
         }
-        /// <summary>
-        /// タブを下部に表示するかどうかを取得または設定する
-        /// </summary>
-        public bool ViewTabBottom { get; set; }
 
         public string ProxyAddress { get; set; }
         public int ProxyPort { get; set; }
@@ -1067,8 +1007,6 @@ namespace OpenTween
         public bool ShortenTco { get; set; }
         public bool Nicoms { get; set; }
         public MyCommon.UrlConverter AutoShortUrlFirst { get; set; }
-        public bool UseUnreadStyle { get; set; }
-        public string DateTimeFormat { get; set; }
         public int DefaultTimeOut { get; set; }
         public bool RetweetNoConfirm { get; set; }
         public bool TabIconDisp { get; set; }
@@ -1078,7 +1016,6 @@ namespace OpenTween
         public bool ReadOldPosts { get; set; }
         public string BitlyUser { get; set; }
         public string BitlyPwd { get; set; }
-        public bool ShowGrid { get; set; }
         public bool UseAtIdSupplement { get; set; }
         public bool UseHashSupplement { get; set; }
         public bool PreviewEnable { get; set; }
index 5447523..e158625 100644 (file)
@@ -42,6 +42,86 @@ namespace OpenTween.Setting.Panel
             InitializeComponent();
         }
 
+        public void LoadConfig(SettingCommon settingCommon)
+        {
+            switch (settingCommon.IconSize)
+            {
+                case MyCommon.IconSizes.IconNone:
+                    this.IconSize.SelectedIndex = 0;
+                    break;
+                case MyCommon.IconSizes.Icon16:
+                    this.IconSize.SelectedIndex = 1;
+                    break;
+                case MyCommon.IconSizes.Icon24:
+                    this.IconSize.SelectedIndex = 2;
+                    break;
+                case MyCommon.IconSizes.Icon48:
+                    this.IconSize.SelectedIndex = 3;
+                    break;
+                case MyCommon.IconSizes.Icon48_2:
+                    this.IconSize.SelectedIndex = 4;
+                    break;
+            }
+
+            this.OneWayLv.Checked = settingCommon.OneWayLove;
+            this.CheckSortOrderLock.Checked = settingCommon.SortOrderLock;
+            this.CheckViewTabBottom.Checked = settingCommon.ViewTabBottom;
+            this.chkUnreadStyle.Checked = settingCommon.UseUnreadStyle;
+
+            //書式指定文字列エラーチェック
+            var dateTimeFormat = settingCommon.DateTimeFormat;
+            try
+            {
+                if (DateTime.Now.ToString(dateTimeFormat).Length == 0)
+                {
+                    // このブロックは絶対に実行されないはず
+                    // 変換が成功した場合にLengthが0にならない
+                    dateTimeFormat = "yyyy/MM/dd H:mm:ss";
+                }
+            }
+            catch (FormatException)
+            {
+                // FormatExceptionが発生したら初期値を設定 (=yyyy/MM/dd H:mm:ssとみなされる)
+                dateTimeFormat = "yyyy/MM/dd H:mm:ss";
+            }
+            this.CmbDateTimeFormat.Text = dateTimeFormat;
+
+            this.CheckShowGrid.Checked = settingCommon.ShowGrid;
+            this.HideDuplicatedRetweetsCheck.Checked = settingCommon.HideDuplicatedRetweets;
+            this.IsListsIncludeRtsCheckBox.Checked = settingCommon.IsListsIncludeRts;
+        }
+
+        public void SaveConfig(SettingCommon settingCommon)
+        {
+            switch (this.IconSize.SelectedIndex)
+            {
+                case 0:
+                    settingCommon.IconSize = MyCommon.IconSizes.IconNone;
+                    break;
+                case 1:
+                    settingCommon.IconSize = MyCommon.IconSizes.Icon16;
+                    break;
+                case 2:
+                    settingCommon.IconSize = MyCommon.IconSizes.Icon24;
+                    break;
+                case 3:
+                    settingCommon.IconSize = MyCommon.IconSizes.Icon48;
+                    break;
+                case 4:
+                    settingCommon.IconSize = MyCommon.IconSizes.Icon48_2;
+                    break;
+            }
+
+            settingCommon.OneWayLove = this.OneWayLv.Checked;
+            settingCommon.SortOrderLock = this.CheckSortOrderLock.Checked;
+            settingCommon.ViewTabBottom = this.CheckViewTabBottom.Checked;
+            settingCommon.UseUnreadStyle = this.chkUnreadStyle.Checked;
+            settingCommon.DateTimeFormat = this.CmbDateTimeFormat.Text;
+            settingCommon.ShowGrid = this.CheckShowGrid.Checked;
+            settingCommon.HideDuplicatedRetweets = this.HideDuplicatedRetweetsCheck.Checked;
+            settingCommon.IsListsIncludeRts = this.IsListsIncludeRtsCheckBox.Checked;
+        }
+
         private bool CreateDateTimeFormatSample()
         {
             try
index 7af17b4..133fb0a 100644 (file)
@@ -134,7 +134,12 @@ namespace OpenTween
         public string EventSoundFile = "";
         public bool PlaySound = false;
         public bool UnreadManage = true;
+
+        /// <summary>
+        /// 片思い表示。trueなら片思い表示する
+        /// </summary>
         public bool OneWayLove = true;
+
         public MyCommon.NameBalloonEnum NameBalloon = MyCommon.NameBalloonEnum.NickName;
         public bool PostCtrlEnter = false;
         public bool PostShiftEnter = false;
index a0e853b..03e02e7 100644 (file)
@@ -1198,7 +1198,7 @@ namespace OpenTween
                         {
                             if (Item.IsFav && Item.RetweetedId != null) Item.IsFav = false;
                             //既に持っている公式RTは捨てる
-                            if (AppendSettingDialog.Instance.HideDuplicatedRetweets &&
+                            if (SettingCommon.Instance.HideDuplicatedRetweets &&
                                 !Item.IsMe &&
                                 Item.RetweetedId != null &&
                                 this._retweets.TryGetValue(Item.RetweetedId.Value, out status) &&
index da04161..ef73449 100644 (file)
@@ -766,7 +766,6 @@ namespace OpenTween
             //新着取得時のリストスクロールをするか。trueならスクロールしない
             ListLockMenuItem.Checked = _cfgCommon.ListLock;
             this.LockListFileMenuItem.Checked = _cfgCommon.ListLock;
-            SettingDialog.IconSz = _cfgCommon.IconSize;
             //文末ステータス
             SettingDialog.Status = _cfgLocal.StatusText;
             //未読管理。trueなら未読管理する
@@ -775,8 +774,6 @@ namespace OpenTween
             SettingDialog.PlaySound = _cfgCommon.PlaySound;
             PlaySoundMenuItem.Checked = SettingDialog.PlaySound;
             this.PlaySoundFileMenuItem.Checked = SettingDialog.PlaySound;
-            //片思い表示。trueなら片思い表示する
-            SettingDialog.OneWayLove = _cfgCommon.OneWayLove;
             //フォント&文字色&背景色
             SettingDialog.FontUnread = _fntUnread;
             SettingDialog.ColorUnread = _clUnread;
@@ -816,8 +813,6 @@ namespace OpenTween
             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;
@@ -831,11 +826,9 @@ namespace OpenTween
             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;
@@ -856,7 +849,6 @@ namespace OpenTween
             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;
@@ -872,22 +864,6 @@ namespace OpenTween
             //Regex statregex = new Regex("^0*");
             SettingDialog.RecommendStatusText = " [TWNv" + Regex.Replace(MyCommon.FileVersion.Replace(".", ""), "^0*", "") + "]";
 
-            //書式指定文字列エラーチェック
-            try
-            {
-                if (DateTime.Now.ToString(SettingDialog.DateTimeFormat).Length == 0)
-                {
-                    // このブロックは絶対に実行されないはず
-                    // 変換が成功した場合にLengthが0にならない
-                    SettingDialog.DateTimeFormat = "yyyy/MM/dd H:mm:ss";
-                }
-            }
-            catch (FormatException)
-            {
-                // FormatExceptionが発生したら初期値を設定 (=yyyy/MM/dd H:mm:ssとみなされる)
-                SettingDialog.DateTimeFormat = "yyyy/MM/dd H:mm:ss";
-            }
-
             SettingDialog.Nicoms = _cfgCommon.Nicoms;
             SettingDialog.HotkeyEnabled = _cfgCommon.HotkeyEnabled;
             SettingDialog.HotkeyMod = _cfgCommon.HotkeyModifier;
@@ -907,7 +883,6 @@ namespace OpenTween
             SettingDialog.OpenUserTimeline = _cfgCommon.OpenUserTimeline;
             SettingDialog.ListDoubleClickAction = _cfgCommon.ListDoubleClickAction;
             SettingDialog.UserAppointUrl = _cfgCommon.UserAppointUrl;
-            SettingDialog.HideDuplicatedRetweets = _cfgCommon.HideDuplicatedRetweets;
 
             SettingDialog.EnableImgAzyobuziNet = _cfgCommon.EnableImgAzyobuziNet;
             SettingDialog.ImgAzyobuziNetDisabledInDM = _cfgCommon.ImgAzyobuziNetDisabledInDM;
@@ -915,7 +890,6 @@ namespace OpenTween
             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;
@@ -1139,7 +1113,7 @@ namespace OpenTween
             _statuses.SortMode = mode;
             ////////////////////////////////////////////////////////////////////////////////
 
-            ApplyListViewIconSize(SettingDialog.IconSz);
+            ApplyListViewIconSize(this._cfgCommon.IconSize);
 
             StatusLabel.Text = Properties.Resources.Form1_LoadText1;       //画面右下の状態表示を変更
             StatusLabelUrl.Text = "";            //画面左下のリンク先URL表示部を初期化
@@ -2009,9 +1983,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;
@@ -2019,13 +1993,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);
@@ -3408,7 +3382,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)
             {
@@ -3899,7 +3873,6 @@ namespace OpenTween
         {
             DialogResult result;
             string uid = tw.Username.ToLower();
-            var oldIconSz = SettingDialog.IconSz;
 
             try
             {
@@ -3914,6 +3887,8 @@ namespace OpenTween
             {
                 lock (_syncObject)
                 {
+                    var oldIconSz = this._cfgCommon.IconSize;
+
                     this.SettingDialog.SaveConfig(this._cfgCommon, this._cfgLocal);
 
                     tw.RestrictFavCheck = SettingDialog.RestrictFavCheck;
@@ -4084,8 +4059,8 @@ namespace OpenTween
                     {
                         var oldIconCol = _iconCol;
 
-                        if (SettingDialog.IconSz != oldIconSz)
-                            ApplyListViewIconSize(SettingDialog.IconSz);
+                        if (this._cfgCommon.IconSize != oldIconSz)
+                            ApplyListViewIconSize(this._cfgCommon.IconSize);
 
                         foreach (TabPage tp in ListTab.TabPages)
                         {
@@ -4093,7 +4068,7 @@ namespace OpenTween
 
                             using (ControlTransaction.Update(lst))
                             {
-                                lst.GridLines = SettingDialog.ShowGrid;
+                                lst.GridLines = this._cfgCommon.ShowGrid;
                                 lst.Font = _fntReaded;
                                 lst.BackColor = _clListBackcolor;
 
@@ -4153,7 +4128,7 @@ namespace OpenTween
         /// </summary>
         private void SetTabAlignment()
         {
-            var newAlignment = SettingDialog.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top;
+            var newAlignment = this._cfgCommon.ViewTabBottom ? TabAlignment.Bottom : TabAlignment.Top;
             if (ListTab.Alignment == newAlignment) return;
 
             //現在の選択状態を退避
@@ -4569,7 +4544,7 @@ namespace OpenTween
                 _listCustom.Font = _fntReaded;
                 _listCustom.BackColor = _clListBackcolor;
 
-                _listCustom.GridLines = SettingDialog.ShowGrid;
+                _listCustom.GridLines = this._cfgCommon.ShowGrid;
                 _listCustom.AllowDrop = true;
 
                 _listCustom.SmallImageList = _listViewImageList;
@@ -5191,7 +5166,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(),
@@ -5203,7 +5178,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 + Environment.NewLine + "(RT:" + Post.RetweetedBy + ")",
                                   "",
                                   mk.ToString(),
@@ -6119,7 +6094,7 @@ namespace OpenTween
                 NameLabel.Tag = _curPost.ScreenName;
 
                 var nameForeColor = SystemColors.ControlText;
-                if (_curPost.IsOwl && (this.SettingDialog.OneWayLove || _curPost.IsDm))
+                if (_curPost.IsOwl && (this._cfgCommon.OneWayLove || _curPost.IsDm))
                     nameForeColor = this._clOWL;
                 if (_curPost.RetweetedId != null)
                     nameForeColor = this._clRetweet;
@@ -7755,10 +7730,8 @@ namespace OpenTween
                 _cfgCommon.Token = tw.AccessToken;
                 _cfgCommon.TokenSecret = tw.AccessTokenSecret;
                 _cfgCommon.UserAccounts = SettingDialog.UserAccounts;
-                _cfgCommon.IconSize = SettingDialog.IconSz;
                 _cfgCommon.UnreadManage = SettingDialog.UnreadManage;
                 _cfgCommon.PlaySound = SettingDialog.PlaySound;
-                _cfgCommon.OneWayLove = SettingDialog.OneWayLove;
 
                 _cfgCommon.NameBalloon = SettingDialog.NameBalloon;
                 _cfgCommon.PostCtrlEnter = SettingDialog.PostCtrlEnter;
@@ -7769,14 +7742,10 @@ namespace OpenTween
                 _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.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;
@@ -7800,7 +7769,6 @@ 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;
@@ -7865,14 +7833,12 @@ namespace OpenTween
                 _cfgCommon.UseImageServiceName = ImageSelector.ServiceName;
                 _cfgCommon.ListDoubleClickAction = SettingDialog.ListDoubleClickAction;
                 _cfgCommon.UserAppointUrl = SettingDialog.UserAppointUrl;
-                _cfgCommon.HideDuplicatedRetweets = SettingDialog.HideDuplicatedRetweets;
                 _cfgCommon.EnableImgAzyobuziNet = SettingDialog.EnableImgAzyobuziNet;
                 _cfgCommon.ImgAzyobuziNetDisabledInDM = SettingDialog.ImgAzyobuziNetDisabledInDM;
                 _cfgCommon.MapThumbnailProvider = SettingDialog.MapThumbnailProvider;
                 _cfgCommon.MapThumbnailHeight = SettingDialog.MapThumbnailHeight;
                 _cfgCommon.MapThumbnailWidth = SettingDialog.MapThumbnailWidth;
                 _cfgCommon.MapThumbnailZoom = SettingDialog.MapThumbnailZoom;
-                _cfgCommon.IsListsIncludeRts = SettingDialog.IsListStatusesIncludeRts;
                 _cfgCommon.TabMouseLock = SettingDialog.TabMouseLock;
                 _cfgCommon.IsRemoveSameEvent = SettingDialog.IsRemoveSameEvent;
                 _cfgCommon.IsUseNotifyGrowl = SettingDialog.IsNotifyUseGrowl;
@@ -13217,13 +13183,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)
@@ -13253,11 +13219,11 @@ namespace OpenTween
 
         private void ChangeListViewIconSize(MyCommon.IconSizes iconSize)
         {
-            if (SettingDialog.IconSz == iconSize) return;
+            if (this._cfgCommon.IconSize == iconSize) return;
 
             var oldIconCol = _iconCol;
 
-            SettingDialog.IconSz = iconSize;
+            this._cfgCommon.IconSize = iconSize;
             ApplyListViewIconSize(iconSize);
 
             if (_iconCol != oldIconCol)
@@ -13276,9 +13242,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;
         }
index b8a71bf..7f6fba2 100644 (file)
@@ -1824,11 +1824,11 @@ namespace OpenTween
             {
                 if (more)
                 {
-                    res = twCon.GetListsStatuses(tab.ListInfo.UserId, tab.ListInfo.Id, count, tab.OldestId, null, AppendSettingDialog.Instance.IsListStatusesIncludeRts, ref content);
+                    res = twCon.GetListsStatuses(tab.ListInfo.UserId, tab.ListInfo.Id, count, tab.OldestId, null, SettingCommon.Instance.IsListsIncludeRts, ref content);
                 }
                 else
                 {
-                    res = twCon.GetListsStatuses(tab.ListInfo.UserId, tab.ListInfo.Id, count, null, null, AppendSettingDialog.Instance.IsListStatusesIncludeRts, ref content);
+                    res = twCon.GetListsStatuses(tab.ListInfo.UserId, tab.ListInfo.Id, count, null, null, SettingCommon.Instance.IsListsIncludeRts, ref content);
                 }
             }
             catch(Exception ex)