OSDN Git Service

SettingCommon.Instanceプロパティを削除
authorKimura Youichi <kim.upsilon@bucyou.net>
Thu, 16 Feb 2017 12:36:47 +0000 (21:36 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Thu, 16 Feb 2017 14:38:32 +0000 (23:38 +0900)
19 files changed:
OpenTween.Tests/TwitterTest.cs
OpenTween/EventViewerDialog.cs
OpenTween/Models/DirectMessagesTabModel.cs
OpenTween/Models/FavoritesTabModel.cs
OpenTween/Models/HomeTabModel.cs
OpenTween/Models/ListTimelineTabModel.cs
OpenTween/Models/MentionsTabModel.cs
OpenTween/Models/PublicSearchTabModel.cs
OpenTween/Models/RelatedPostsTabModel.cs
OpenTween/Models/TabInformations.cs
OpenTween/Models/TabModel.cs
OpenTween/Models/UserTimelineTabModel.cs
OpenTween/MyCommon.cs
OpenTween/Setting/SettingCommon.cs
OpenTween/Thumbnail/MapThumb.cs
OpenTween/Thumbnail/MapThumbGoogle.cs
OpenTween/Thumbnail/MapThumbOSM.cs
OpenTween/TweetDetailsView.cs
OpenTween/Twitter.cs

index 4ca8985..75d55b0 100644 (file)
@@ -212,18 +212,18 @@ namespace OpenTween
             var oldInstance = SettingManagerTest.Common;
             SettingManagerTest.Common = new SettingCommon();
 
-            var timeline = SettingCommon.Instance.CountApi;
-            var reply = SettingCommon.Instance.CountApiReply;
+            var timeline = SettingManager.Common.CountApi;
+            var reply = SettingManager.Common.CountApiReply;
             var dm = 20;  // DMは固定値
-            var more = SettingCommon.Instance.MoreCountApi;
-            var startup = SettingCommon.Instance.FirstCountApi;
-            var favorite = SettingCommon.Instance.FavoritesCountApi;
-            var list = SettingCommon.Instance.ListCountApi;
-            var search = SettingCommon.Instance.SearchCountApi;
-            var usertl = SettingCommon.Instance.UserTimelineCountApi;
+            var more = SettingManager.Common.MoreCountApi;
+            var startup = SettingManager.Common.FirstCountApi;
+            var favorite = SettingManager.Common.FavoritesCountApi;
+            var list = SettingManager.Common.ListCountApi;
+            var search = SettingManager.Common.SearchCountApi;
+            var usertl = SettingManager.Common.UserTimelineCountApi;
 
             // デフォルト値チェック
-            Assert.Equal(false, SettingCommon.Instance.UseAdditionalCount);
+            Assert.Equal(false, SettingManager.Common.UseAdditionalCount);
             Assert.Equal(60, timeline);
             Assert.Equal(40, reply);
             Assert.Equal(200, more);
@@ -256,17 +256,17 @@ namespace OpenTween
             var oldInstance = SettingManagerTest.Common;
             SettingManagerTest.Common = new SettingCommon();
 
-            var timeline = SettingCommon.Instance.CountApi;
-            var reply = SettingCommon.Instance.CountApiReply;
+            var timeline = SettingManager.Common.CountApi;
+            var reply = SettingManager.Common.CountApiReply;
             var dm = 20;  // DMは固定値
-            var more = SettingCommon.Instance.MoreCountApi;
-            var startup = SettingCommon.Instance.FirstCountApi;
-            var favorite = SettingCommon.Instance.FavoritesCountApi;
-            var list = SettingCommon.Instance.ListCountApi;
-            var search = SettingCommon.Instance.SearchCountApi;
-            var usertl = SettingCommon.Instance.UserTimelineCountApi;
+            var more = SettingManager.Common.MoreCountApi;
+            var startup = SettingManager.Common.FirstCountApi;
+            var favorite = SettingManager.Common.FavoritesCountApi;
+            var list = SettingManager.Common.ListCountApi;
+            var search = SettingManager.Common.SearchCountApi;
+            var usertl = SettingManager.Common.UserTimelineCountApi;
 
-            SettingCommon.Instance.UseAdditionalCount = true;
+            SettingManager.Common.UseAdditionalCount = true;
 
             // Timeline
             Assert.Equal(timeline, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.Timeline, false, false));
@@ -287,7 +287,7 @@ namespace OpenTween
             Assert.Equal(favorite, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.Favorites, true, false));
             Assert.Equal(favorite, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.Favorites, false, true));
 
-            SettingCommon.Instance.FavoritesCountApi = 0;
+            SettingManager.Common.FavoritesCountApi = 0;
 
             Assert.Equal(timeline, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.Favorites, false, false));
             Assert.Equal(more, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.Favorites, true, false));
@@ -298,7 +298,7 @@ namespace OpenTween
             Assert.Equal(list, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.List, true, false));
             Assert.Equal(list, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.List, false, true));
 
-            SettingCommon.Instance.ListCountApi = 0;
+            SettingManager.Common.ListCountApi = 0;
 
             Assert.Equal(timeline, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.List, false, false));
             Assert.Equal(more, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.List, true, false));
@@ -309,7 +309,7 @@ namespace OpenTween
             Assert.Equal(search, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.PublicSearch, true, false));
             Assert.Equal(search, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.PublicSearch, false, true));
 
-            SettingCommon.Instance.SearchCountApi = 0;
+            SettingManager.Common.SearchCountApi = 0;
 
             Assert.Equal(timeline, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.PublicSearch, false, false));
             Assert.Equal(search, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.PublicSearch, true, false));  //MoreCountApiの値がPublicSearchの最大値に制限される
@@ -320,7 +320,7 @@ namespace OpenTween
             Assert.Equal(usertl, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.UserTimeline, true, false));
             Assert.Equal(usertl, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.UserTimeline, false, true));
 
-            SettingCommon.Instance.UserTimelineCountApi = 0;
+            SettingManager.Common.UserTimelineCountApi = 0;
 
             Assert.Equal(timeline, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.UserTimeline, false, false));
             Assert.Equal(more, Twitter.GetApiResultCount(MyCommon.WORKERTYPE.UserTimeline, true, false));
index d054657..1d00481 100644 (file)
@@ -36,6 +36,7 @@ using System.Windows.Forms;
 using System.Text.RegularExpressions;
 using System.IO;
 using System.Globalization;
+using OpenTween.Setting;
 
 namespace OpenTween
 {
@@ -94,7 +95,7 @@ namespace OpenTween
             _curTab = TabEventType.SelectedTab;
             CreateFilterdEventSource();
             EventList.EndUpdate();
-            this.TopMost = SettingCommon.Instance.AlwaysTop;
+            this.TopMost = SettingManager.Common.AlwaysTop;
         }
 
         private async void EventList_DoubleClick(object sender, EventArgs e)
@@ -268,7 +269,7 @@ namespace OpenTween
                     }
                 }
             }
-            this.TopMost = SettingCommon.Instance.AlwaysTop;
+            this.TopMost = SettingManager.Common.AlwaysTop;
         }
 
         private void SaveEventLog(List<Twitter.FormattedEvent> source, StreamWriter sw)
index f2426a2..976cbe7 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -49,10 +50,10 @@ namespace OpenTween.Models
         public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress<string> progress)
         {
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report(string.Format(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText8, backward ? -1 : 1));
 
index 924e1a5..ed0367f 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -49,10 +50,10 @@ namespace OpenTween.Models
         public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress<string> progress)
         {
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText19);
 
index 4969124..ba93579 100644 (file)
@@ -32,6 +32,7 @@ using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -63,10 +64,10 @@ namespace OpenTween.Models
         public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress<string> progress)
         {
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report(string.Format(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText5, backward ? -1 : 1));
 
@@ -74,7 +75,7 @@ namespace OpenTween.Models
                 .ConfigureAwait(false);
 
             // 新着時未読クリア
-            if (SettingCommon.Instance.ReadOldPosts)
+            if (SettingManager.Common.ReadOldPosts)
                 TabInformations.GetInstance().SetReadHomeTab();
 
             TabInformations.GetInstance().DistributePosts();
index 22861b8..2e59847 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -52,10 +53,10 @@ namespace OpenTween.Models
                 return;
 
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report("List refreshing...");
 
index 93bc7ab..5ff6966 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -49,10 +50,10 @@ namespace OpenTween.Models
         public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress<string> progress)
         {
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report(string.Format(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText4, backward ? -1 : 1));
 
index 554133e..c2e6423 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -71,10 +72,10 @@ namespace OpenTween.Models
                 return;
 
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report("Search refreshing...");
 
index 8b29b90..a16badd 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -54,10 +55,10 @@ namespace OpenTween.Models
         public override async Task RefreshAsync(Twitter tw, bool _, bool startup, IProgress<string> progress)
         {
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report("Related refreshing...");
 
index 49e1f80..22c1be7 100644 (file)
@@ -33,6 +33,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -547,7 +548,7 @@ namespace OpenTween.Models
                     if (Item.IsFav && Item.RetweetedId != null) Item.IsFav = false;
 
                     //既に持っている公式RTは捨てる
-                    if (Item.RetweetedId != null && SettingCommon.Instance.HideDuplicatedRetweets)
+                    if (Item.RetweetedId != null && SettingManager.Common.HideDuplicatedRetweets)
                     {
                         var retweetCount = this.UpdateRetweetCount(Item);
 
index eb5bb18..026cf17 100644 (file)
@@ -33,6 +33,7 @@ using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -242,7 +243,7 @@ namespace OpenTween.Models
         {
             get
             {
-                if (!this.UnreadManage || !SettingCommon.Instance.UnreadManage)
+                if (!this.UnreadManage || !SettingManager.Common.UnreadManage)
                     return -1L;
 
                 if (this.unreadIds.Count == 0)
@@ -275,7 +276,7 @@ namespace OpenTween.Models
         {
             get
             {
-                if (!this.UnreadManage || !SettingCommon.Instance.UnreadManage)
+                if (!this.UnreadManage || !SettingManager.Common.UnreadManage)
                     return 0;
 
                 return this.unreadIds.Count;
index 72c13da..621bb16 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using OpenTween.Setting;
 
 namespace OpenTween.Models
 {
@@ -52,10 +53,10 @@ namespace OpenTween.Models
                 return;
 
             bool read;
-            if (!SettingCommon.Instance.UnreadManage)
+            if (!SettingManager.Common.UnreadManage)
                 read = true;
             else
-                read = startup && SettingCommon.Instance.Read;
+                read = startup && SettingManager.Common.Read;
 
             progress.Report("UserTimeline refreshing...");
 
index 169fc9f..5bb0c9e 100644 (file)
@@ -48,6 +48,7 @@ using System.Net.NetworkInformation;
 using System.Runtime.InteropServices;
 using OpenTween.Api;
 using OpenTween.Models;
+using OpenTween.Setting;
 
 namespace OpenTween
 {
@@ -417,7 +418,7 @@ namespace OpenTween
                     writer.Write(errorReport);
                 }
 
-                var settings = SettingCommon.Instance;
+                var settings = SettingManager.Common;
                 var mainForm = Application.OpenForms.OfType<TweenMain>().FirstOrDefault();
 
                 ErrorReport report;
index ac7d1cf..4c5cc62 100644 (file)
@@ -29,14 +29,11 @@ using System.Xml.Serialization;
 using System.Collections.Generic;
 using System.Windows.Forms;
 using OpenTween.Thumbnail;
-using OpenTween.Setting;
 
 namespace OpenTween
 {
     public class SettingCommon : SettingBase<SettingCommon>
     {
-        public static SettingCommon Instance => SettingManager.Common;
-
         #region "Settingクラス基本"
         public static SettingCommon Load()
         {
index 7663e6d..ffaf421 100644 (file)
@@ -25,6 +25,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using OpenTween.Models;
+using OpenTween.Setting;
 using OpenTween.Thumbnail.Services;
 
 namespace OpenTween.Thumbnail
@@ -52,7 +53,7 @@ namespace OpenTween.Thumbnail
         {
             Type classType;
 
-            MapProvider confValue = SettingCommon.Instance.MapThumbnailProvider;
+            MapProvider confValue = SettingManager.Common.MapThumbnailProvider;
             switch (confValue)
             {
                 case MapProvider.OpenStreetMap:
index fe08a18..0bb6464 100644 (file)
@@ -26,6 +26,7 @@ using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using OpenTween.Models;
+using OpenTween.Setting;
 
 namespace OpenTween.Thumbnail
 {
@@ -45,9 +46,9 @@ namespace OpenTween.Thumbnail
 
         public string CreateStaticMapUrl(double latitude, double longitude)
         {
-            var width = SettingCommon.Instance.MapThumbnailWidth; // この辺なんとかならんかなあ
-            var height = SettingCommon.Instance.MapThumbnailHeight;
-            var zoom = SettingCommon.Instance.MapThumbnailZoom;
+            var width = SettingManager.Common.MapThumbnailWidth; // この辺なんとかならんかなあ
+            var height = SettingManager.Common.MapThumbnailHeight;
+            var zoom = SettingManager.Common.MapThumbnailZoom;
             var location = latitude + "," + longitude;
 
             var baseUrl = "https://maps.googleapis.com/maps/api/staticmap";
@@ -57,7 +58,7 @@ namespace OpenTween.Thumbnail
 
         public string CreateMapLinkUrl(double latitude, double longitude)
         {
-            var zoom = SettingCommon.Instance.MapThumbnailZoom;
+            var zoom = SettingManager.Common.MapThumbnailZoom;
             var location = latitude + "," + longitude;
 
             var baseUrl = "https://maps.google.co.jp/maps";
index 4de51fc..08814bc 100644 (file)
@@ -28,6 +28,7 @@ using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using OpenTween.Models;
+using OpenTween.Setting;
 
 namespace OpenTween.Thumbnail
 {
@@ -35,8 +36,8 @@ namespace OpenTween.Thumbnail
     {
         public override Task<ThumbnailInfo> GetThumbnailInfoAsync(PostClass.StatusGeo geo)
         {
-            var size = new Size(SettingCommon.Instance.MapThumbnailWidth, SettingCommon.Instance.MapThumbnailHeight);
-            var zoom = SettingCommon.Instance.MapThumbnailZoom;
+            var size = new Size(SettingManager.Common.MapThumbnailWidth, SettingManager.Common.MapThumbnailHeight);
+            var zoom = SettingManager.Common.MapThumbnailZoom;
 
             var thumb = new OSMThumbnailInfo(geo.Latitude, geo.Longitude, zoom, size)
             {
@@ -48,7 +49,7 @@ namespace OpenTween.Thumbnail
 
         public string CreateMapLinkUrl(double latitude, double longitude)
         {
-            var zoom = SettingCommon.Instance.MapThumbnailZoom;
+            var zoom = SettingManager.Common.MapThumbnailZoom;
 
             return "http://www.openstreetmap.org/index.html?lat=" + latitude + "&lon=" + longitude + "&zoom=" + zoom + "&mlat=" + latitude + "&mlon=" + longitude;
         }
index ab1c336..cc8abff 100644 (file)
@@ -114,7 +114,7 @@ namespace OpenTween
                 NameLabel.Text = nameText;
 
                 var nameForeColor = SystemColors.ControlText;
-                if (post.IsOwl && (SettingCommon.Instance.OneWayLove || post.IsDm))
+                if (post.IsOwl && (SettingManager.Common.OneWayLove || post.IsDm))
                     nameForeColor = SettingManager.Local.ColorOWL;
                 if (post.RetweetedId != null)
                     nameForeColor = SettingManager.Local.ColorRetweet;
@@ -374,7 +374,7 @@ namespace OpenTween
             {
                 var translatedText = await bing.TranslateAsync(str,
                     langFrom: null,
-                    langTo: SettingCommon.Instance.TranslateLanguage);
+                    langTo: SettingManager.Common.TranslateLanguage);
 
                 this.PostBrowser.DocumentText = this.Owner.createDetailHtml(translatedText);
             }
index 5690b5b..f3f0951 100644 (file)
@@ -51,6 +51,7 @@ using OpenTween.Api.DataModel;
 using OpenTween.Connection;
 using OpenTween.Models;
 using System.Drawing.Imaging;
+using OpenTween.Setting;
 
 namespace OpenTween
 {
@@ -232,7 +233,7 @@ namespace OpenTween
             this.ResetApiStatus();
             this.Api.Initialize(token, tokenSecret, userId, username);
             _uname = username.ToLowerInvariant();
-            if (SettingCommon.Instance.UserstreamStartup) this.ReconnectUserStream();
+            if (SettingManager.Common.UserstreamStartup) this.ReconnectUserStream();
         }
 
         public string PreProcessUrl(string orgData)
@@ -302,7 +303,7 @@ namespace OpenTween
         }
 
         public Task<long> UploadMedia(IMediaItem item)
-            => this.UploadMedia(item, SettingCommon.Instance.AlphaPNGWorkaround);
+            => this.UploadMedia(item, SettingManager.Common.AlphaPNGWorkaround);
 
         public async Task<long> UploadMedia(IMediaItem item, bool alphaPNGWorkaround)
         {
@@ -543,42 +544,42 @@ namespace OpenTween
                 return 20;
             }
 
-            if (SettingCommon.Instance.UseAdditionalCount)
+            if (SettingManager.Common.UseAdditionalCount)
             {
                 switch (type)
                 {
                     case MyCommon.WORKERTYPE.Favorites:
-                        if (SettingCommon.Instance.FavoritesCountApi != 0)
-                            return SettingCommon.Instance.FavoritesCountApi;
+                        if (SettingManager.Common.FavoritesCountApi != 0)
+                            return SettingManager.Common.FavoritesCountApi;
                         break;
                     case MyCommon.WORKERTYPE.List:
-                        if (SettingCommon.Instance.ListCountApi != 0)
-                            return SettingCommon.Instance.ListCountApi;
+                        if (SettingManager.Common.ListCountApi != 0)
+                            return SettingManager.Common.ListCountApi;
                         break;
                     case MyCommon.WORKERTYPE.PublicSearch:
-                        if (SettingCommon.Instance.SearchCountApi != 0)
-                            return SettingCommon.Instance.SearchCountApi;
+                        if (SettingManager.Common.SearchCountApi != 0)
+                            return SettingManager.Common.SearchCountApi;
                         break;
                     case MyCommon.WORKERTYPE.UserTimeline:
-                        if (SettingCommon.Instance.UserTimelineCountApi != 0)
-                            return SettingCommon.Instance.UserTimelineCountApi;
+                        if (SettingManager.Common.UserTimelineCountApi != 0)
+                            return SettingManager.Common.UserTimelineCountApi;
                         break;
                 }
-                if (more && SettingCommon.Instance.MoreCountApi != 0)
+                if (more && SettingManager.Common.MoreCountApi != 0)
                 {
-                    return Math.Min(SettingCommon.Instance.MoreCountApi, GetMaxApiResultCount(type));
+                    return Math.Min(SettingManager.Common.MoreCountApi, GetMaxApiResultCount(type));
                 }
-                if (startup && SettingCommon.Instance.FirstCountApi != 0 && type != MyCommon.WORKERTYPE.Reply)
+                if (startup && SettingManager.Common.FirstCountApi != 0 && type != MyCommon.WORKERTYPE.Reply)
                 {
-                    return Math.Min(SettingCommon.Instance.FirstCountApi, GetMaxApiResultCount(type));
+                    return Math.Min(SettingManager.Common.FirstCountApi, GetMaxApiResultCount(type));
                 }
             }
 
             // 上記に当てはまらない場合の共通処理
-            var count = SettingCommon.Instance.CountApi;
+            var count = SettingManager.Common.CountApi;
 
             if (type == MyCommon.WORKERTYPE.Reply)
-                count = SettingCommon.Instance.CountApiReply;
+                count = SettingManager.Common.CountApiReply;
 
             return Math.Min(count, GetMaxApiResultCount(type));
         }
@@ -985,12 +986,12 @@ namespace OpenTween
             TwitterStatus[] statuses;
             if (more)
             {
-                statuses = await this.Api.ListsStatuses(tab.ListInfo.Id, count, maxId: tab.OldestId, includeRTs: SettingCommon.Instance.IsListsIncludeRts)
+                statuses = await this.Api.ListsStatuses(tab.ListInfo.Id, count, maxId: tab.OldestId, includeRTs: SettingManager.Common.IsListsIncludeRts)
                     .ConfigureAwait(false);
             }
             else
             {
-                statuses = await this.Api.ListsStatuses(tab.ListInfo.Id, count, includeRTs: SettingCommon.Instance.IsListsIncludeRts)
+                statuses = await this.Api.ListsStatuses(tab.ListInfo.Id, count, includeRTs: SettingManager.Common.IsListsIncludeRts)
                     .ConfigureAwait(false);
             }
 
@@ -2066,7 +2067,7 @@ namespace OpenTween
                     evt.Target = "@" + tweet.User.ScreenName + ":" + WebUtility.HtmlDecode(tweet.FullText);
                     evt.Id = tweet.Id;
 
-                    if (SettingCommon.Instance.IsRemoveSameEvent)
+                    if (SettingManager.Common.IsRemoveSameEvent)
                     {
                         if (this.StoredEvent.Any(ev => ev.Username == evt.Username && ev.Eventtype == evt.Eventtype && ev.Target == evt.Target))
                             return;
@@ -2092,7 +2093,7 @@ namespace OpenTween
                         {
                             post.FavoritedCount++;
 
-                            if (SettingCommon.Instance.FavEventUnread)
+                            if (SettingManager.Common.FavEventUnread)
                                 tabinfo.SetReadAllTab(post.StatusId, read: false);
                         }
                     }
@@ -2116,7 +2117,7 @@ namespace OpenTween
                     evt.Target = "@" + tweet.User.ScreenName + ":" + WebUtility.HtmlDecode(tweet.FullText);
                     evt.Id = tweet.Id;
 
-                    if (SettingCommon.Instance.IsRemoveSameEvent)
+                    if (SettingManager.Common.IsRemoveSameEvent)
                     {
                         if (this.StoredEvent.Any(ev => ev.Username == evt.Username && ev.Eventtype == evt.Eventtype && ev.Target == evt.Target))
                             return;