OSDN Git Service

識別子をPascalCaseにする (SA1300, SA1303, SA1307, SA1309, SA1311)
authorKimura Youichi <kim.upsilon@bucyou.net>
Sun, 27 Feb 2022 20:13:28 +0000 (05:13 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Mon, 28 Feb 2022 11:41:18 +0000 (20:41 +0900)
60 files changed:
OpenTween.Tests/Api/TwitterApiTest.cs
OpenTween.Tests/Connection/TwitterApiConnectionTest.cs
OpenTween.Tests/DebounceTimerTest.cs
OpenTween.Tests/LRUCacheDictionaryTest.cs
OpenTween.Tests/Models/PostClassTest.cs
OpenTween.Tests/Models/TabInformationTest.cs
OpenTween.Tests/MyCommonTest.cs
OpenTween.Tests/TabsDialogTest.cs
OpenTween.Tests/TestUtils.cs
OpenTween.Tests/ThrottleTimerTest.cs
OpenTween.Tests/TimelineScheduerTest.cs
OpenTween.Tests/ToolStripAPIGaugeTest.cs
OpenTween.Tests/TweetThumbnailTest.cs
OpenTween/Api/BitlyApi.cs
OpenTween/Api/TwitterApi.cs
OpenTween/AppendSettingDialog.cs
OpenTween/ApplicationEvents.cs
OpenTween/AtIdSupplement.cs
OpenTween/Connection/TwitterApiConnection.cs
OpenTween/DetailsListView.cs
OpenTween/FilterDialog.Designer.cs
OpenTween/FilterDialog.cs
OpenTween/HashtagManage.cs
OpenTween/ImageCache.cs
OpenTween/InputDialog.Designer.cs
OpenTween/InputDialog.cs
OpenTween/LRUCacheDictionary.cs
OpenTween/LoginDialog.Designer.cs
OpenTween/LoginDialog.cs
OpenTween/Models/TabInformations.cs
OpenTween/MyCommon.cs
OpenTween/Nicoms.cs [moved from OpenTween/nicoms.cs with 96% similarity]
OpenTween/OpenTween.csproj
OpenTween/SearchWordDialog.Designer.cs
OpenTween/SearchWordDialog.cs
OpenTween/SendErrorReportForm.Designer.cs
OpenTween/SendErrorReportForm.cs
OpenTween/Setting/Panel/FontPanel.Designer.cs
OpenTween/Setting/Panel/FontPanel.cs
OpenTween/Setting/Panel/FontPanel2.Designer.cs
OpenTween/Setting/Panel/FontPanel2.cs
OpenTween/Setting/SettingBase.cs
OpenTween/ShortUrl.cs
OpenTween/Thumbnail/Services/FoursquareCheckin.cs
OpenTween/Thumbnail/Services/ImgAzyobuziNet.cs
OpenTween/Thumbnail/Services/MetaThumbnailService.cs
OpenTween/Thumbnail/Services/Tinami.cs
OpenTween/Thumbnail/Services/Tumblr.cs
OpenTween/Thumbnail/Services/Vimeo.cs
OpenTween/ToolStripAPIGauge.cs
OpenTween/Tween.Designer.cs
OpenTween/Tween.cs
OpenTween/TweetDetailsView.cs
OpenTween/TweetExtractor.cs
OpenTween/TweetFormatter.cs
OpenTween/TweetThumbnail.Designer.cs
OpenTween/TweetThumbnail.cs
OpenTween/Twitter.cs
OpenTween/UserInfo.cs
OpenTween/UserInfoDialog.cs

index 125b754..5296196 100644 (file)
@@ -52,13 +52,13 @@ namespace OpenTween.Api
         public void Initialize_Test()
         {
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            Assert.Null(twitterApi.apiConnection);
+            Assert.Null(twitterApi.ApiConnection);
 
             twitterApi.Initialize("*** AccessToken ***", "*** AccessSecret ***", userId: 100L, screenName: "hogehoge");
 
-            Assert.IsType<TwitterApiConnection>(twitterApi.apiConnection);
+            Assert.IsType<TwitterApiConnection>(twitterApi.ApiConnection);
 
-            var apiConnection = (TwitterApiConnection)twitterApi.apiConnection!;
+            var apiConnection = (TwitterApiConnection)twitterApi.ApiConnection!;
             Assert.Equal("*** AccessToken ***", apiConnection.AccessToken);
             Assert.Equal("*** AccessSecret ***", apiConnection.AccessSecret);
 
@@ -71,9 +71,9 @@ namespace OpenTween.Api
             var oldApiConnection = apiConnection;
             Assert.True(oldApiConnection.IsDisposed);
 
-            Assert.IsType<TwitterApiConnection>(twitterApi.apiConnection);
+            Assert.IsType<TwitterApiConnection>(twitterApi.ApiConnection);
 
-            apiConnection = (TwitterApiConnection)twitterApi.apiConnection!;
+            apiConnection = (TwitterApiConnection)twitterApi.ApiConnection!;
             Assert.Equal("*** AccessToken2 ***", apiConnection.AccessToken);
             Assert.Equal("*** AccessSecret2 ***", apiConnection.AccessSecret);
 
@@ -101,7 +101,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterStatus>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesHomeTimeline(200, maxId: 900L, sinceId: 100L)
                 .ConfigureAwait(false);
@@ -129,7 +129,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterStatus>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesMentionsTimeline(200, maxId: 900L, sinceId: 100L)
                 .ConfigureAwait(false);
@@ -159,7 +159,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterStatus>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesUserTimeline("twitterapi", count: 200, maxId: 900L, sinceId: 100L)
                 .ConfigureAwait(false);
@@ -185,7 +185,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterStatus { Id = 100L });
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesShow(statusId: 100L)
                 .ConfigureAwait(false);
@@ -215,7 +215,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesUpdate(
                     "hogehoge",
@@ -249,7 +249,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesUpdate("hogehoge", replyToId: null, mediaIds: null, excludeReplyUserIds: Array.Empty<long>())
                 .IgnoreResponse()
@@ -270,7 +270,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus { Id = 100L }));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesDestroy(statusId: 100L)
                 .IgnoreResponse()
@@ -296,7 +296,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.StatusesRetweet(100L)
                 .IgnoreResponse()
@@ -328,7 +328,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterSearchResult());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.SearchTweets("from:twitterapi", "en", count: 200, maxId: 900L, sinceId: 100L)
                 .ConfigureAwait(false);
@@ -353,7 +353,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterLists());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsOwnerships("twitterapi", cursor: -1L, count: 100)
                 .ConfigureAwait(false);
@@ -378,7 +378,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterLists());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsSubscriptions("twitterapi", cursor: -1L, count: 100)
                 .ConfigureAwait(false);
@@ -404,7 +404,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterLists());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsMemberships("twitterapi", cursor: -1L, count: 100, filterToOwnedLists: true)
                 .ConfigureAwait(false);
@@ -428,7 +428,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterList()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsCreate("hogehoge", description: "aaaa", @private: true)
                 .IgnoreResponse()
@@ -454,7 +454,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterList()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsUpdate(12345L, name: "hogehoge", description: "aaaa", @private: true)
                 .IgnoreResponse()
@@ -477,7 +477,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterList()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsDestroy(12345L)
                 .IgnoreResponse()
@@ -508,7 +508,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterStatus>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsStatuses(12345L, count: 200, maxId: 900L, sinceId: 100L, includeRTs: true)
                 .ConfigureAwait(false);
@@ -535,7 +535,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterUsers());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsMembers(12345L, cursor: -1)
                 .ConfigureAwait(false);
@@ -562,7 +562,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterUser());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsMembersShow(12345L, "twitterapi")
                 .ConfigureAwait(false);
@@ -588,7 +588,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsMembersCreate(12345L, "twitterapi")
                 .IgnoreResponse()
@@ -615,7 +615,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ListsMembersDestroy(12345L, "twitterapi")
                 .IgnoreResponse()
@@ -640,7 +640,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterMessageEventList());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.DirectMessagesEventsList(count: 50, cursor: "12345abcdefg")
                 .ConfigureAwait(false);
@@ -679,7 +679,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterMessageEventSingle()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.DirectMessagesEventsNew(recipientId: 12345L, text: "hogehoge", mediaId: 67890L)
                 .ConfigureAwait(false);
@@ -698,7 +698,7 @@ namespace OpenTween.Api
             .Returns(Task.CompletedTask);
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.DirectMessagesEventsDestroy(eventId: "100")
                 .ConfigureAwait(false);
@@ -724,7 +724,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterUser { ScreenName = "twitterapi" });
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.UsersShow(screenName: "twitterapi")
                 .ConfigureAwait(false);
@@ -750,7 +750,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterUser>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.UsersLookup(userIds: new[] { "11111", "22222" })
                 .ConfigureAwait(false);
@@ -773,7 +773,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser { ScreenName = "twitterapi" }));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.UsersReportSpam(screenName: "twitterapi")
                 .IgnoreResponse()
@@ -802,7 +802,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<TwitterStatus>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FavoritesList(200, maxId: 900L, sinceId: 100L)
                 .ConfigureAwait(false);
@@ -825,7 +825,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus { Id = 100L }));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FavoritesCreate(statusId: 100L)
                 .IgnoreResponse()
@@ -849,7 +849,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterStatus { Id = 100L }));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FavoritesDestroy(statusId: 100L)
                 .IgnoreResponse()
@@ -871,7 +871,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterFriendship());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FriendshipsShow(sourceScreenName: "twitter", targetScreenName: "twitterapi")
                 .ConfigureAwait(false);
@@ -891,7 +891,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterFriendship()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FriendshipsCreate(screenName: "twitterapi")
                 .IgnoreResponse()
@@ -912,7 +912,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterFriendship()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FriendshipsDestroy(screenName: "twitterapi")
                 .IgnoreResponse()
@@ -934,7 +934,7 @@ namespace OpenTween.Api
             .ReturnsAsync(Array.Empty<long>());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.NoRetweetIds()
                 .ConfigureAwait(false);
@@ -955,7 +955,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterIds());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.FollowersIds(cursor: -1L)
                 .ConfigureAwait(false);
@@ -976,7 +976,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterIds());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MutesUsersIds(cursor: -1L)
                 .ConfigureAwait(false);
@@ -997,7 +997,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterIds());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.BlocksIds(cursor: -1L)
                 .ConfigureAwait(false);
@@ -1020,7 +1020,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.BlocksCreate(screenName: "twitterapi")
                 .IgnoreResponse()
@@ -1044,7 +1044,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.BlocksDestroy(screenName: "twitterapi")
                 .IgnoreResponse()
@@ -1074,7 +1074,7 @@ namespace OpenTween.Api
             });
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.AccountVerifyCredentials()
                 .ConfigureAwait(false);
@@ -1105,7 +1105,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.AccountUpdateProfile(name: "Name", url: "http://example.com/", location: "Location", description: "<script>alert(1)</script>")
                 .IgnoreResponse()
@@ -1133,7 +1133,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUser()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.AccountUpdateProfileImage(media)
                 .IgnoreResponse()
@@ -1155,7 +1155,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterRateLimits());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.ApplicationRateLimitStatus()
                 .ConfigureAwait(false);
@@ -1176,7 +1176,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterConfiguration());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.Configuration()
                 .ConfigureAwait(false);
@@ -1201,7 +1201,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUploadMediaInit()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MediaUploadInit(totalBytes: 123456L, mediaType: "image/png", mediaCategory: "dm_image")
                 .IgnoreResponse()
@@ -1229,7 +1229,7 @@ namespace OpenTween.Api
             .Returns(Task.CompletedTask);
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MediaUploadAppend(mediaId: 11111L, segmentIndex: 1, media: media)
                 .ConfigureAwait(false);
@@ -1252,7 +1252,7 @@ namespace OpenTween.Api
             .ReturnsAsync(LazyJson.Create(new TwitterUploadMediaResult()));
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MediaUploadFinalize(mediaId: 11111L)
                 .IgnoreResponse()
@@ -1277,7 +1277,7 @@ namespace OpenTween.Api
             .ReturnsAsync(new TwitterUploadMediaResult());
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MediaUploadStatus(mediaId: 11111L)
                 .ConfigureAwait(false);
@@ -1297,7 +1297,7 @@ namespace OpenTween.Api
             .Returns(Task.CompletedTask);
 
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
-            twitterApi.apiConnection = mock.Object;
+            twitterApi.ApiConnection = mock.Object;
 
             await twitterApi.MediaMetadataCreate(mediaId: 12345L, altText: "hogehoge")
                 .ConfigureAwait(false);
index e6da572..8f840e8 100644 (file)
@@ -57,7 +57,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -96,7 +96,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -134,7 +134,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -175,7 +175,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -203,7 +203,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -234,7 +234,7 @@ namespace OpenTween.Connection
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
             using var image = TestUtils.CreateDummyImage();
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
@@ -280,7 +280,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(async x =>
             {
@@ -322,7 +322,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.httpUpload = http;
+            apiConnection.HttpUpload = http;
 
             using var image = TestUtils.CreateDummyImage();
             using var media = new MemoryImageMediaItem(image);
@@ -393,7 +393,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.httpUpload = http;
+            apiConnection.HttpUpload = http;
 
             mockHandler.Enqueue(async x =>
             {
@@ -439,7 +439,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(async x =>
             {
@@ -471,7 +471,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(async x =>
             {
@@ -511,7 +511,7 @@ namespace OpenTween.Connection
             using var mockHandler = new HttpMessageHandlerMock();
             using var http = new HttpClient(mockHandler);
             using var apiConnection = new TwitterApiConnection(ApiKey.Create(""), ApiKey.Create(""), "", "");
-            apiConnection.http = http;
+            apiConnection.Http = http;
 
             mockHandler.Enqueue(x =>
             {
index 6949084..188e1b0 100644 (file)
@@ -32,7 +32,7 @@ namespace OpenTween
     {
         private class TestDebounceTimer : DebounceTimer
         {
-            public MockTimer mockTimer = new MockTimer(() => Task.CompletedTask);
+            public MockTimer MockTimer = new MockTimer(() => Task.CompletedTask);
 
             public TestDebounceTimer(Func<Task> timerCallback, TimeSpan interval, bool leading, bool trailing)
                 : base(timerCallback, interval, leading, trailing)
@@ -40,7 +40,7 @@ namespace OpenTween
             }
 
             protected override ITimer CreateTimer(Func<Task> callback)
-                => this.mockTimer = new MockTimer(callback);
+                => this.MockTimer = new MockTimer(callback);
         }
 
         [Fact]
@@ -58,7 +58,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: false, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -113,7 +113,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: false, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -151,7 +151,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: false, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -205,7 +205,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: true, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -260,7 +260,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: true, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -298,7 +298,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: true, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -369,7 +369,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.MaxValue;
                 using var debouncing = new TestDebounceTimer(callback, interval, leading: false, trailing: true);
-                var mockTimer = debouncing.mockTimer;
+                var mockTimer = debouncing.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
index 046d6b4..d9d56bd 100644 (file)
@@ -31,7 +31,7 @@ namespace OpenTween
 {
     public class LRUCacheDictionaryTest
     {
-        private static readonly AnyOrderComparer<string> collComparer = AnyOrderComparer<string>.Instance;
+        private static readonly AnyOrderComparer<string> CollComparer = AnyOrderComparer<string>.Instance;
 
         [Fact]
         public void InnerListTest()
@@ -43,7 +43,7 @@ namespace OpenTween
                 ["key3"] = "value3",
             };
 
-            var node = dict.innerList.First;
+            var node = dict.InnerList.First;
             Assert.Equal("key3", node.Value.Key);
             node = node.Next;
             Assert.Equal("key2", node.Value.Key);
@@ -56,7 +56,7 @@ namespace OpenTween
             _ = dict["key1"];
 
             // 直近に参照した順で並んでいるかテスト
-            node = dict.innerList.First;
+            node = dict.InnerList.First;
             Assert.Equal("key1", node.Value.Key);
             node = node.Next;
             Assert.Equal("key3", node.Value.Key);
@@ -140,7 +140,7 @@ namespace OpenTween
             dict["key4"] = "value4"; // 4アクセス目 (この直後にTrim)
 
             // 1 -> 2 -> 3 -> 4 の順にアクセスしたため、直近 3 件の 2, 3, 4 だけが残る
-            Assert.Equal(new[] { "key2", "key3", "key4" }, dict.innerDict.Keys, collComparer);
+            Assert.Equal(new[] { "key2", "key3", "key4" }, dict.InnerDict.Keys, CollComparer);
 
             dict["key5"] = "value5";         // 5アクセス目
             dict.Add("key6", "value6");      // 6アクセス目
@@ -148,7 +148,7 @@ namespace OpenTween
             dict.TryGetValue("key4", out _); // 8アクセス目 (この直後にTrim)
 
             // 5 -> 6 -> 2 -> 4 の順でアクセスしたため、直近 3 件の 6, 2, 4 だけが残る
-            Assert.Equal(new[] { "key6", "key2", "key4" }, dict.innerDict.Keys, collComparer);
+            Assert.Equal(new[] { "key6", "key2", "key4" }, dict.InnerDict.Keys, CollComparer);
         }
 
         [Fact]
@@ -170,7 +170,7 @@ namespace OpenTween
             dict.Trim();
 
             // 直近に参照された 3, 4 以外のアイテムに対してイベントが発生しているはず
-            Assert.Equal(new[] { "key1", "key2" }, removedList, collComparer);
+            Assert.Equal(new[] { "key1", "key2" }, removedList, CollComparer);
         }
 
         // ここから下は IDictionary としての機能が正しく動作するかのテスト
@@ -182,17 +182,17 @@ namespace OpenTween
 
             dict.Add("key1", "value1");
 
-            Assert.Single(dict.innerDict);
-            Assert.True(dict.innerDict.ContainsKey("key1"));
-            var internalNode = dict.innerDict["key1"];
+            Assert.Single(dict.InnerDict);
+            Assert.True(dict.InnerDict.ContainsKey("key1"));
+            var internalNode = dict.InnerDict["key1"];
             Assert.Equal("key1", internalNode.Value.Key);
             Assert.Equal("value1", internalNode.Value.Value);
 
             dict.Add("key2", "value2");
 
-            Assert.Equal(2, dict.innerDict.Count);
-            Assert.True(dict.innerDict.ContainsKey("key2"));
-            internalNode = dict.innerDict["key2"];
+            Assert.Equal(2, dict.InnerDict.Count);
+            Assert.True(dict.InnerDict.ContainsKey("key2"));
+            internalNode = dict.InnerDict["key2"];
             Assert.Equal("key2", internalNode.Value.Key);
             Assert.Equal("value2", internalNode.Value.Value);
         }
@@ -242,17 +242,17 @@ namespace OpenTween
             var ret = dict.Remove("key1");
 
             Assert.True(ret);
-            Assert.Equal(2, dict.innerDict.Count);
-            Assert.Equal(2, dict.innerList.Count);
-            Assert.False(dict.innerDict.ContainsKey("key1"));
-            Assert.True(dict.innerDict.ContainsKey("key2"));
-            Assert.True(dict.innerDict.ContainsKey("key3"));
+            Assert.Equal(2, dict.InnerDict.Count);
+            Assert.Equal(2, dict.InnerList.Count);
+            Assert.False(dict.InnerDict.ContainsKey("key1"));
+            Assert.True(dict.InnerDict.ContainsKey("key2"));
+            Assert.True(dict.InnerDict.ContainsKey("key3"));
 
             dict.Remove("key2");
             dict.Remove("key3");
 
-            Assert.Empty(dict.innerDict);
-            Assert.Empty(dict.innerList);
+            Assert.Empty(dict.InnerDict);
+            Assert.Empty(dict.InnerList);
 
             ret = dict.Remove("hogehoge");
             Assert.False(ret);
@@ -271,11 +271,11 @@ namespace OpenTween
             var ret = dict.Remove(new KeyValuePair<string, string>("key1", "value1"));
 
             Assert.True(ret);
-            Assert.Equal(2, dict.innerDict.Count);
-            Assert.Equal(2, dict.innerList.Count);
-            Assert.False(dict.innerDict.ContainsKey("key1"));
-            Assert.True(dict.innerDict.ContainsKey("key2"));
-            Assert.True(dict.innerDict.ContainsKey("key3"));
+            Assert.Equal(2, dict.InnerDict.Count);
+            Assert.Equal(2, dict.InnerList.Count);
+            Assert.False(dict.InnerDict.ContainsKey("key1"));
+            Assert.True(dict.InnerDict.ContainsKey("key2"));
+            Assert.True(dict.InnerDict.ContainsKey("key3"));
 
             ret = dict.Remove(new KeyValuePair<string, string>("key2", "hogehoge"));
             Assert.False(ret);
@@ -283,8 +283,8 @@ namespace OpenTween
             dict.Remove(new KeyValuePair<string, string>("key2", "value2"));
             dict.Remove(new KeyValuePair<string, string>("key3", "value3"));
 
-            Assert.Empty(dict.innerDict);
-            Assert.Empty(dict.innerList);
+            Assert.Empty(dict.InnerDict);
+            Assert.Empty(dict.InnerList);
 
             ret = dict.Remove(new KeyValuePair<string, string>("hogehoge", "hogehoge"));
             Assert.False(ret);
@@ -318,11 +318,11 @@ namespace OpenTween
             };
 
             dict["key1"] = "foo";
-            Assert.Equal("foo", dict.innerDict["key1"].Value.Value);
+            Assert.Equal("foo", dict.InnerDict["key1"].Value.Value);
 
             dict["hogehoge"] = "bar";
-            Assert.True(dict.innerDict.ContainsKey("hogehoge"));
-            Assert.Equal("bar", dict.innerDict["hogehoge"].Value.Value);
+            Assert.True(dict.InnerDict.ContainsKey("hogehoge"));
+            Assert.Equal("bar", dict.InnerDict["hogehoge"].Value.Value);
         }
 
         [Fact]
@@ -354,13 +354,13 @@ namespace OpenTween
                 ["key3"] = "value3",
             };
 
-            Assert.Equal(new[] { "key1", "key2", "key3" }, dict.Keys, collComparer);
+            Assert.Equal(new[] { "key1", "key2", "key3" }, dict.Keys, CollComparer);
 
             dict.Add("foo", "bar");
-            Assert.Equal(new[] { "key1", "key2", "key3", "foo" }, dict.Keys, collComparer);
+            Assert.Equal(new[] { "key1", "key2", "key3", "foo" }, dict.Keys, CollComparer);
 
             dict.Remove("key2");
-            Assert.Equal(new[] { "key1", "key3", "foo" }, dict.Keys, collComparer);
+            Assert.Equal(new[] { "key1", "key3", "foo" }, dict.Keys, CollComparer);
 
             dict.Clear();
             Assert.Empty(dict.Keys);
@@ -376,13 +376,13 @@ namespace OpenTween
                 ["key3"] = "value3",
             };
 
-            Assert.Equal(new[] { "value1", "value2", "value3" }, dict.Values, collComparer);
+            Assert.Equal(new[] { "value1", "value2", "value3" }, dict.Values, CollComparer);
 
             dict.Add("foo", "bar");
-            Assert.Equal(new[] { "value1", "value2", "value3", "bar" }, dict.Values, collComparer);
+            Assert.Equal(new[] { "value1", "value2", "value3", "bar" }, dict.Values, CollComparer);
 
             dict.Remove("key2");
-            Assert.Equal(new[] { "value1", "value3", "bar" }, dict.Values, collComparer);
+            Assert.Equal(new[] { "value1", "value3", "bar" }, dict.Values, CollComparer);
 
             dict.Clear();
             Assert.Empty(dict.Values);
index a29340b..94bf93d 100644 (file)
@@ -399,7 +399,7 @@ namespace OpenTween.Models
 
         class FakeExpandedUrlInfo : PostClass.ExpandedUrlInfo
         {
-            public TaskCompletionSource<string> fakeResult = new TaskCompletionSource<string>();
+            public TaskCompletionSource<string> FakeResult = new TaskCompletionSource<string>();
 
             public FakeExpandedUrlInfo(string url, string expandedUrl, bool deepExpand)
                 : base(url, expandedUrl, deepExpand)
@@ -407,7 +407,7 @@ namespace OpenTween.Models
             }
 
             protected override async Task DeepExpandAsync()
-                => this._expandedUrl = await this.fakeResult.Task;
+                => this._expandedUrl = await this.FakeResult.Task;
         }
 
         [Fact]
@@ -442,7 +442,7 @@ namespace OpenTween.Models
             Assert.Equal("<a href=\"http://t.co/aaaaaaa\" title=\"http://bit.ly/abcde\">bit.ly/abcde</a>", post.Text);
 
             // bit.ly 展開後の URL は「http://example.com/abcde」
-            urlInfo.fakeResult.SetResult("http://example.com/abcde");
+            urlInfo.FakeResult.SetResult("http://example.com/abcde");
             await urlInfo.ExpandTask;
 
             // ExpandedUrlInfo による展開が完了した後の状態
index 8d1259f..63142f2 100644 (file)
@@ -38,7 +38,7 @@ namespace OpenTween.Models
             this.tabinfo = this.CreateInstance();
 
             // TabInformation.GetInstance() で取得できるようにする
-            var field = typeof(TabInformations).GetField("_instance",
+            var field = typeof(TabInformations).GetField("Instance",
                 BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.SetField);
             field.SetValue(null, this.tabinfo);
 
index 66e1118..55fed12 100644 (file)
@@ -155,7 +155,7 @@ namespace OpenTween
         [InlineData(Keys.Control | Keys.Alt, new[] { Keys.Control, Keys.Alt }, true)]
         [InlineData(Keys.Control | Keys.Alt, new[] { Keys.Shift }, false)]
         public void IsKeyDownTest(Keys modifierKeys, Keys[] checkKeys, bool expected)
-            => Assert.Equal(expected, MyCommon._IsKeyDown(modifierKeys, checkKeys));
+            => Assert.Equal(expected, MyCommon.IsKeyDownInternal(modifierKeys, checkKeys));
 
         [Fact]
         public void GetAssemblyNameTest()
index 0b3ca53..429c690 100644 (file)
@@ -47,7 +47,7 @@ namespace OpenTween
             this.tabinfo.AddTab(new FilterTabModel("MyTab1"));
 
             // 一応 TabInformation.GetInstance() でも取得できるようにする
-            var field = typeof(TabInformations).GetField("_instance",
+            var field = typeof(TabInformations).GetField("Instance",
                 BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.SetField);
             field.SetValue(null, this.tabinfo);
         }
index c43e95c..cbb9e36 100644 (file)
@@ -59,12 +59,12 @@ namespace OpenTween
         {
             T? raisedEvent = null;
 
-            void handler(object s, T e)
+            void Handler(object s, T e)
                 => raisedEvent = e;
 
             try
             {
-                attach(handler);
+                attach(Handler);
                 await testCode().ConfigureAwait(false);
 
                 if (raisedEvent != null)
@@ -72,13 +72,13 @@ namespace OpenTween
             }
             finally
             {
-                detach(handler);
+                detach(Handler);
             }
         }
 
         public static void NotPropertyChanged(INotifyPropertyChanged @object, string propertyName, Action testCode)
         {
-            void handler(object s, PropertyChangedEventArgs e)
+            void Handler(object s, PropertyChangedEventArgs e)
             {
                 if (s == @object && e.PropertyName == propertyName)
                     throw new Xunit.Sdk.PropertyChangedException(propertyName);
@@ -86,12 +86,12 @@ namespace OpenTween
 
             try
             {
-                @object.PropertyChanged += handler;
+                @object.PropertyChanged += Handler;
                 testCode();
             }
             finally
             {
-                @object.PropertyChanged -= handler;
+                @object.PropertyChanged -= Handler;
             }
         }
 
index 66a5122..695416b 100644 (file)
@@ -33,7 +33,7 @@ namespace OpenTween
     {
         private class TestThrottleTimer : ThrottleTimer
         {
-            public MockTimer mockTimer = new MockTimer(() => Task.CompletedTask);
+            public MockTimer MockTimer = new MockTimer(() => Task.CompletedTask);
 
             public TestThrottleTimer(Func<Task> timerCallback, TimeSpan interval)
                 : base(timerCallback, interval)
@@ -41,7 +41,7 @@ namespace OpenTween
             }
 
             protected override ITimer CreateTimer(Func<Task> callback)
-                => this.mockTimer = new MockTimer(callback);
+                => this.MockTimer = new MockTimer(callback);
         }
 
         [Fact]
@@ -59,7 +59,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.FromMinutes(2);
                 using var throttling = new TestThrottleTimer(callback, interval);
-                var mockTimer = throttling.mockTimer;
+                var mockTimer = throttling.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -114,7 +114,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.FromMinutes(2);
                 using var throttling = new TestThrottleTimer(callback, interval);
-                var mockTimer = throttling.mockTimer;
+                var mockTimer = throttling.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
@@ -152,7 +152,7 @@ namespace OpenTween
                 var interval = TimeSpan.FromMinutes(2);
                 var maxWait = TimeSpan.FromMinutes(2);
                 using var throttling = new TestThrottleTimer(callback, interval);
-                var mockTimer = throttling.mockTimer;
+                var mockTimer = throttling.MockTimer;
 
                 Assert.Equal(0, count);
                 Assert.False(mockTimer.IsTimerRunning);
index 087f9dd..e6bba7f 100644 (file)
@@ -32,7 +32,7 @@ namespace OpenTween
     {
         private class TestTimelineScheduler : TimelineScheduler
         {
-            public MockTimer mockTimer = new MockTimer(() => Task.CompletedTask);
+            public MockTimer MockTimer = new MockTimer(() => Task.CompletedTask);
 
             public TestTimelineScheduler()
                 : base()
@@ -40,7 +40,7 @@ namespace OpenTween
             }
 
             protected override ITimer CreateTimer(Func<Task> callback)
-                => this.mockTimer = new MockTimer(callback);
+                => this.MockTimer = new MockTimer(callback);
         }
 
         [Fact]
@@ -49,7 +49,7 @@ namespace OpenTween
             using (TestUtils.FreezeTime(new DateTimeUtc(2022, 1, 1, 0, 0, 0)))
             {
                 using var scheduler = new TestTimelineScheduler();
-                var mockTimer = scheduler.mockTimer;
+                var mockTimer = scheduler.MockTimer;
 
                 Assert.False(mockTimer.IsTimerRunning);
 
@@ -80,7 +80,7 @@ namespace OpenTween
             using (TestUtils.FreezeTime(new DateTimeUtc(2022, 1, 1, 0, 0, 0)))
             {
                 using var scheduler = new TestTimelineScheduler();
-                var mockTimer = scheduler.mockTimer;
+                var mockTimer = scheduler.MockTimer;
 
                 Assert.False(mockTimer.IsTimerRunning);
 
@@ -125,7 +125,7 @@ namespace OpenTween
             using (TestUtils.FreezeTime(new DateTimeUtc(2022, 1, 1, 0, 0, 0)))
             {
                 using var scheduler = new TestTimelineScheduler();
-                var mockTimer = scheduler.mockTimer;
+                var mockTimer = scheduler.MockTimer;
 
                 scheduler.Enabled = true;
                 Assert.False(mockTimer.IsTimerRunning);
@@ -145,7 +145,7 @@ namespace OpenTween
             using (TestUtils.FreezeTime(new DateTimeUtc(2022, 1, 1, 0, 0, 0)))
             {
                 using var scheduler = new TestTimelineScheduler();
-                var mockTimer = scheduler.mockTimer;
+                var mockTimer = scheduler.MockTimer;
 
                 scheduler.Enabled = true;
                 Assert.False(mockTimer.IsTimerRunning);
@@ -161,7 +161,7 @@ namespace OpenTween
             using (TestUtils.FreezeTime(new DateTimeUtc(2022, 1, 1, 0, 0, 0)))
             {
                 using var scheduler = new TestTimelineScheduler();
-                var mockTimer = scheduler.mockTimer;
+                var mockTimer = scheduler.MockTimer;
 
                 scheduler.Enabled = true;
                 Assert.False(mockTimer.IsTimerRunning);
index 983967a..c8535b7 100644 (file)
@@ -91,18 +91,18 @@ namespace OpenTween
 
                 toolStrip.GaugeHeight = 5;
 
-                Assert.Equal(new Rectangle(0, 0, 100, 5), toolStrip.apiGaugeBounds);
-                Assert.Equal(new Rectangle(0, 5, 100, 5), toolStrip.timeGaugeBounds);
+                Assert.Equal(new Rectangle(0, 0, 100, 5), toolStrip.ApiGaugeBounds);
+                Assert.Equal(new Rectangle(0, 5, 100, 5), toolStrip.TimeGaugeBounds);
 
                 toolStrip.GaugeHeight = 3;
 
-                Assert.Equal(new Rectangle(0, 2, 100, 3), toolStrip.apiGaugeBounds);
-                Assert.Equal(new Rectangle(0, 5, 100, 3), toolStrip.timeGaugeBounds);
+                Assert.Equal(new Rectangle(0, 2, 100, 3), toolStrip.ApiGaugeBounds);
+                Assert.Equal(new Rectangle(0, 5, 100, 3), toolStrip.TimeGaugeBounds);
 
                 toolStrip.GaugeHeight = 0;
 
-                Assert.Equal(Rectangle.Empty, toolStrip.apiGaugeBounds);
-                Assert.Equal(Rectangle.Empty, toolStrip.timeGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.ApiGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.TimeGaugeBounds);
 
                 MyCommon.TwitterApiInfo.AccessLimit.Clear();
             }
@@ -186,19 +186,19 @@ namespace OpenTween
 
                 // toolStrip.ApiEndpoint の初期値は null
 
-                Assert.Equal(Rectangle.Empty, toolStrip.apiGaugeBounds);
-                Assert.Equal(Rectangle.Empty, toolStrip.timeGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.ApiGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.TimeGaugeBounds);
 
                 MyCommon.TwitterApiInfo.AccessLimit["endpoint"] = new ApiLimit(150, 60, now + TimeSpan.FromMinutes(3));
                 toolStrip.ApiEndpoint = "endpoint";
 
-                Assert.Equal(new Rectangle(0, 0, 40, 5), toolStrip.apiGaugeBounds); // 40% (60/150)
-                Assert.Equal(new Rectangle(0, 5, 20, 5), toolStrip.timeGaugeBounds); // 20% (3/15)
+                Assert.Equal(new Rectangle(0, 0, 40, 5), toolStrip.ApiGaugeBounds); // 40% (60/150)
+                Assert.Equal(new Rectangle(0, 5, 20, 5), toolStrip.TimeGaugeBounds); // 20% (3/15)
 
                 toolStrip.ApiEndpoint = "";
 
-                Assert.Equal(Rectangle.Empty, toolStrip.apiGaugeBounds);
-                Assert.Equal(Rectangle.Empty, toolStrip.timeGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.ApiGaugeBounds);
+                Assert.Equal(Rectangle.Empty, toolStrip.TimeGaugeBounds);
 
                 MyCommon.TwitterApiInfo.AccessLimit.Clear();
             }
@@ -223,8 +223,8 @@ namespace OpenTween
             );
             toolStrip.ApiEndpoint = "/statuses/user_timeline";
 
-            Assert.Equal(new Rectangle(0, 0, 99, 5), toolStrip.apiGaugeBounds); // 99% (999999999/1000000000)
-            Assert.Equal(new Rectangle(0, 5, 100, 5), toolStrip.timeGaugeBounds); // 100% (15/15)
+            Assert.Equal(new Rectangle(0, 0, 99, 5), toolStrip.ApiGaugeBounds); // 99% (999999999/1000000000)
+            Assert.Equal(new Rectangle(0, 5, 100, 5), toolStrip.TimeGaugeBounds); // 100% (15/15)
             Assert.Equal("API 999999999/1000000000", toolStrip.Text);
             Assert.Equal("API rest /statuses/user_timeline 999999999/1000000000" + Environment.NewLine + "(reset after 15 minutes)", toolStrip.ToolTipText);
 
index 0af4079..4aefa50 100644 (file)
@@ -157,16 +157,16 @@ namespace OpenTween
                 var method = typeof(TweetThumbnail).GetMethod("SetThumbnailCount", BindingFlags.Instance | BindingFlags.NonPublic);
                 method.Invoke(thumbbox, new[] { (object)count });
 
-                Assert.Equal(count, thumbbox.pictureBox.Count);
+                Assert.Equal(count, thumbbox.PictureBox.Count);
 
                 var num = 0;
-                foreach (var picbox in thumbbox.pictureBox)
+                foreach (var picbox in thumbbox.PictureBox)
                 {
                     Assert.Equal("pictureBox" + num, picbox.Name);
                     num++;
                 }
 
-                Assert.Equal(thumbbox.pictureBox, thumbbox.panelPictureBox.Controls.Cast<OTPictureBox>());
+                Assert.Equal(thumbbox.PictureBox, thumbbox.panelPictureBox.Controls.Cast<OTPictureBox>());
 
                 Assert.Equal(0, thumbbox.scrollBar.Minimum);
 
@@ -197,16 +197,16 @@ namespace OpenTween
                 Assert.Equal(0, thumbbox.scrollBar.Maximum);
                 Assert.False(thumbbox.scrollBar.Enabled);
 
-                Assert.Single(thumbbox.pictureBox);
-                Assert.NotNull(thumbbox.pictureBox[0].Image);
+                Assert.Single(thumbbox.PictureBox);
+                Assert.NotNull(thumbbox.PictureBox[0].Image);
 
-                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.pictureBox[0].Tag);
-                var thumbinfo = (ThumbnailInfo)thumbbox.pictureBox[0].Tag;
+                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.PictureBox[0].Tag);
+                var thumbinfo = (ThumbnailInfo)thumbbox.PictureBox[0].Tag;
 
                 Assert.Equal("http://foo.example.com/abcd", thumbinfo.MediaPageUrl);
                 Assert.Equal("http://img.example.com/abcd.png", thumbinfo.ThumbnailImageUrl);
 
-                Assert.Equal("", thumbbox.toolTip.GetToolTip(thumbbox.pictureBox[0]));
+                Assert.Equal("", thumbbox.toolTip.GetToolTip(thumbbox.PictureBox[0]));
             }
         }
 
@@ -231,24 +231,24 @@ namespace OpenTween
                 Assert.Equal(1, thumbbox.scrollBar.Maximum);
                 Assert.True(thumbbox.scrollBar.Enabled);
 
-                Assert.Equal(2, thumbbox.pictureBox.Count);
-                Assert.NotNull(thumbbox.pictureBox[0].Image);
-                Assert.NotNull(thumbbox.pictureBox[1].Image);
+                Assert.Equal(2, thumbbox.PictureBox.Count);
+                Assert.NotNull(thumbbox.PictureBox[0].Image);
+                Assert.NotNull(thumbbox.PictureBox[1].Image);
 
-                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.pictureBox[0].Tag);
-                var thumbinfo = (ThumbnailInfo)thumbbox.pictureBox[0].Tag;
+                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.PictureBox[0].Tag);
+                var thumbinfo = (ThumbnailInfo)thumbbox.PictureBox[0].Tag;
 
                 Assert.Equal("http://foo.example.com/abcd", thumbinfo.MediaPageUrl);
                 Assert.Equal("http://img.example.com/abcd.png", thumbinfo.ThumbnailImageUrl);
 
-                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.pictureBox[1].Tag);
-                thumbinfo = (ThumbnailInfo)thumbbox.pictureBox[1].Tag;
+                Assert.IsAssignableFrom<ThumbnailInfo>(thumbbox.PictureBox[1].Tag);
+                thumbinfo = (ThumbnailInfo)thumbbox.PictureBox[1].Tag;
 
                 Assert.Equal("http://bar.example.com/efgh", thumbinfo.MediaPageUrl);
                 Assert.Equal("http://img.example.com/efgh.png", thumbinfo.ThumbnailImageUrl);
 
-                Assert.Equal("", thumbbox.toolTip.GetToolTip(thumbbox.pictureBox[0]));
-                Assert.Equal("efgh", thumbbox.toolTip.GetToolTip(thumbbox.pictureBox[1]));
+                Assert.Equal("", thumbbox.toolTip.GetToolTip(thumbbox.PictureBox[0]));
+                Assert.Equal("efgh", thumbbox.toolTip.GetToolTip(thumbbox.PictureBox[1]));
             }
         }
 
@@ -316,23 +316,23 @@ namespace OpenTween
 
                 thumbbox.ScrollDown();
                 Assert.Equal(1, thumbbox.scrollBar.Value);
-                Assert.False(thumbbox.pictureBox[0].Visible);
-                Assert.True(thumbbox.pictureBox[1].Visible);
+                Assert.False(thumbbox.PictureBox[0].Visible);
+                Assert.True(thumbbox.PictureBox[1].Visible);
 
                 thumbbox.ScrollDown();
                 Assert.Equal(1, thumbbox.scrollBar.Value);
-                Assert.False(thumbbox.pictureBox[0].Visible);
-                Assert.True(thumbbox.pictureBox[1].Visible);
+                Assert.False(thumbbox.PictureBox[0].Visible);
+                Assert.True(thumbbox.PictureBox[1].Visible);
 
                 thumbbox.ScrollUp();
                 Assert.Equal(0, thumbbox.scrollBar.Value);
-                Assert.True(thumbbox.pictureBox[0].Visible);
-                Assert.False(thumbbox.pictureBox[1].Visible);
+                Assert.True(thumbbox.PictureBox[0].Visible);
+                Assert.False(thumbbox.PictureBox[1].Visible);
 
                 thumbbox.ScrollUp();
                 Assert.Equal(0, thumbbox.scrollBar.Value);
-                Assert.True(thumbbox.pictureBox[0].Visible);
-                Assert.False(thumbbox.pictureBox[1].Visible);
+                Assert.True(thumbbox.PictureBox[0].Visible);
+                Assert.False(thumbbox.PictureBox[1].Visible);
             }
         }
     }
index 8ec9dc0..49dc727 100644 (file)
@@ -48,7 +48,7 @@ namespace OpenTween.Api
         private readonly ApiKey clientId;
         private readonly ApiKey clientSecret;
 
-        private HttpClient http => this.localHttpClient ?? Networking.Http;
+        private HttpClient Http => this.localHttpClient ?? Networking.Http;
         private readonly HttpClient? localHttpClient;
 
         public BitlyApi()
@@ -90,7 +90,7 @@ namespace OpenTween.Api
             var requestUri = new Uri(new Uri(ApiBase, endpoint), "?" + MyCommon.BuildQueryString(paramWithToken));
             using var request = new HttpRequestMessage(HttpMethod.Get, requestUri);
 
-            using var response = await this.http.SendAsync(request)
+            using var response = await this.Http.SendAsync(request)
                 .ConfigureAwait(false);
 
             return await response.Content.ReadAsStringAsync()
@@ -121,7 +121,7 @@ namespace OpenTween.Api
 
             request.Content = postContent;
 
-            using var response = await this.http.SendAsync(request)
+            using var response = await this.Http.SendAsync(request)
                 .ConfigureAwait(false);
             var responseBytes = await response.Content.ReadAsByteArrayAsync()
                 .ConfigureAwait(false);
index 8dcdc19..2c2bda1 100644 (file)
@@ -38,9 +38,9 @@ namespace OpenTween.Api
         public long CurrentUserId { get; private set; }
         public string CurrentScreenName { get; private set; } = "";
 
-        public IApiConnection Connection => this.apiConnection ?? throw new InvalidOperationException();
+        public IApiConnection Connection => this.ApiConnection ?? throw new InvalidOperationException();
 
-        internal IApiConnection? apiConnection;
+        internal IApiConnection? ApiConnection;
 
         private readonly ApiKey consumerKey;
         private readonly ApiKey consumerSecret;
@@ -54,7 +54,7 @@ namespace OpenTween.Api
         public void Initialize(string accessToken, string accessSecret, long userId, string screenName)
         {
             var newInstance = new TwitterApiConnection(this.consumerKey, this.consumerSecret, accessToken, accessSecret);
-            var oldInstance = Interlocked.Exchange(ref this.apiConnection, newInstance);
+            var oldInstance = Interlocked.Exchange(ref this.ApiConnection, newInstance);
             oldInstance?.Dispose();
 
             this.CurrentUserId = userId;
@@ -788,6 +788,6 @@ namespace OpenTween.Api
             => ((TwitterApiConnection)this.Connection).CreateOAuthEchoHandler(authServiceProvider, realm);
 
         public void Dispose()
-            => this.apiConnection?.Dispose();
+            => this.ApiConnection?.Dispose();
     }
 }
index cbeb0cc..b6afa61 100644 (file)
@@ -50,8 +50,8 @@ namespace OpenTween
     {
         public event EventHandler<IntervalChangedEventArgs>? IntervalChanged;
 
-        internal Twitter tw = null!;
-        internal TwitterApi twitterApi = null!;
+        internal Twitter Tw = null!;
+        internal TwitterApi TwitterApi = null!;
 
         public AppendSettingDialog()
         {
@@ -83,7 +83,7 @@ namespace OpenTween
             this.ConnectionPanel.LoadConfig(settingCommon);
             this.NotifyPanel.LoadConfig(settingCommon);
 
-            var activeUser = settingCommon.UserAccounts.FirstOrDefault(x => x.UserId == this.tw.UserId);
+            var activeUser = settingCommon.UserAccounts.FirstOrDefault(x => x.UserId == this.Tw.UserId);
             if (activeUser != null)
             {
                 this.BasedPanel.AuthUserCombo.SelectedItem = activeUser;
@@ -112,12 +112,12 @@ namespace OpenTween
             if (userAccountIdx != -1)
             {
                 var u = settingCommon.UserAccounts[userAccountIdx];
-                this.tw.Initialize(u.Token, u.TokenSecret, u.Username, u.UserId);
+                this.Tw.Initialize(u.Token, u.TokenSecret, u.Username, u.UserId);
             }
             else
             {
-                this.tw.ClearAuthInfo();
-                this.tw.Initialize("", "", "", 0);
+                this.Tw.ClearAuthInfo();
+                this.Tw.Initialize("", "", "", 0);
             }
         }
 
@@ -141,7 +141,7 @@ namespace OpenTween
 
         private void Setting_FormClosing(object sender, FormClosingEventArgs e)
         {
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             if (this.BasedPanel.AuthUserCombo.SelectedIndex == -1 && e.CloseReason == CloseReason.None)
             {
index 5830702..e7ff30a 100644 (file)
@@ -84,7 +84,7 @@ namespace OpenTween
 
             {
                 // 同じ設定ファイルを使用する OpenTween プロセスの二重起動を防止する
-                var pt = MyCommon.settingPath.Replace("\\", "/") + "/" + ApplicationSettings.AssemblyName;
+                var pt = MyCommon.SettingPath.Replace("\\", "/") + "/" + ApplicationSettings.AssemblyName;
                 using var mt = new Mutex(false, pt);
 
                 if (!mt.WaitOne(0, false))
@@ -307,12 +307,12 @@ namespace OpenTween
                     return false;
                 }
 
-                MyCommon.settingPath = Path.GetFullPath(configDir);
+                MyCommon.SettingPath = Path.GetFullPath(configDir);
             }
             else
             {
                 // OpenTween.exe と同じディレクトリに設定ファイルを配置する
-                MyCommon.settingPath = Application.StartupPath;
+                MyCommon.SettingPath = Application.StartupPath;
 
                 SettingManager.LoadAll();
 
@@ -333,7 +333,7 @@ namespace OpenTween
                     });
                     Directory.CreateDirectory(roamingDir);
 
-                    MyCommon.settingPath = roamingDir;
+                    MyCommon.SettingPath = roamingDir;
 
                     /*
                      * 書き込みが制限されたディレクトリ内で起動された場合の設定ファイルの扱い
@@ -370,7 +370,7 @@ namespace OpenTween
                         if (startupDirFile.Exists)
                         {
                             // StartupPath に設定ファイルが存在し、Roaming 内のファイルよりも新しい場合のみ警告を表示する
-                            var message = string.Format(Properties.Resources.SettingPath_Relocation, Application.StartupPath, MyCommon.settingPath);
+                            var message = string.Format(Properties.Resources.SettingPath_Relocation, Application.StartupPath, MyCommon.SettingPath);
                             MessageBox.Show(message, ApplicationSettings.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                         }
 
index cbeac65..2825811 100644 (file)
@@ -41,8 +41,8 @@ namespace OpenTween
     {
         public string StartsWith { get; set; } = "";
 
-        public string inputText = "";
-        public bool isBack = false;
+        public string InputText { get; set; } = "";
+        private bool isBack = false;
         private readonly string startChar = "";
 
         public void AddItem(string id)
@@ -76,13 +76,13 @@ namespace OpenTween
 
         private void ButtonOK_Click(object sender, EventArgs e)
         {
-            this.inputText = this.TextId.Text;
+            this.InputText = this.TextId.Text;
             this.isBack = false;
         }
 
         private void ButtonCancel_Click(object sender, EventArgs e)
         {
-            this.inputText = "";
+            this.InputText = "";
             this.isBack = false;
         }
 
@@ -90,13 +90,13 @@ namespace OpenTween
         {
             if (e.KeyCode == Keys.Back && MyCommon.IsNullOrEmpty(this.TextId.Text))
             {
-                this.inputText = "";
+                this.InputText = "";
                 this.isBack = true;
                 this.Close();
             }
             else if (e.KeyCode == Keys.Space || e.KeyCode == Keys.Tab)
             {
-                this.inputText = this.TextId.Text + " ";
+                this.InputText = this.TextId.Text + " ";
                 this.isBack = false;
                 this.Close();
             }
@@ -152,7 +152,7 @@ namespace OpenTween
         {
             if (e.KeyCode == Keys.Tab)
             {
-                this.inputText = this.TextId.Text + " ";
+                this.InputText = this.TextId.Text + " ";
                 this.isBack = false;
                 this.Close();
             }
index 59b479d..bb5c988 100644 (file)
@@ -54,9 +54,9 @@ namespace OpenTween.Connection
         public string AccessToken { get; }
         public string AccessSecret { get; }
 
-        internal HttpClient http = null!;
-        internal HttpClient httpUpload = null!;
-        internal HttpClient httpStreaming = null!;
+        internal HttpClient Http = null!;
+        internal HttpClient HttpUpload = null!;
+        internal HttpClient HttpStreaming = null!;
 
         private readonly ApiKey consumerKey;
         private readonly ApiKey consumerSecret;
@@ -74,13 +74,13 @@ namespace OpenTween.Connection
 
         private void InitializeHttpClients()
         {
-            this.http = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret);
+            this.Http = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret);
 
-            this.httpUpload = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret);
-            this.httpUpload.Timeout = Networking.UploadImageTimeout;
+            this.HttpUpload = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret);
+            this.HttpUpload.Timeout = Networking.UploadImageTimeout;
 
-            this.httpStreaming = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret, disableGzip: true);
-            this.httpStreaming.Timeout = Timeout.InfiniteTimeSpan;
+            this.HttpStreaming = InitializeHttpClient(this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret, disableGzip: true);
+            this.HttpStreaming.Timeout = Timeout.InfiniteTimeSpan;
         }
 
         public async Task<T> GetAsync<T>(Uri uri, IDictionary<string, string>? param, string? endpointName)
@@ -98,7 +98,7 @@ namespace OpenTween.Connection
 
             try
             {
-                using var response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                using var response = await this.Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 if (endpointName != null)
@@ -161,7 +161,7 @@ namespace OpenTween.Connection
 
             try
             {
-                return await this.http.GetStreamAsync(requestUri)
+                return await this.Http.GetStreamAsync(requestUri)
                     .ConfigureAwait(false);
             }
             catch (HttpRequestException ex)
@@ -184,7 +184,7 @@ namespace OpenTween.Connection
             try
             {
                 var request = new HttpRequestMessage(HttpMethod.Get, requestUri);
-                var response = await this.httpStreaming.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                var response = await this.HttpStreaming.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -214,7 +214,7 @@ namespace OpenTween.Connection
             HttpResponseMessage? response = null;
             try
             {
-                response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                response = await this.Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -261,7 +261,7 @@ namespace OpenTween.Connection
             HttpResponseMessage? response = null;
             try
             {
-                response = await this.httpUpload.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                response = await this.HttpUpload.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -307,7 +307,7 @@ namespace OpenTween.Connection
 
             try
             {
-                using var response = await this.httpUpload.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                using var response = await this.HttpUpload.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -339,7 +339,7 @@ namespace OpenTween.Connection
             HttpResponseMessage? response = null;
             try
             {
-                response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                response = await this.Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -371,7 +371,7 @@ namespace OpenTween.Connection
 
             try
             {
-                using var response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
+                using var response = await this.Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)
                     .ConfigureAwait(false);
 
                 await this.CheckStatusCode(response)
@@ -463,9 +463,9 @@ namespace OpenTween.Connection
             if (disposing)
             {
                 Networking.WebProxyChanged -= this.Networking_WebProxyChanged;
-                this.http.Dispose();
-                this.httpUpload.Dispose();
-                this.httpStreaming.Dispose();
+                this.Http.Dispose();
+                this.HttpUpload.Dispose();
+                this.HttpStreaming.Dispose();
             }
         }
 
index df4d067..c6440d7 100644 (file)
@@ -163,9 +163,9 @@ namespace OpenTween.OpenTweenCustomControl
         [StructLayout(LayoutKind.Sequential)]
         private struct NMHDR
         {
-            public IntPtr hwndFrom;
-            public IntPtr idFrom;
-            public int code;
+            public IntPtr HwndFrom;
+            public IntPtr IdFrom;
+            public int Code;
         }
 
         [DebuggerStepThrough]
@@ -231,7 +231,7 @@ namespace OpenTween.OpenTweenCustomControl
                     var nmhdr = Marshal.PtrToStructure<NMHDR>(m.LParam);
 
                     // Ctrl+クリックで選択状態を変更した場合にイベントが発生しない問題への対処
-                    if (nmhdr.code == LVN_ODSTATECHANGED)
+                    if (nmhdr.Code == LVN_ODSTATECHANGED)
                         this.OnSelectedIndexChanged(EventArgs.Empty);
                     break;
             }
index 4bf426c..43b54d5 100644 (file)
             resources.ApplyResources(this.buttonRuleToggleEnabled, "buttonRuleToggleEnabled");
             this.buttonRuleToggleEnabled.Name = "buttonRuleToggleEnabled";
             this.buttonRuleToggleEnabled.UseVisualStyleBackColor = true;
-            this.buttonRuleToggleEnabled.Click += new System.EventHandler(this.buttonRuleToggleEnabled_Click);
+            this.buttonRuleToggleEnabled.Click += new System.EventHandler(this.ButtonRuleToggleEnabled_Click);
             // 
             // ListFilters
             // 
index ef373cb..3f10a8f 100644 (file)
@@ -1223,7 +1223,7 @@ namespace OpenTween
             }
         }
 
-        private void buttonRuleToggleEnabled_Click(object sender, EventArgs e)
+        private void ButtonRuleToggleEnabled_Click(object sender, EventArgs e)
         {
             if (this.RuleEnableButtonMode == EnableButtonMode.NotSelected)
                 return;
index 56c129e..bb12db0 100644 (file)
@@ -231,7 +231,7 @@ namespace OpenTween
             if (e.KeyChar == '#')
             {
                 this._hashSupl.ShowDialog();
-                if (!MyCommon.IsNullOrEmpty(this._hashSupl.inputText))
+                if (!MyCommon.IsNullOrEmpty(this._hashSupl.InputText))
                 {
                     var fHalf = "";
                     var eHalf = "";
@@ -244,8 +244,8 @@ namespace OpenTween
                     {
                         eHalf = this.UseHashText.Text.Substring(selStart);
                     }
-                    this.UseHashText.Text = fHalf + this._hashSupl.inputText + eHalf;
-                    this.UseHashText.SelectionStart = selStart + this._hashSupl.inputText.Length;
+                    this.UseHashText.Text = fHalf + this._hashSupl.InputText + eHalf;
+                    this.UseHashText.SelectionStart = selStart + this._hashSupl.InputText.Length;
                 }
                 e.Handled = true;
             }
index 3a43de9..738a729 100644 (file)
@@ -39,7 +39,7 @@ namespace OpenTween
         /// <summary>
         /// キャッシュとして URL と取得した画像を対に保持する辞書
         /// </summary>
-        internal LRUCacheDictionary<string, Task<MemoryImage>> innerDictionary;
+        internal LRUCacheDictionary<string, Task<MemoryImage>> InnerDictionary;
 
         /// <summary>
         /// 非同期タスクをキャンセルするためのトークンのもと
@@ -58,8 +58,8 @@ namespace OpenTween
 
         public ImageCache()
         {
-            this.innerDictionary = new LRUCacheDictionary<string, Task<MemoryImage>>(trimLimit: 300, autoTrimCount: 100);
-            this.innerDictionary.CacheRemoved += (s, e) => {
+            this.InnerDictionary = new LRUCacheDictionary<string, Task<MemoryImage>>(trimLimit: 300, autoTrimCount: 100);
+            this.InnerDictionary.CacheRemoved += (s, e) => {
                 // まだ参照されている場合もあるのでDisposeはファイナライザ任せ
                 this.CacheRemoveCount++;
             };
@@ -71,7 +71,7 @@ namespace OpenTween
         /// 保持しているキャッシュの件数
         /// </summary>
         public long CacheCount
-            => this.innerDictionary.Count;
+            => this.InnerDictionary.Count;
 
         /// <summary>
         /// 破棄されたキャッシュの件数
@@ -92,12 +92,12 @@ namespace OpenTween
             {
                 lock (this.lockObject)
                 {
-                    this.innerDictionary.TryGetValue(address, out var cachedImageTask);
+                    this.InnerDictionary.TryGetValue(address, out var cachedImageTask);
 
                     if (cachedImageTask != null)
                     {
                         if (force)
-                            this.innerDictionary.Remove(address);
+                            this.InnerDictionary.Remove(address);
                         else
                             return cachedImageTask;
                     }
@@ -105,7 +105,7 @@ namespace OpenTween
                     cancelToken.ThrowIfCancellationRequested();
 
                     var imageTask = this.FetchImageAsync(address, cancelToken);
-                    this.innerDictionary[address] = imageTask;
+                    this.InnerDictionary[address] = imageTask;
 
                     return imageTask;
                 }
@@ -131,7 +131,7 @@ namespace OpenTween
         {
             lock (this.lockObject)
             {
-                if (!this.innerDictionary.TryGetValue(address, out var imageTask) ||
+                if (!this.InnerDictionary.TryGetValue(address, out var imageTask) ||
                     imageTask.Status != TaskStatus.RanToCompletion)
                     return null;
 
@@ -161,13 +161,13 @@ namespace OpenTween
 
                 lock (this.lockObject)
                 {
-                    foreach (var (_, task) in this.innerDictionary)
+                    foreach (var (_, task) in this.InnerDictionary)
                     {
                         if (task.Status == TaskStatus.RanToCompletion)
                             task.Result?.Dispose();
                     }
 
-                    this.innerDictionary.Clear();
+                    this.InnerDictionary.Clear();
                     this.cancelTokenSource.Dispose();
                 }
             }
index c25e626..7f0c27c 100644 (file)
@@ -42,7 +42,7 @@
             resources.ApplyResources(this.buttonOK, "buttonOK");
             this.buttonOK.Name = "buttonOK";
             this.buttonOK.UseVisualStyleBackColor = true;
-            this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+            this.buttonOK.Click += new System.EventHandler(this.ButtonOK_Click);
             // 
             // buttonCancel
             // 
@@ -50,7 +50,7 @@
             this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.buttonCancel.Name = "buttonCancel";
             this.buttonCancel.UseVisualStyleBackColor = true;
-            this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+            this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
             // 
             // tableLayoutPanel1
             // 
index 869fb30..31b6e67 100644 (file)
@@ -37,10 +37,10 @@ namespace OpenTween
         protected InputDialog()
             => this.InitializeComponent();
 
-        private void buttonOK_Click(object sender, EventArgs e)
+        private void ButtonOK_Click(object sender, EventArgs e)
             => this.DialogResult = DialogResult.OK;
 
-        private void buttonCancel_Click(object sender, EventArgs e)
+        private void ButtonCancel_Click(object sender, EventArgs e)
             => this.DialogResult = DialogResult.Cancel;
 
         public static DialogResult Show(string text, out string inputText)
index b6012ff..75858a0 100644 (file)
@@ -60,10 +60,10 @@ namespace OpenTween
         }
         public event EventHandler<CacheRemovedEventArgs>? CacheRemoved;
 
-        internal LinkedList<KeyValuePair<TKey, TValue>> innerList;
-        internal Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> innerDict;
+        internal LinkedList<KeyValuePair<TKey, TValue>> InnerList;
+        internal Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> InnerDict;
 
-        internal int accessCount = 0;
+        internal int AccessCount = 0;
 
         public LRUCacheDictionary()
             : this(trimLimit: int.MaxValue, autoTrimCount: int.MaxValue)
@@ -75,8 +75,8 @@ namespace OpenTween
             this.TrimLimit = trimLimit;
             this.AutoTrimCount = autoTrimCount;
 
-            this.innerList = new LinkedList<KeyValuePair<TKey, TValue>>();
-            this.innerDict = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
+            this.InnerList = new LinkedList<KeyValuePair<TKey, TValue>>();
+            this.InnerDict = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
         }
 
         /// <summary>
@@ -85,8 +85,8 @@ namespace OpenTween
         /// </summary>
         protected void UpdateAccess(LinkedListNode<KeyValuePair<TKey, TValue>> node)
         {
-            this.innerList.Remove(node);
-            this.innerList.AddFirst(node);
+            this.InnerList.Remove(node);
+            this.InnerList.AddFirst(node);
         }
 
         public bool Trim()
@@ -95,9 +95,9 @@ namespace OpenTween
 
             for (var i = this.Count; i > this.TrimLimit; i--)
             {
-                var node = this.innerList.Last;
-                this.innerList.Remove(node);
-                this.innerDict.Remove(node.Value.Key);
+                var node = this.InnerList.Last;
+                this.InnerList.Remove(node);
+                this.InnerDict.Remove(node.Value.Key);
 
                 this.CacheRemoved?.Invoke(this, new CacheRemovedEventArgs(node.Value));
             }
@@ -107,9 +107,9 @@ namespace OpenTween
 
         internal bool AutoTrim()
         {
-            if (this.accessCount < this.AutoTrimCount) return false;
+            if (this.AccessCount < this.AutoTrimCount) return false;
 
-            this.accessCount = 0; // カウンターをリセット
+            this.AccessCount = 0; // カウンターをリセット
 
             return this.Trim();
         }
@@ -120,49 +120,49 @@ namespace OpenTween
         public void Add(KeyValuePair<TKey, TValue> item)
         {
             var node = new LinkedListNode<KeyValuePair<TKey, TValue>>(item);
-            this.innerList.AddFirst(node);
-            this.innerDict.Add(item.Key, node);
+            this.InnerList.AddFirst(node);
+            this.InnerDict.Add(item.Key, node);
 
-            this.accessCount++;
+            this.AccessCount++;
             this.AutoTrim();
         }
 
         public bool ContainsKey(TKey key)
-            => this.innerDict.ContainsKey(key);
+            => this.InnerDict.ContainsKey(key);
 
         public bool Contains(KeyValuePair<TKey, TValue> item)
         {
-            if (!this.innerDict.TryGetValue(item.Key, out var node)) return false;
+            if (!this.InnerDict.TryGetValue(item.Key, out var node)) return false;
 
             return EqualityComparer<TValue>.Default.Equals(node.Value.Value, item.Value);
         }
 
         public bool Remove(TKey key)
         {
-            if (!this.innerDict.TryGetValue(key, out var node)) return false;
+            if (!this.InnerDict.TryGetValue(key, out var node)) return false;
 
-            this.innerList.Remove(node);
+            this.InnerList.Remove(node);
 
-            return this.innerDict.Remove(key);
+            return this.InnerDict.Remove(key);
         }
 
         public bool Remove(KeyValuePair<TKey, TValue> item)
         {
-            if (!this.innerDict.TryGetValue(item.Key, out var node)) return false;
+            if (!this.InnerDict.TryGetValue(item.Key, out var node)) return false;
 
             if (!EqualityComparer<TValue>.Default.Equals(node.Value.Value, item.Value))
                 return false;
 
-            this.innerList.Remove(node);
+            this.InnerList.Remove(node);
 
-            return this.innerDict.Remove(item.Key);
+            return this.InnerDict.Remove(item.Key);
         }
 
 #pragma warning disable CS8767
         public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
 #pragma warning restore CS8767
         {
-            var ret = this.innerDict.TryGetValue(key, out var node);
+            var ret = this.InnerDict.TryGetValue(key, out var node);
 
             if (!ret)
             {
@@ -173,26 +173,26 @@ namespace OpenTween
             this.UpdateAccess(node);
             value = node.Value.Value;
 
-            this.accessCount++;
+            this.AccessCount++;
             this.AutoTrim();
 
             return true;
         }
 
         public ICollection<TKey> Keys
-            => this.innerDict.Keys;
+            => this.InnerDict.Keys;
 
         public ICollection<TValue> Values
-            => this.innerDict.Values.Select(x => x.Value.Value).ToList();
+            => this.InnerDict.Values.Select(x => x.Value.Value).ToList();
 
         public TValue this[TKey key]
         {
             get
             {
-                var node = this.innerDict[key];
+                var node = this.InnerDict[key];
                 this.UpdateAccess(node);
 
-                this.accessCount++;
+                this.AccessCount++;
                 this.AutoTrim();
 
                 return node.Value.Value;
@@ -201,28 +201,28 @@ namespace OpenTween
             {
                 var pair = new KeyValuePair<TKey, TValue>(key, value);
 
-                if (this.innerDict.TryGetValue(key, out var node))
+                if (this.InnerDict.TryGetValue(key, out var node))
                 {
-                    this.innerList.Remove(node);
+                    this.InnerList.Remove(node);
                     node.Value = pair;
                 }
                 else
                 {
                     node = new LinkedListNode<KeyValuePair<TKey, TValue>>(pair);
-                    this.innerDict[key] = node;
+                    this.InnerDict[key] = node;
                 }
 
-                this.innerList.AddFirst(node);
+                this.InnerList.AddFirst(node);
 
-                this.accessCount++;
+                this.AccessCount++;
                 this.AutoTrim();
             }
         }
 
         public void Clear()
         {
-            this.innerList.Clear();
-            this.innerDict.Clear();
+            this.InnerList.Clear();
+            this.InnerDict.Clear();
         }
 
         public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
@@ -241,13 +241,13 @@ namespace OpenTween
         }
 
         public int Count
-            => this.innerDict.Count;
+            => this.InnerDict.Count;
 
         public bool IsReadOnly
             => false;
 
         public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
-            => this.innerDict.Select(x => x.Value.Value).GetEnumerator();
+            => this.InnerDict.Select(x => x.Value.Value).GetEnumerator();
 
         IEnumerator IEnumerable.GetEnumerator()
             => this.GetEnumerator();
index 65cf871..9e75f75 100644 (file)
@@ -63,7 +63,7 @@
             resources.ApplyResources(this.buttonLogin, "buttonLogin");
             this.buttonLogin.Name = "buttonLogin";
             this.buttonLogin.UseVisualStyleBackColor = true;
-            this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
+            this.buttonLogin.Click += new System.EventHandler(this.ButtonLogin_Click);
             // 
             // buttonCancel
             // 
index e626a6d..08b00d5 100644 (file)
@@ -44,7 +44,7 @@ namespace OpenTween
         public LoginDialog()
             => this.InitializeComponent();
 
-        private async void buttonLogin_Click(object sender, EventArgs e)
+        private async void ButtonLogin_Click(object sender, EventArgs e)
         {
             if (this.LoginCallback == null)
                 return;
index 81056ac..9d17e72 100644 (file)
@@ -76,7 +76,7 @@ namespace OpenTween.Models
         // トランザクション用
         private readonly object LockObj = new object();
 
-        private static readonly TabInformations _instance = new TabInformations();
+        private static readonly TabInformations Instance = new TabInformations();
 
         // List
         private List<ListElement> _lists = new List<ListElement>();
@@ -86,7 +86,7 @@ namespace OpenTween.Models
         }
 
         public static TabInformations GetInstance()
-            => _instance; // singleton
+            => Instance; // singleton
 
         public string SelectedTabName { get; private set; } = "";
 
index 27e4617..6913538 100644 (file)
@@ -60,8 +60,8 @@ namespace OpenTween
     public static class MyCommon
     {
         private static readonly object LockObj = new object();
-        public static bool _endingFlag;        // 終了フラグ
-        public static string settingPath = null!;
+        public static bool EndingFlag { get; set; } // 終了フラグ
+        public static string SettingPath { get; set; } = null!;
 
         public enum IconSizes
         {
@@ -740,9 +740,9 @@ namespace OpenTween
         /// <param name="keys">状態を調べるキー</param>
         /// <returns><paramref name="keys"/> で指定された修飾キーがすべて押されている状態であれば true。それ以外であれば false。</returns>
         public static bool IsKeyDown(params Keys[] keys)
-            => MyCommon._IsKeyDown(Control.ModifierKeys, keys);
+            => MyCommon.IsKeyDownInternal(Control.ModifierKeys, keys);
 
-        internal static bool _IsKeyDown(Keys modifierKeys, Keys[] targetKeys)
+        internal static bool IsKeyDownInternal(Keys modifierKeys, Keys[] targetKeys)
         {
             foreach (var key in targetKeys)
             {
similarity index 96%
rename from OpenTween/nicoms.cs
rename to OpenTween/Nicoms.cs
index a93f7a8..3cac42b 100644 (file)
@@ -30,9 +30,9 @@ using System;
 
 namespace OpenTween
 {
-    public static class nicoms
+    public static class Nicoms
     {
-        private static readonly string[] _nicovideo =
+        private static readonly string[] Nicovideo =
         {
             "www.nicovideo.jp/watch/",
             "live.nicovideo.jp/watch/",
@@ -64,7 +64,7 @@ namespace OpenTween
                 return url;
             }
 
-            foreach (var nv in _nicovideo)
+            foreach (var nv in Nicovideo)
             {
                 if (url.StartsWith(nv, StringComparison.Ordinal))
                     return string.Format("{0}{1}", "https://nico.ms/", url.Substring(nv.Length));
index 5c55c14..1172309 100644 (file)
     <Compile Include="MyLists.Designer.cs">
       <DependentUpon>MyLists.cs</DependentUpon>
     </Compile>
-    <Compile Include="nicoms.cs" />
+    <Compile Include="Nicoms.cs" />
     <Compile Include="OpenURL.cs">
       <SubType>Form</SubType>
     </Compile>
index d8d9104..4e3a4e4 100644 (file)
@@ -75,7 +75,7 @@
             // 
             resources.ApplyResources(this.buttonSearchTimeline, "buttonSearchTimeline");
             this.buttonSearchTimeline.Name = "buttonSearchTimeline";
-            this.buttonSearchTimeline.Click += new System.EventHandler(this.buttonSearchTimeline_Click);
+            this.buttonSearchTimeline.Click += new System.EventHandler(this.ButtonSearchTimeline_Click);
             // 
             // tableLayoutPanel1
             // 
@@ -88,7 +88,7 @@
             // 
             resources.ApplyResources(this.buttonSearchTimelineNew, "buttonSearchTimelineNew");
             this.buttonSearchTimelineNew.Name = "buttonSearchTimelineNew";
-            this.buttonSearchTimelineNew.Click += new System.EventHandler(this.buttonSearchTimelineNew_Click);
+            this.buttonSearchTimelineNew.Click += new System.EventHandler(this.ButtonSearchTimelineNew_Click);
             // 
             // tabControl
             // 
@@ -98,7 +98,7 @@
             this.tabControl.HotTrack = true;
             this.tabControl.Name = "tabControl";
             this.tabControl.SelectedIndex = 0;
-            this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
+            this.tabControl.SelectedIndexChanged += new System.EventHandler(this.TabControl_SelectedIndexChanged);
             // 
             // tabPageTimeline
             // 
             resources.ApplyResources(this.linkLabelSearchHelp, "linkLabelSearchHelp");
             this.linkLabelSearchHelp.Name = "linkLabelSearchHelp";
             this.linkLabelSearchHelp.TabStop = true;
-            this.linkLabelSearchHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelSearchHelp_LinkClicked);
+            this.linkLabelSearchHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabelSearchHelp_LinkClicked);
             // 
             // tableLayoutPanel2
             // 
             // 
             resources.ApplyResources(this.buttonSearchPublic, "buttonSearchPublic");
             this.buttonSearchPublic.Name = "buttonSearchPublic";
-            this.buttonSearchPublic.Click += new System.EventHandler(this.buttonSearchPublic_Click);
+            this.buttonSearchPublic.Click += new System.EventHandler(this.ButtonSearchPublic_Click);
             // 
             // label2
             // 
index 26de068..efdd332 100644 (file)
@@ -131,7 +131,7 @@ namespace OpenTween
         private void SearchWordDialog_Shown(object sender, EventArgs e)
             => this.ActivateSelectedTabPage();
 
-        private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
+        private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
             => this.ActivateSelectedTabPage();
 
         private void ActivateSelectedTabPage()
@@ -150,7 +150,7 @@ namespace OpenTween
             }
         }
 
-        private void buttonSearchTimeline_Click(object sender, EventArgs e)
+        private void ButtonSearchTimeline_Click(object sender, EventArgs e)
         {
             if (MyCommon.IsNullOrEmpty(this.textSearchTimeline.Text))
             {
@@ -169,7 +169,7 @@ namespace OpenTween
             );
         }
 
-        private void buttonSearchTimelineNew_Click(object sender, EventArgs e)
+        private void ButtonSearchTimelineNew_Click(object sender, EventArgs e)
         {
             if (MyCommon.IsNullOrEmpty(this.textSearchTimeline.Text))
             {
@@ -188,7 +188,7 @@ namespace OpenTween
             );
         }
 
-        private void buttonSearchPublic_Click(object sender, EventArgs e)
+        private void ButtonSearchPublic_Click(object sender, EventArgs e)
         {
             if (MyCommon.IsNullOrEmpty(this.textSearchPublic.Text))
             {
@@ -207,7 +207,7 @@ namespace OpenTween
             );
         }
 
-        private async void linkLabelSearchHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        private async void LinkLabelSearchHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         {
             // 「検索オプションの使い方」ページのURL
             const string PublicSearchHelpUrl = "https://support.twitter.com/articles/249059";
index 74b9b9c..a0957d4 100644 (file)
@@ -59,7 +59,7 @@
             resources.ApplyResources(this.buttonSendByMail, "buttonSendByMail");
             this.buttonSendByMail.Name = "buttonSendByMail";
             this.buttonSendByMail.UseVisualStyleBackColor = true;
-            this.buttonSendByMail.Click += new System.EventHandler(this.buttonSendByMail_Click);
+            this.buttonSendByMail.Click += new System.EventHandler(this.ButtonSendByMail_Click);
             // 
             // buttonSendByDM
             // 
@@ -67,7 +67,7 @@
             resources.ApplyResources(this.buttonSendByDM, "buttonSendByDM");
             this.buttonSendByDM.Name = "buttonSendByDM";
             this.buttonSendByDM.UseVisualStyleBackColor = true;
-            this.buttonSendByDM.Click += new System.EventHandler(this.buttonSendByDM_Click);
+            this.buttonSendByDM.Click += new System.EventHandler(this.ButtonSendByDM_Click);
             // 
             // bindingSource
             // 
@@ -79,7 +79,7 @@
             resources.ApplyResources(this.buttonNotSend, "buttonNotSend");
             this.buttonNotSend.Name = "buttonNotSend";
             this.buttonNotSend.UseVisualStyleBackColor = true;
-            this.buttonNotSend.Click += new System.EventHandler(this.buttonNotSend_Click);
+            this.buttonNotSend.Click += new System.EventHandler(this.ButtonNotSend_Click);
             // 
             // textBoxErrorReport
             // 
             resources.ApplyResources(this.buttonReset, "buttonReset");
             this.buttonReset.Name = "buttonReset";
             this.buttonReset.UseVisualStyleBackColor = true;
-            this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
+            this.buttonReset.Click += new System.EventHandler(this.ButtonReset_Click);
             // 
             // pictureBoxIcon
             // 
index 3c319a8..7bed261 100644 (file)
@@ -60,16 +60,16 @@ namespace OpenTween
             this.textBoxErrorReport.DeselectAll();
         }
 
-        private void buttonReset_Click(object sender, EventArgs e)
+        private void ButtonReset_Click(object sender, EventArgs e)
             => this.ErrorReport.Reset();
 
-        private async void buttonSendByMail_Click(object sender, EventArgs e)
+        private async void ButtonSendByMail_Click(object sender, EventArgs e)
         {
             this.DialogResult = DialogResult.OK;
             await this.ErrorReport.SendByMailAsync();
         }
 
-        private async void buttonSendByDM_Click(object sender, EventArgs e)
+        private async void ButtonSendByDM_Click(object sender, EventArgs e)
         {
             this.DialogResult = DialogResult.OK;
 
@@ -86,7 +86,7 @@ namespace OpenTween
             }
         }
 
-        private void buttonNotSend_Click(object sender, EventArgs e)
+        private void ButtonNotSend_Click(object sender, EventArgs e)
             => this.DialogResult = DialogResult.Cancel;
     }
 
index 4e71138..0d94170 100644 (file)
@@ -96,7 +96,7 @@
             resources.ApplyResources(this.btnRetweet, "btnRetweet");
             this.btnRetweet.Name = "btnRetweet";
             this.btnRetweet.UseVisualStyleBackColor = true;
-            this.btnRetweet.Click += new System.EventHandler(this.btnRetweet_Click);
+            this.btnRetweet.Click += new System.EventHandler(this.BtnRetweet_Click);
             // 
             // lblRetweet
             // 
             resources.ApplyResources(this.btnDetailLink, "btnDetailLink");
             this.btnDetailLink.Name = "btnDetailLink";
             this.btnDetailLink.UseVisualStyleBackColor = true;
-            this.btnDetailLink.Click += new System.EventHandler(this.btnDetailLink_Click);
+            this.btnDetailLink.Click += new System.EventHandler(this.BtnDetailLink_Click);
             // 
             // lblDetailLink
             // 
             resources.ApplyResources(this.btnUnread, "btnUnread");
             this.btnUnread.Name = "btnUnread";
             this.btnUnread.UseVisualStyleBackColor = true;
-            this.btnUnread.Click += new System.EventHandler(this.btnUnread_Click);
+            this.btnUnread.Click += new System.EventHandler(this.BtnUnread_Click);
             // 
             // lblUnread
             // 
             resources.ApplyResources(this.btnDetailBack, "btnDetailBack");
             this.btnDetailBack.Name = "btnDetailBack";
             this.btnDetailBack.UseVisualStyleBackColor = true;
-            this.btnDetailBack.Click += new System.EventHandler(this.btnDetailBack_Click);
+            this.btnDetailBack.Click += new System.EventHandler(this.BtnDetailBack_Click);
             // 
             // lblDetailBackcolor
             // 
             resources.ApplyResources(this.btnDetail, "btnDetail");
             this.btnDetail.Name = "btnDetail";
             this.btnDetail.UseVisualStyleBackColor = true;
-            this.btnDetail.Click += new System.EventHandler(this.btnDetail_Click);
+            this.btnDetail.Click += new System.EventHandler(this.BtnDetail_Click);
             // 
             // lblDetail
             // 
             resources.ApplyResources(this.btnOWL, "btnOWL");
             this.btnOWL.Name = "btnOWL";
             this.btnOWL.UseVisualStyleBackColor = true;
-            this.btnOWL.Click += new System.EventHandler(this.btnOWL_Click);
+            this.btnOWL.Click += new System.EventHandler(this.BtnOWL_Click);
             // 
             // lblOWL
             // 
             resources.ApplyResources(this.btnFav, "btnFav");
             this.btnFav.Name = "btnFav";
             this.btnFav.UseVisualStyleBackColor = true;
-            this.btnFav.Click += new System.EventHandler(this.btnFav_Click);
+            this.btnFav.Click += new System.EventHandler(this.BtnFav_Click);
             // 
             // lblFav
             // 
             resources.ApplyResources(this.btnListFont, "btnListFont");
             this.btnListFont.Name = "btnListFont";
             this.btnListFont.UseVisualStyleBackColor = true;
-            this.btnListFont.Click += new System.EventHandler(this.btnListFont_Click);
+            this.btnListFont.Click += new System.EventHandler(this.BtnListFont_Click);
             // 
             // lblListFont
             // 
index 17b7903..7c99f77 100644 (file)
@@ -97,28 +97,28 @@ namespace OpenTween.Setting.Panel
             this.lblRetweet.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Green);
         }
 
-        private void btnListFont_Click(object sender, EventArgs e)
+        private void BtnListFont_Click(object sender, EventArgs e)
             => this.ShowFontDialog(this.lblListFont);
 
-        private void btnUnread_Click(object sender, EventArgs e)
+        private void BtnUnread_Click(object sender, EventArgs e)
             => this.ShowFontDialog(this.lblUnread);
 
-        private void btnFav_Click(object sender, EventArgs e)
+        private void BtnFav_Click(object sender, EventArgs e)
             => this.ShowForeColorDialog(this.lblFav);
 
-        private void btnOWL_Click(object sender, EventArgs e)
+        private void BtnOWL_Click(object sender, EventArgs e)
             => this.ShowForeColorDialog(this.lblOWL);
 
-        private void btnRetweet_Click(object sender, EventArgs e)
+        private void BtnRetweet_Click(object sender, EventArgs e)
             => this.ShowForeColorDialog(this.lblRetweet);
 
-        private void btnDetail_Click(object sender, EventArgs e)
+        private void BtnDetail_Click(object sender, EventArgs e)
             => this.ShowFontDialog(this.lblDetail);
 
-        private void btnDetailLink_Click(object sender, EventArgs e)
+        private void BtnDetailLink_Click(object sender, EventArgs e)
             => this.ShowForeColorDialog(this.lblDetailLink);
 
-        private void btnDetailBack_Click(object sender, EventArgs e)
+        private void BtnDetailBack_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblDetailBackcolor);
     }
 }
index b93012d..8da1552 100644 (file)
             resources.ApplyResources(this.btnInputFont, "btnInputFont");
             this.btnInputFont.Name = "btnInputFont";
             this.btnInputFont.UseVisualStyleBackColor = true;
-            this.btnInputFont.Click += new System.EventHandler(this.btnInputFont_Click);
+            this.btnInputFont.Click += new System.EventHandler(this.BtnInputFont_Click);
             // 
             // btnInputBackcolor
             // 
             resources.ApplyResources(this.btnInputBackcolor, "btnInputBackcolor");
             this.btnInputBackcolor.Name = "btnInputBackcolor";
             this.btnInputBackcolor.UseVisualStyleBackColor = true;
-            this.btnInputBackcolor.Click += new System.EventHandler(this.btnInputBackcolor_Click);
+            this.btnInputBackcolor.Click += new System.EventHandler(this.BtnInputBackcolor_Click);
             // 
             // btnAtTo
             // 
             resources.ApplyResources(this.btnAtTo, "btnAtTo");
             this.btnAtTo.Name = "btnAtTo";
             this.btnAtTo.UseVisualStyleBackColor = true;
-            this.btnAtTo.Click += new System.EventHandler(this.btnAtTo_Click);
+            this.btnAtTo.Click += new System.EventHandler(this.BtnAtTo_Click);
             // 
             // btnListBack
             // 
             resources.ApplyResources(this.btnListBack, "btnListBack");
             this.btnListBack.Name = "btnListBack";
             this.btnListBack.UseVisualStyleBackColor = true;
-            this.btnListBack.Click += new System.EventHandler(this.btnListBack_Click);
+            this.btnListBack.Click += new System.EventHandler(this.BtnListBack_Click);
             // 
             // btnAtFromTarget
             // 
             resources.ApplyResources(this.btnAtFromTarget, "btnAtFromTarget");
             this.btnAtFromTarget.Name = "btnAtFromTarget";
             this.btnAtFromTarget.UseVisualStyleBackColor = true;
-            this.btnAtFromTarget.Click += new System.EventHandler(this.btnAtFromTarget_Click);
+            this.btnAtFromTarget.Click += new System.EventHandler(this.BtnAtFromTarget_Click);
             // 
             // btnAtTarget
             // 
             resources.ApplyResources(this.btnAtTarget, "btnAtTarget");
             this.btnAtTarget.Name = "btnAtTarget";
             this.btnAtTarget.UseVisualStyleBackColor = true;
-            this.btnAtTarget.Click += new System.EventHandler(this.btnAtTarget_Click);
+            this.btnAtTarget.Click += new System.EventHandler(this.BtnAtTarget_Click);
             // 
             // btnTarget
             // 
             resources.ApplyResources(this.btnTarget, "btnTarget");
             this.btnTarget.Name = "btnTarget";
             this.btnTarget.UseVisualStyleBackColor = true;
-            this.btnTarget.Click += new System.EventHandler(this.btnTarget_Click);
+            this.btnTarget.Click += new System.EventHandler(this.BtnTarget_Click);
             // 
             // btnAtSelf
             // 
             resources.ApplyResources(this.btnAtSelf, "btnAtSelf");
             this.btnAtSelf.Name = "btnAtSelf";
             this.btnAtSelf.UseVisualStyleBackColor = true;
-            this.btnAtSelf.Click += new System.EventHandler(this.btnAtSelf_Click);
+            this.btnAtSelf.Click += new System.EventHandler(this.BtnAtSelf_Click);
             // 
             // btnSelf
             // 
             resources.ApplyResources(this.btnSelf, "btnSelf");
             this.btnSelf.Name = "btnSelf";
             this.btnSelf.UseVisualStyleBackColor = true;
-            this.btnSelf.Click += new System.EventHandler(this.btnSelf_Click);
+            this.btnSelf.Click += new System.EventHandler(this.BtnSelf_Click);
             // 
             // lblInputFont
             // 
index 223d713..a515a4a 100644 (file)
@@ -92,31 +92,31 @@ namespace OpenTween.Setting.Panel
             this.lblListBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window);
         }
 
-        private void btnSelf_Click(object sender, EventArgs e)
+        private void BtnSelf_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblSelf);
 
-        private void btnAtSelf_Click(object sender, EventArgs e)
+        private void BtnAtSelf_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblAtSelf);
 
-        private void btnTarget_Click(object sender, EventArgs e)
+        private void BtnTarget_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblTarget);
 
-        private void btnAtTarget_Click(object sender, EventArgs e)
+        private void BtnAtTarget_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblAtTarget);
 
-        private void btnAtFromTarget_Click(object sender, EventArgs e)
+        private void BtnAtFromTarget_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblAtFromTarget);
 
-        private void btnAtTo_Click(object sender, EventArgs e)
+        private void BtnAtTo_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblAtTo);
 
-        private void btnListBack_Click(object sender, EventArgs e)
+        private void BtnListBack_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblListBackcolor);
 
-        private void btnInputBackcolor_Click(object sender, EventArgs e)
+        private void BtnInputBackcolor_Click(object sender, EventArgs e)
             => this.ShowBackColorDialog(this.lblInputBackcolor);
 
-        private void btnInputFont_Click(object sender, EventArgs e)
+        private void BtnInputFont_Click(object sender, EventArgs e)
             => this.ShowFontDialog(this.lblInputFont);
     }
 }
index d54a21b..9b1f9bb 100644 (file)
@@ -51,7 +51,7 @@ namespace OpenTween
         [XmlAnyElement]
         public XmlElement[] ExtraElements = Array.Empty<XmlElement>();
 
-        private static readonly object lockObj = new object();
+        private static readonly object LockObj = new object();
 
         protected static T LoadSettings(string FileId)
         {
@@ -63,7 +63,7 @@ namespace OpenTween
                     return new T();
                 }
 
-                lock (lockObj)
+                lock (LockObj)
                 {
                     using var fs = new FileStream(settingFilePath, FileMode.Open, FileAccess.Read);
                     fs.Position = 0;
@@ -87,7 +87,7 @@ namespace OpenTween
                 {
                     try
                     {
-                        lock (lockObj)
+                        lock (LockObj)
                         {
                             using var fs = new FileStream(backupFile, FileMode.Open, FileAccess.Read);
                             fs.Position = 0;
@@ -125,7 +125,7 @@ namespace OpenTween
                 var tmpfilePath = GetSettingFilePath("_" + Path.GetRandomFileName());
                 try
                 {
-                    lock (lockObj)
+                    lock (LockObj)
                     {
                         using (var stream = new FileStream(tmpfilePath, FileMode.Create, FileAccess.Write))
                         {
@@ -174,6 +174,6 @@ namespace OpenTween
             => SaveSettings(Instance, "");
 
         public static string GetSettingFilePath(string FileId)
-            => Path.Combine(MyCommon.settingPath, typeof(T).Name + FileId + ".xml");
+            => Path.Combine(MyCommon.SettingPath, typeof(T).Name + FileId + ".xml");
     }
 }
index f9c15fb..ec9a56b 100644 (file)
@@ -47,13 +47,13 @@ namespace OpenTween
     /// </summary>
     public class ShortUrl
     {
-        private static readonly Lazy<ShortUrl> _instance;
+        private static readonly Lazy<ShortUrl> InstanceLazy;
 
         /// <summary>
         /// ShortUrl のインスタンスを取得します
         /// </summary>
         public static ShortUrl Instance
-            => _instance.Value;
+            => InstanceLazy.Value;
 
         /// <summary>
         /// 短縮 URL の展開を無効にするか否か
@@ -136,7 +136,7 @@ namespace OpenTween
         };
 
         static ShortUrl()
-            => _instance = new Lazy<ShortUrl>(() => new ShortUrl(), true);
+            => InstanceLazy = new Lazy<ShortUrl>(() => new ShortUrl(), true);
 
         [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")]
         internal ShortUrl()
index b195d91..908219c 100644 (file)
@@ -48,7 +48,7 @@ namespace OpenTween.Thumbnail.Services
 
         public static readonly string ApiBase = "https://api.foursquare.com/v2";
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly HttpClient? localHttpClient;
@@ -124,7 +124,7 @@ namespace OpenTween.Thumbnail.Services
 
                 var apiUrl = new Uri(ApiBase + "/checkins/resolve?" + MyCommon.BuildQueryString(query));
 
-                using var response = await this.http.GetAsync(apiUrl, token)
+                using var response = await this.Http.GetAsync(apiUrl, token)
                     .ConfigureAwait(false);
 
                 response.EnsureSuccessStatusCode();
@@ -174,7 +174,7 @@ namespace OpenTween.Thumbnail.Services
 
                 var apiUrl = new Uri(ApiBase + "/checkins/" + checkinIdGroup.Value + "?" + MyCommon.BuildQueryString(query));
 
-                using var response = await this.http.GetAsync(apiUrl, token)
+                using var response = await this.Http.GetAsync(apiUrl, token)
                     .ConfigureAwait(false);
 
                 response.EnsureSuccessStatusCode();
index 700b541..aea4281 100644 (file)
@@ -55,7 +55,7 @@ namespace OpenTween.Thumbnail.Services
         protected IEnumerable<Regex>? UrlRegex = null;
         protected AsyncTimer UpdateTimer;
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly HttpClient? localHttpClient;
@@ -176,7 +176,7 @@ namespace OpenTween.Thumbnail.Services
         protected virtual async Task<byte[]> FetchRegexAsync(string apiBase)
         {
             using var cts = new CancellationTokenSource(millisecondsDelay: 1000);
-            using var response = await this.http.GetAsync(apiBase + "regex.json", cts.Token)
+            using var response = await this.Http.GetAsync(apiBase + "regex.json", cts.Token)
                 .ConfigureAwait(false);
 
             response.EnsureSuccessStatusCode();
index d364f9a..b749903 100644 (file)
@@ -47,7 +47,7 @@ namespace OpenTween.Thumbnail.Services
         };
         protected static string[] PropertyNames = { "og:image", "twitter:image", "twitter:image:src" };
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly HttpClient? localHttpClient;
@@ -123,7 +123,7 @@ namespace OpenTween.Thumbnail.Services
 
         protected virtual async Task<string> FetchImageUrlAsync(string url, CancellationToken token)
         {
-            using var response = await this.http.GetAsync(url, token)
+            using var response = await this.Http.GetAsync(url, token)
                 .ConfigureAwait(false);
 
             response.EnsureSuccessStatusCode();
index d0a4eaa..a53d744 100644 (file)
@@ -42,7 +42,7 @@ namespace OpenTween.Thumbnail.Services
         public static readonly Regex UrlPatternRegex =
             new Regex(@"^https?://www\.tinami\.com/view/(?<ContentId>\d+)$");
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly ApiKey apiKey;
@@ -106,7 +106,7 @@ namespace OpenTween.Thumbnail.Services
 
             var apiUrl = new Uri("http://api.tinami.com/content/info?" + MyCommon.BuildQueryString(query));
 
-            using var response = await this.http.GetAsync(apiUrl, token)
+            using var response = await this.Http.GetAsync(apiUrl, token)
                 .ConfigureAwait(false);
 
             response.EnsureSuccessStatusCode();
index f4db07f..fdcf877 100644 (file)
@@ -43,7 +43,7 @@ namespace OpenTween.Thumbnail.Services
         public static readonly Regex UrlPatternRegex =
             new Regex(@"^https?://(?<host>[^.]+\.tumblr\.com|tumblr\.[^.]+\.[^.]+)/post/(?<postId>[0-9]+)(/.*)?");
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly ApiKey tumblrConsumerKey;
@@ -83,7 +83,7 @@ namespace OpenTween.Thumbnail.Services
             try
             {
                 var apiUrl = string.Format("https://api.tumblr.com/v2/blog/{0}/posts?", host) + MyCommon.BuildQueryString(param);
-                using var response = await this.http.GetAsync(apiUrl, token)
+                using var response = await this.Http.GetAsync(apiUrl, token)
                     .ConfigureAwait(false);
 
                 var jsonBytes = await response.Content.ReadAsByteArrayAsync()
index 30354ad..4ce9140 100644 (file)
@@ -44,7 +44,7 @@ namespace OpenTween.Thumbnail.Services
         public static readonly Regex UrlPatternRegex =
             new Regex(@"https?://vimeo\.com/(?<postID>[0-9]+)");
 
-        protected HttpClient http
+        protected HttpClient Http
             => this.localHttpClient ?? Networking.Http;
 
         private readonly HttpClient? localHttpClient;
@@ -67,7 +67,7 @@ namespace OpenTween.Thumbnail.Services
             {
                 var apiUrl = "https://vimeo.com/api/oembed.xml?url=" + Uri.EscapeDataString(url);
 
-                var xmlStr = await this.http.GetStringAsync(apiUrl)
+                var xmlStr = await this.Http.GetStringAsync(apiUrl)
                     .ConfigureAwait(false);
 
                 var xdoc = XDocument.Parse(xmlStr);
index f445053..5f9ca82 100644 (file)
@@ -159,11 +159,11 @@ namespace OpenTween
         {
             var g = e.Graphics;
 
-            if (this.apiGaugeBounds != Rectangle.Empty)
-                g.FillRectangle(Brushes.LightBlue, this.apiGaugeBounds);
+            if (this.ApiGaugeBounds != Rectangle.Empty)
+                g.FillRectangle(Brushes.LightBlue, this.ApiGaugeBounds);
 
-            if (this.timeGaugeBounds != Rectangle.Empty)
-                g.FillRectangle(Brushes.LightPink, this.timeGaugeBounds);
+            if (this.TimeGaugeBounds != Rectangle.Empty)
+                g.FillRectangle(Brushes.LightPink, this.TimeGaugeBounds);
 
             base.OnPaint(e);
         }
@@ -174,20 +174,20 @@ namespace OpenTween
         //   (C) 2010 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
         //   (C) 2010 Moz (@syo68k)
 
-        internal Rectangle apiGaugeBounds = Rectangle.Empty;
-        internal Rectangle timeGaugeBounds = Rectangle.Empty;
+        internal Rectangle ApiGaugeBounds = Rectangle.Empty;
+        internal Rectangle TimeGaugeBounds = Rectangle.Empty;
 
         protected virtual void UpdateGaugeBounds()
         {
             if (this._ApiLimit == null || this._GaugeHeight < 1)
             {
-                this.apiGaugeBounds = Rectangle.Empty;
-                this.timeGaugeBounds = Rectangle.Empty;
+                this.ApiGaugeBounds = Rectangle.Empty;
+                this.TimeGaugeBounds = Rectangle.Empty;
                 return;
             }
 
             var apiGaugeValue = (double)this._ApiLimit.AccessLimitRemain / this._ApiLimit.AccessLimitCount;
-            this.apiGaugeBounds = new Rectangle(
+            this.ApiGaugeBounds = new Rectangle(
                 0,
                 (this.Height - this._GaugeHeight * 2) / 2,
                 (int)(this.Width * apiGaugeValue),
@@ -195,9 +195,9 @@ namespace OpenTween
             );
 
             var timeGaugeValue = this.remainMinutes >= 15 ? 1.00 : this.remainMinutes / 15;
-            this.timeGaugeBounds = new Rectangle(
+            this.TimeGaugeBounds = new Rectangle(
                 0,
-                this.apiGaugeBounds.Top + this._GaugeHeight,
+                this.ApiGaugeBounds.Top + this._GaugeHeight,
                 (int)(this.Width * timeGaugeValue),
                 this._GaugeHeight
             );
index ca43f15..a5a76aa 100644 (file)
             // 
             resources.ApplyResources(this.tweetDetailsView, "tweetDetailsView");
             this.tweetDetailsView.Name = "tweetDetailsView";
-            this.tweetDetailsView.StatusChanged += new System.EventHandler<OpenTween.TweetDetailsViewStatusChengedEventArgs>(this.tweetDetailsView_StatusChanged);
+            this.tweetDetailsView.StatusChanged += new System.EventHandler<OpenTween.TweetDetailsViewStatusChengedEventArgs>(this.TweetDetailsView_StatusChanged);
             // 
             // TableLayoutPanel2
             // 
             resources.ApplyResources(this.tweetThumbnail1, "tweetThumbnail1");
             this.tweetThumbnail1.Name = "tweetThumbnail1";
             this.tweetThumbnail1.TabStop = false;
-            this.tweetThumbnail1.ThumbnailLoading += new System.EventHandler<System.EventArgs>(this.tweetThumbnail1_ThumbnailLoading);
-            this.tweetThumbnail1.ThumbnailDoubleClick += new System.EventHandler<OpenTween.ThumbnailDoubleClickEventArgs>(this.tweetThumbnail1_ThumbnailDoubleClick);
-            this.tweetThumbnail1.ThumbnailImageSearchClick += new System.EventHandler<OpenTween.ThumbnailImageSearchEventArgs>(this.tweetThumbnail1_ThumbnailImageSearchClick);
+            this.tweetThumbnail1.ThumbnailLoading += new System.EventHandler<System.EventArgs>(this.TweetThumbnail_ThumbnailLoading);
+            this.tweetThumbnail1.ThumbnailDoubleClick += new System.EventHandler<OpenTween.ThumbnailDoubleClickEventArgs>(this.TweetThumbnail_ThumbnailDoubleClick);
+            this.tweetThumbnail1.ThumbnailImageSearchClick += new System.EventHandler<OpenTween.ThumbnailImageSearchEventArgs>(this.TweetThumbnail_ThumbnailImageSearchClick);
             // 
             // MenuStrip1
             // 
index 221a347..d9129b3 100644 (file)
@@ -105,7 +105,7 @@ namespace OpenTween
 
         private readonly object _syncObject = new object(); // ロック用
 
-        private const string detailHtmlFormatHeaderMono =
+        private const string DetailHtmlFormatHeaderMono =
             "<html><head><meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\">"
             + "<style type=\"text/css\"><!-- "
             + "body, p, pre {margin: 0;} "
@@ -117,8 +117,8 @@ namespace OpenTween
             + ".quote-tweet-link {color: inherit !important; text-decoration: none;}"
             + "--></style>"
             + "</head><body><pre>";
-        private const string detailHtmlFormatFooterMono = "</pre></body></html>";
-        private const string detailHtmlFormatHeaderColor =
+        private const string DetailHtmlFormatFooterMono = "</pre></body></html>";
+        private const string DetailHtmlFormatHeaderColor =
             "<html><head><meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\">"
             + "<style type=\"text/css\"><!-- "
             + "body, p, pre {margin: 0;} "
@@ -130,7 +130,7 @@ namespace OpenTween
             + ".quote-tweet-link {color: inherit !important; text-decoration: none;}"
             + "--></style>"
             + "</head><body><p>";
-        private const string detailHtmlFormatFooterColor = "</p></body></html>";
+        private const string DetailHtmlFormatFooterColor = "</p></body></html>";
         private string detailHtmlFormatHeader = null!;
         private string detailHtmlFormatFooter = null!;
 
@@ -373,13 +373,13 @@ namespace OpenTween
         private bool preventSmsCommand = true;
 
         // URL短縮のUndo用
-        private struct urlUndo
+        private struct UrlUndo
         {
             public string Before;
             public string After;
         }
 
-        private List<urlUndo>? urlUndoBuffer = null;
+        private List<UrlUndo>? urlUndoBuffer = null;
 
         private readonly struct ReplyChain
         {
@@ -426,20 +426,20 @@ namespace OpenTween
 
         private class StatusTextHistory
         {
-            public string status = "";
-            public (long StatusId, string ScreenName)? inReplyTo = null;
+            public string Status { get; } = "";
+            public (long StatusId, string ScreenName)? InReplyTo { get; } = null;
 
             /// <summary>画像投稿サービス名</summary>
-            public string imageService = "";
+            public string ImageService { get; set; } = "";
 
-            public IMediaItem[]? mediaItems = null;
+            public IMediaItem[]? MediaItems { get; set; } = null;
             public StatusTextHistory()
             {
             }
             public StatusTextHistory(string status, (long StatusId, string ScreenName)? inReplyTo)
             {
-                this.status = status;
-                this.inReplyTo = inReplyTo;
+                this.Status = status;
+                this.InReplyTo = inReplyTo;
             }
         }
 
@@ -1191,7 +1191,7 @@ namespace OpenTween
             this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.List] = () => this.InvokeAsync(() => this.RefreshTabAsync<ListTimelineTabModel>());
             this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.Config] = () => this.InvokeAsync(() => Task.WhenAll(new[]
             {
-                this.doGetFollowersMenu(),
+                this.DoGetFollowersMenu(),
                 this.RefreshBlockIdsAsync(),
                 this.RefreshMuteUserIdsAsync(),
                 this.RefreshNoRetweetIdsAsync(),
@@ -1230,13 +1230,13 @@ namespace OpenTween
         {
             if (SettingManager.Common.IsMonospace)
             {
-                this.detailHtmlFormatHeader = detailHtmlFormatHeaderMono;
-                this.detailHtmlFormatFooter = detailHtmlFormatFooterMono;
+                this.detailHtmlFormatHeader = DetailHtmlFormatHeaderMono;
+                this.detailHtmlFormatFooter = DetailHtmlFormatFooterMono;
             }
             else
             {
-                this.detailHtmlFormatHeader = detailHtmlFormatHeaderColor;
-                this.detailHtmlFormatFooter = detailHtmlFormatFooterColor;
+                this.detailHtmlFormatHeader = DetailHtmlFormatHeaderColor;
+                this.detailHtmlFormatFooter = DetailHtmlFormatFooterColor;
             }
 
             this.detailHtmlFormatHeader = this.detailHtmlFormatHeader
@@ -1357,15 +1357,15 @@ namespace OpenTween
 
         private void RefreshTimelineScheduler()
         {
-            static TimeSpan intervalSecondsOrDisabled(int seconds)
+            static TimeSpan IntervalSecondsOrDisabled(int seconds)
                 => seconds == 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(seconds);
 
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Home] = intervalSecondsOrDisabled(SettingManager.Common.TimelinePeriod);
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Mention] = intervalSecondsOrDisabled(SettingManager.Common.ReplyPeriod);
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Dm] = intervalSecondsOrDisabled(SettingManager.Common.DMPeriod);
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.PublicSearch] = intervalSecondsOrDisabled(SettingManager.Common.PubSearchPeriod);
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.User] = intervalSecondsOrDisabled(SettingManager.Common.UserTimelinePeriod);
-            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.List] = intervalSecondsOrDisabled(SettingManager.Common.ListsPeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Home] = IntervalSecondsOrDisabled(SettingManager.Common.TimelinePeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Mention] = IntervalSecondsOrDisabled(SettingManager.Common.ReplyPeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Dm] = IntervalSecondsOrDisabled(SettingManager.Common.DMPeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.PublicSearch] = IntervalSecondsOrDisabled(SettingManager.Common.PubSearchPeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.User] = IntervalSecondsOrDisabled(SettingManager.Common.UserTimelinePeriod);
+            this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.List] = IntervalSecondsOrDisabled(SettingManager.Common.ListsPeriod);
             this.timelineScheduler.UpdateInterval[TimelineSchedulerTaskType.Config] = TimeSpan.FromHours(6);
             this.timelineScheduler.UpdateAfterSystemResume = TimeSpan.FromSeconds(30);
 
@@ -1418,7 +1418,7 @@ namespace OpenTween
                 out var newMentionOrDm,
                 out var isDelete);
 
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             // リストに反映&選択状態復元
             foreach (var (tab, index) in this._statuses.Tabs.WithIndex())
@@ -2049,8 +2049,8 @@ namespace OpenTween
                 this._hisIdx = 0;
 
             var historyItem = this._history[this._hisIdx];
-            this.inReplyTo = historyItem.inReplyTo;
-            this.StatusText.Text = historyItem.status;
+            this.inReplyTo = historyItem.InReplyTo;
+            this.StatusText.Text = historyItem.Status;
             this.StatusText.SelectionStart = this.StatusText.Text.Length;
         }
 
@@ -2064,8 +2064,8 @@ namespace OpenTween
                 this._hisIdx = this._history.Count - 1;
 
             var historyItem = this._history[this._hisIdx];
-            this.inReplyTo = historyItem.inReplyTo;
-            this.StatusText.Text = historyItem.status;
+            this.inReplyTo = historyItem.InReplyTo;
+            this.StatusText.Text = historyItem.Status;
             this.StatusText.SelectionStart = this.StatusText.Text.Length;
         }
 
@@ -2091,7 +2091,7 @@ namespace OpenTween
                 {
                     case DialogResult.Yes:
                         this.StatusText.Text = "";
-                        await this.doReTweetOfficial(false);
+                        await this.DoReTweetOfficial(false);
                         return;
                     case DialogResult.Cancel:
                         return;
@@ -2188,13 +2188,13 @@ namespace OpenTween
 
         private void EndToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            MyCommon._endingFlag = true;
+            MyCommon.EndingFlag = true;
             this.Close();
         }
 
         private void TweenMain_FormClosing(object sender, FormClosingEventArgs e)
         {
-            if (!SettingManager.Common.CloseToExit && e.CloseReason == CloseReason.UserClosing && MyCommon._endingFlag == false)
+            if (!SettingManager.Common.CloseToExit && e.CloseReason == CloseReason.UserClosing && MyCommon.EndingFlag == false)
             {
                 // _endingFlag=false:フォームの×ボタン
                 e.Cancel = true;
@@ -2204,7 +2204,7 @@ namespace OpenTween
             {
                 this._hookGlobalHotkey.UnregisterAllOriginalHotkey();
                 this._ignoreConfigSave = true;
-                MyCommon._endingFlag = true;
+                MyCommon.EndingFlag = true;
                 this.timelineScheduler.Enabled = false;
                 this.TimerRefreshIcon.Enabled = false;
             }
@@ -3258,7 +3258,7 @@ namespace OpenTween
         private void DMStripMenuItem_Click(object sender, EventArgs e)
             => this.MakeReplyOrDirectStatus(false, false);
 
-        private async Task doStatusDelete()
+        private async Task DoStatusDelete()
         {
             var posts = this.CurrentTab.SelectedPosts;
             if (posts.Length == 0)
@@ -3379,7 +3379,7 @@ namespace OpenTween
         }
 
         private async void DeleteStripMenuItem_Click(object sender, EventArgs e)
-            => await this.doStatusDelete();
+            => await this.DoStatusDelete();
 
         private void ReadedStripMenuItem_Click(object sender, EventArgs e)
         {
@@ -3456,8 +3456,8 @@ namespace OpenTween
             settingDialog.ShowInTaskbar = showTaskbarIcon;
             settingDialog.IntervalChanged += this.TimerInterval_Changed;
 
-            settingDialog.tw = this.tw;
-            settingDialog.twitterApi = this.twitterApi;
+            settingDialog.Tw = this.tw;
+            settingDialog.TwitterApi = this.twitterApi;
 
             settingDialog.LoadConfig(SettingManager.Common, SettingManager.Local);
 
@@ -3729,7 +3729,7 @@ namespace OpenTween
             this.SaveConfigsAll(false);
 
             if (this.tw.UserId != oldUser.UserId)
-                await this.doGetFollowersMenu();
+                await this.DoGetFollowersMenu();
         }
 
         /// <summary>
@@ -4367,7 +4367,7 @@ namespace OpenTween
             var eHalf = "";
             if (dialog.DialogResult == DialogResult.OK)
             {
-                if (!MyCommon.IsNullOrEmpty(dialog.inputText))
+                if (!MyCommon.IsNullOrEmpty(dialog.InputText))
                 {
                     if (selStart > 0)
                     {
@@ -4377,8 +4377,8 @@ namespace OpenTween
                     {
                         eHalf = owner.Text.Substring(selStart);
                     }
-                    owner.Text = fHalf + dialog.inputText + eHalf;
-                    owner.SelectionStart = selStart + dialog.inputText.Length;
+                    owner.Text = fHalf + dialog.InputText + eHalf;
+                    owner.SelectionStart = selStart + dialog.InputText.Length;
                 }
             }
             else
@@ -5375,8 +5375,8 @@ namespace OpenTween
             var pinfo = new ProcessStartInfo
             {
                 UseShellExecute = true,
-                WorkingDirectory = MyCommon.settingPath,
-                FileName = Path.Combine(MyCommon.settingPath, "TweenUp3.exe"),
+                WorkingDirectory = MyCommon.SettingPath,
+                FileName = Path.Combine(MyCommon.SettingPath, "TweenUp3.exe"),
                 Arguments = "\"" + Application.StartupPath + "\"",
             };
 
@@ -5522,7 +5522,7 @@ namespace OpenTween
             this.DispSelectedPost();
         }
 
-        public string createDetailHtml(string orgdata)
+        public string CreateDetailHtml(string orgdata)
             => this.detailHtmlFormatHeader + orgdata + this.detailHtmlFormatFooter;
 
         private void DispSelectedPost()
@@ -5563,7 +5563,7 @@ namespace OpenTween
                 loadTasks.Add(this.tweetThumbnail1.ShowThumbnailAsync(currentPost, token));
             }
 
-            async Task delayedTasks()
+            async Task DelayedTasks()
             {
                 try
                 {
@@ -5573,7 +5573,7 @@ namespace OpenTween
             }
 
             // サムネイルの読み込みを待たずに次に選択されたツイートを表示するため await しない
-            _ = delayedTasks();
+            _ = DelayedTasks();
         }
 
         private async void MatomeMenuItem_Click(object sender, EventArgs e)
@@ -5773,7 +5773,7 @@ namespace OpenTween
                     .Do(() => this.MakeReplyOrDirectStatus(isAuto: false, isReply: true)),
 
                 ShortcutCommand.Create(Keys.Control | Keys.D)
-                    .Do(() => this.doStatusDelete()),
+                    .Do(() => this.DoStatusDelete()),
 
                 ShortcutCommand.Create(Keys.Control | Keys.M)
                     .Do(() => this.MakeReplyOrDirectStatus(isAuto: false, isReply: false)),
@@ -5782,10 +5782,10 @@ namespace OpenTween
                     .Do(() => this.FavoriteChange(FavAdd: true)),
 
                 ShortcutCommand.Create(Keys.Control | Keys.I)
-                    .Do(() => this.doRepliedStatusOpen()),
+                    .Do(() => this.DoRepliedStatusOpen()),
 
                 ShortcutCommand.Create(Keys.Control | Keys.Q)
-                    .Do(() => this.doQuoteOfficial()),
+                    .Do(() => this.DoQuoteOfficial()),
 
                 ShortcutCommand.Create(Keys.Control | Keys.B)
                     .Do(() => this.ReadedStripMenuItem_Click(this.ReadedStripMenuItem, EventArgs.Empty)),
@@ -5991,11 +5991,11 @@ namespace OpenTween
                     .Do(() => this.GoBackSelectPostChain()),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.R)
-                    .Do(() => this.doReTweetOfficial(isConfirm: true)),
+                    .Do(() => this.DoReTweetOfficial(isConfirm: true)),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.P)
                     .OnlyWhen(() => this.CurrentPost != null)
-                    .Do(() => this.doShowUserStatus(this.CurrentPost!.ScreenName, ShowInputDialog: false)),
+                    .Do(() => this.DoShowUserStatus(this.CurrentPost!.ScreenName, ShowInputDialog: false)),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.Up)
                     .Do(() => this.tweetDetailsView.ScrollDownPostBrowser(forward: false)),
@@ -6041,7 +6041,7 @@ namespace OpenTween
                     .Do(() => this.ImageSelectMenuItem_Click(this.ImageSelectMenuItem, EventArgs.Empty)),
 
                 ShortcutCommand.Create(Keys.Control | Keys.Shift | Keys.H)
-                    .Do(() => this.doMoveToRTHome()),
+                    .Do(() => this.DoMoveToRTHome()),
 
                 ShortcutCommand.Create(Keys.Control | Keys.Shift | Keys.Up)
                     .FocusedOn(FocusedControl.StatusText)
@@ -6157,14 +6157,14 @@ namespace OpenTween
 
                 ShortcutCommand.Create(Keys.Alt | Keys.Shift | Keys.R)
                     .FocusedOn(FocusedControl.PostBrowser)
-                    .Do(() => this.doReTweetUnofficial()),
+                    .Do(() => this.DoReTweetUnofficial()),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.Shift | Keys.T)
                     .OnlyWhen(() => this.ExistCurrentPost)
                     .Do(() => this.tweetDetailsView.DoTranslation()),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.Shift | Keys.R)
-                    .Do(() => this.doReTweetUnofficial()),
+                    .Do(() => this.DoReTweetUnofficial()),
 
                 ShortcutCommand.Create(Keys.Alt | Keys.Shift | Keys.C, Keys.Alt | Keys.Shift | Keys.Insert)
                     .Do(() => this.CopyUserId()),
@@ -8468,7 +8468,7 @@ namespace OpenTween
                     break;
                 case MyCommon.DispTitleEnum.Post:
                     if (this._history != null && this._history.Count > 1)
-                        ttl.Append(this._history[this._history.Count - 2].status.Replace("\r\n", " "));
+                        ttl.Append(this._history[this._history.Count - 2].Status.Replace("\r\n", " "));
                     break;
                 case MyCommon.DispTitleEnum.UnreadRepCount:
                     ttl.AppendFormat(Properties.Resources.SetMainWindowTitleText1, this._statuses.MentionTab.UnreadCount + this._statuses.DirectMessageTab.UnreadCount);
@@ -8809,7 +8809,7 @@ namespace OpenTween
             this.MarkSettingLocalModified();
         }
 
-        private async Task doRepliedStatusOpen()
+        private async Task DoRepliedStatusOpen()
         {
             var currentPost = this.CurrentPost;
             if (this.ExistCurrentPost && currentPost != null && currentPost.InReplyToUser != null && currentPost.InReplyToStatusId != null)
@@ -8838,7 +8838,7 @@ namespace OpenTween
         }
 
         private async void RepliedStatusOpenMenuItem_Click(object sender, EventArgs e)
-            => await this.doRepliedStatusOpen();
+            => await this.DoRepliedStatusOpen();
 
         private void SplitContainer2_Panel2_Resize(object sender, EventArgs e)
         {
@@ -8917,7 +8917,7 @@ namespace OpenTween
                     // nico.ms使用、nicovideoにマッチしたら変換
                     if (SettingManager.Common.Nicoms && Regex.IsMatch(tmp, nico))
                     {
-                        result = nicoms.Shorten(tmp);
+                        result = Nicoms.Shorten(tmp);
                     }
                     else if (Converter_Type != MyCommon.UrlConverter.Nicoms)
                     {
@@ -8946,7 +8946,7 @@ namespace OpenTween
 
                     if (!MyCommon.IsNullOrEmpty(result))
                     {
-                        var undotmp = new urlUndo();
+                        var undotmp = new UrlUndo();
 
                         // 短縮 URL が生成されるまでの間に投稿欄から元の URL が削除されていたら中断する
                         var origUrlIndex = this.StatusText.Text.IndexOf(tmp, StringComparison.Ordinal);
@@ -8962,7 +8962,7 @@ namespace OpenTween
 
                         if (this.urlUndoBuffer == null)
                         {
-                            this.urlUndoBuffer = new List<urlUndo>();
+                            this.urlUndoBuffer = new List<UrlUndo>();
                             this.UrlUndoToolStripMenuItem.Enabled = true;
                         }
 
@@ -8985,7 +8985,7 @@ namespace OpenTween
                     var tmp = mt.Result("${url}");
                     if (tmp.StartsWith("w", StringComparison.OrdinalIgnoreCase))
                         tmp = "http://" + tmp;
-                    var undotmp = new urlUndo();
+                    var undotmp = new UrlUndo();
 
                     // 選んだURLを選択(?)
                     this.StatusText.Select(this.StatusText.Text.IndexOf(mt.Result("${url}"), StringComparison.Ordinal), mt.Result("${url}").Length);
@@ -8993,7 +8993,7 @@ namespace OpenTween
                     // nico.ms使用、nicovideoにマッチしたら変換
                     if (SettingManager.Common.Nicoms && Regex.IsMatch(tmp, nico))
                     {
-                        result = nicoms.Shorten(tmp);
+                        result = Nicoms.Shorten(tmp);
                     }
                     else if (Converter_Type != MyCommon.UrlConverter.Nicoms)
                     {
@@ -9044,7 +9044,7 @@ namespace OpenTween
 
                         if (this.urlUndoBuffer == null)
                         {
-                            this.urlUndoBuffer = new List<urlUndo>();
+                            this.urlUndoBuffer = new List<UrlUndo>();
                             this.UrlUndoToolStripMenuItem.Enabled = true;
                         }
 
@@ -9056,7 +9056,7 @@ namespace OpenTween
             return true;
         }
 
-        private void doUrlUndo()
+        private void DoUrlUndo()
         {
             if (this.urlUndoBuffer != null)
             {
@@ -9100,7 +9100,7 @@ namespace OpenTween
         }
 
         private void UrlUndoToolStripMenuItem_Click(object sender, EventArgs e)
-            => this.doUrlUndo();
+            => this.DoUrlUndo();
 
         private void NewPostPopMenuItem_CheckStateChanged(object sender, EventArgs e)
         {
@@ -9589,11 +9589,11 @@ namespace OpenTween
                     i += 1;
                     if (i > 24) break; // 120秒間初期処理が終了しなかったら強制的に打ち切る
 
-                    if (MyCommon._endingFlag)
+                    if (MyCommon.EndingFlag)
                         return;
                 }
 
-                if (MyCommon._endingFlag) return;
+                if (MyCommon.EndingFlag) return;
 
                 if (ApplicationSettings.VersionInfoUrl != null)
                 {
@@ -9636,19 +9636,19 @@ namespace OpenTween
             this.timelineScheduler.Enabled = true;
         }
 
-        private async Task doGetFollowersMenu()
+        private async Task DoGetFollowersMenu()
         {
             await this.RefreshFollowerIdsAsync();
             this.DispSelectedPost(true);
         }
 
         private async void GetFollowersAllToolStripMenuItem_Click(object sender, EventArgs e)
-            => await this.doGetFollowersMenu();
+            => await this.DoGetFollowersMenu();
 
         private void ReTweetUnofficialStripMenuItem_Click(object sender, EventArgs e)
-            => this.doReTweetUnofficial();
+            => this.DoReTweetUnofficial();
 
-        private async Task doReTweetOfficial(bool isConfirm)
+        private async Task DoReTweetOfficial(bool isConfirm)
         {
             // 公式RT
             if (this.ExistCurrentPost)
@@ -9703,13 +9703,13 @@ namespace OpenTween
         }
 
         private async void ReTweetStripMenuItem_Click(object sender, EventArgs e)
-            => await this.doReTweetOfficial(true);
+            => await this.DoReTweetOfficial(true);
 
         private async Task FavoritesRetweetOfficial()
         {
             if (!this.ExistCurrentPost) return;
             this._DoFavRetweetFlags = true;
-            var retweetTask = this.doReTweetOfficial(true);
+            var retweetTask = this.DoReTweetOfficial(true);
             if (this._DoFavRetweetFlags)
             {
                 this._DoFavRetweetFlags = false;
@@ -9733,7 +9733,7 @@ namespace OpenTween
                 if (!post.IsProtect && this._DoFavRetweetFlags)
                 {
                     this._DoFavRetweetFlags = false;
-                    this.doReTweetUnofficial();
+                    this.DoReTweetUnofficial();
                 }
 
                 await favoriteTask;
@@ -10107,7 +10107,7 @@ namespace OpenTween
         }
 
         private async void OwnStatusMenuItem_Click(object sender, EventArgs e)
-            => await this.doShowUserStatus(this.tw.Username, false);
+            => await this.DoShowUserStatus(this.tw.Username, false);
 
         // TwitterIDでない固定文字列を調べる(文字列検証のみ 実際に取得はしない)
         // URLから切り出した文字列を渡す
@@ -10120,7 +10120,7 @@ namespace OpenTween
                 return !this.tw.Configuration.NonUsernamePaths.Contains(name, StringComparer.InvariantCultureIgnoreCase);
         }
 
-        private void doQuoteOfficial()
+        private void DoQuoteOfficial()
         {
             var post = this.CurrentPost;
             if (this.ExistCurrentPost && post != null)
@@ -10145,7 +10145,7 @@ namespace OpenTween
             }
         }
 
-        private void doReTweetUnofficial()
+        private void DoReTweetUnofficial()
         {
             // RT @id:内容
             var post = this.CurrentPost;
@@ -10177,7 +10177,7 @@ namespace OpenTween
         }
 
         private void QuoteStripMenuItem_Click(object sender, EventArgs e)
-            => this.doQuoteOfficial();
+            => this.DoQuoteOfficial();
 
         private async void SearchButton_Click(object sender, EventArgs e)
         {
@@ -10340,7 +10340,7 @@ namespace OpenTween
             }
         }
 
-        private async Task doMoveToRTHome()
+        private async Task DoMoveToRTHome()
         {
             var post = this.CurrentPost;
             if (post != null && post.RetweetedId != null)
@@ -10348,7 +10348,7 @@ namespace OpenTween
         }
 
         private async void MoveToRTHomeMenuItem_Click(object sender, EventArgs e)
-            => await this.doMoveToRTHome();
+            => await this.DoMoveToRTHome();
 
         private void ListManageUserContextToolStripMenuItem_Click(object sender, EventArgs e)
         {
@@ -10632,7 +10632,7 @@ namespace OpenTween
         private async void UserStatusToolStripMenuItem_Click(object sender, EventArgs e)
             => await this.ShowUserStatus(this.CurrentPost?.ScreenName ?? "");
 
-        private async Task doShowUserStatus(string id, bool ShowInputDialog)
+        private async Task DoShowUserStatus(string id, bool ShowInputDialog)
         {
             TwitterUser? user = null;
 
@@ -10671,10 +10671,10 @@ namespace OpenTween
                     return;
             }
 
-            await this.doShowUserStatus(user);
+            await this.DoShowUserStatus(user);
         }
 
-        private async Task doShowUserStatus(TwitterUser user)
+        private async Task DoShowUserStatus(TwitterUser user)
         {
             using var userDialog = new UserInfoDialog(this, this.twitterApi);
             var showUserTask = userDialog.ShowUserAsync(user);
@@ -10688,10 +10688,10 @@ namespace OpenTween
         }
 
         internal Task ShowUserStatus(string id, bool ShowInputDialog)
-            => this.doShowUserStatus(id, ShowInputDialog);
+            => this.DoShowUserStatus(id, ShowInputDialog);
 
         internal Task ShowUserStatus(string id)
-            => this.doShowUserStatus(id, true);
+            => this.DoShowUserStatus(id, true);
 
         private async void ShowProfileMenuItem_Click(object sender, EventArgs e)
         {
@@ -10761,7 +10761,7 @@ namespace OpenTween
 
             this.tweetDetailsView.Owner = this;
 
-            this._hookGlobalHotkey.HotkeyPressed += this._hookGlobalHotkey_HotkeyPressed;
+            this._hookGlobalHotkey.HotkeyPressed += this.HookGlobalHotkey_HotkeyPressed;
             this.gh.NotifyClicked += this.GrowlHelper_Callback;
 
             // メイリオフォント指定時にタブの最小幅が広くなる問題の対策
@@ -10777,7 +10777,7 @@ namespace OpenTween
             this.InitializeShortcuts();
         }
 
-        private void _hookGlobalHotkey_HotkeyPressed(object sender, KeyEventArgs e)
+        private void HookGlobalHotkey_HotkeyPressed(object sender, KeyEventArgs e)
         {
             if ((this.WindowState == FormWindowState.Normal || this.WindowState == FormWindowState.Maximized) && this.Visible && Form.ActiveForm == this)
             {
@@ -11024,7 +11024,7 @@ namespace OpenTween
 
         private void TweenRestartMenuItem_Click(object sender, EventArgs e)
         {
-            MyCommon._endingFlag = true;
+            MyCommon.EndingFlag = true;
             try
             {
                 this.Close();
@@ -11174,13 +11174,13 @@ namespace OpenTween
             this.AboutMenuItem.Text = MyCommon.ReplaceAppName(this.AboutMenuItem.Text);
         }
 
-        private void tweetThumbnail1_ThumbnailLoading(object sender, EventArgs e)
+        private void TweetThumbnail_ThumbnailLoading(object sender, EventArgs e)
             => this.SplitContainer3.Panel2Collapsed = false;
 
-        private async void tweetThumbnail1_ThumbnailDoubleClick(object sender, ThumbnailDoubleClickEventArgs e)
+        private async void TweetThumbnail_ThumbnailDoubleClick(object sender, ThumbnailDoubleClickEventArgs e)
             => await this.OpenThumbnailPicture(e.Thumbnail);
 
-        private async void tweetThumbnail1_ThumbnailImageSearchClick(object sender, ThumbnailImageSearchEventArgs e)
+        private async void TweetThumbnail_ThumbnailImageSearchClick(object sender, ThumbnailImageSearchEventArgs e)
             => await MyCommon.OpenInBrowserAsync(this, e.ImageUrl);
 
         private async Task OpenThumbnailPicture(ThumbnailInfo thumbnail)
@@ -11259,7 +11259,7 @@ namespace OpenTween
             this.MarkSettingCommonModified();
         }
 
-        private void tweetDetailsView_StatusChanged(object sender, TweetDetailsViewStatusChengedEventArgs e)
+        private void TweetDetailsView_StatusChanged(object sender, TweetDetailsViewStatusChengedEventArgs e)
         {
             if (!MyCommon.IsNullOrEmpty(e.StatusText))
             {
index 2ac51bc..024b790 100644 (file)
@@ -177,14 +177,14 @@ namespace OpenTween
                 }
                 sb.Append("-----End PostClass Dump<br>");
 
-                this.PostBrowser.DocumentText = this.Owner.createDetailHtml(sb.ToString());
+                this.PostBrowser.DocumentText = this.Owner.CreateDetailHtml(sb.ToString());
                 return;
             }
 
             using (ControlTransaction.Update(this.PostBrowser))
             {
                 this.PostBrowser.DocumentText =
-                    this.Owner.createDetailHtml(post.IsDeleted ? "(DELETED)" : post.Text);
+                    this.Owner.CreateDetailHtml(post.IsDeleted ? "(DELETED)" : post.Text);
 
                 this.PostBrowser.Document.Window.ScrollTo(0, 0);
             }
@@ -283,7 +283,7 @@ namespace OpenTween
             var body = post.Text + string.Concat(loadingQuoteHtml) + loadingReplyHtml;
 
             using (ControlTransaction.Update(this.PostBrowser))
-                this.PostBrowser.DocumentText = this.Owner.createDetailHtml(body);
+                this.PostBrowser.DocumentText = this.Owner.CreateDetailHtml(body);
 
             // 引用ツイートを読み込み
             var loadTweetTasks = quoteStatusIds.Select(x => this.CreateQuoteTweetHtml(x, isReply: false)).ToList();
@@ -300,7 +300,7 @@ namespace OpenTween
             body = post.Text + string.Concat(quoteHtmls);
 
             using (ControlTransaction.Update(this.PostBrowser))
-                this.PostBrowser.DocumentText = this.Owner.createDetailHtml(body);
+                this.PostBrowser.DocumentText = this.Owner.CreateDetailHtml(body);
         }
 
         private async Task<string> CreateQuoteTweetHtml(long statusId, bool isReply)
@@ -374,7 +374,7 @@ namespace OpenTween
                     langFrom: null,
                     langTo: SettingManager.Common.TranslateLanguage);
 
-                this.PostBrowser.DocumentText = this.Owner.createDetailHtml(translatedText);
+                this.PostBrowser.DocumentText = this.Owner.CreateDetailHtml(translatedText);
             }
             catch (WebApiException e)
             {
index 97e0d7b..ed5dc60 100644 (file)
@@ -47,7 +47,7 @@ namespace OpenTween
         /// </summary>
         public static IEnumerable<TwitterEntityUrl> ExtractUrlEntities(string text)
         {
-            var urlMatches = Regex.Matches(text, Twitter.rgUrl, RegexOptions.IgnoreCase).Cast<Match>();
+            var urlMatches = Regex.Matches(text, Twitter.RgUrl, RegexOptions.IgnoreCase).Cast<Match>();
             foreach (var m in urlMatches)
             {
                 var before = m.Groups["before"].Value;
@@ -59,17 +59,17 @@ namespace OpenTween
                 var validUrl = false;
                 if (protocol.Length == 0)
                 {
-                    if (Regex.IsMatch(before, Twitter.url_invalid_without_protocol_preceding_chars))
+                    if (Regex.IsMatch(before, Twitter.UrlInvalidWithoutProtocolPrecedingChars))
                         continue;
 
                     string? lasturl = null;
 
                     var last_url_invalid_match = false;
-                    var domainMatches = Regex.Matches(domain, Twitter.url_valid_ascii_domain, RegexOptions.IgnoreCase).Cast<Match>();
+                    var domainMatches = Regex.Matches(domain, Twitter.UrlValidAsciiDomain, RegexOptions.IgnoreCase).Cast<Match>();
                     foreach (var mm in domainMatches)
                     {
                         lasturl = mm.Value;
-                        last_url_invalid_match = Regex.IsMatch(lasturl, Twitter.url_invalid_short_domain, RegexOptions.IgnoreCase);
+                        last_url_invalid_match = Regex.IsMatch(lasturl, Twitter.UrlInvalidShortDomain, RegexOptions.IgnoreCase);
                         if (!last_url_invalid_match)
                         {
                             validUrl = true;
index a881dee..7001c1f 100644 (file)
@@ -68,7 +68,7 @@ namespace OpenTween
                     continue; // 区間が文字列長を越えている不正なエンティティを無視する
 
                 if (curIndex != startIndex)
-                    yield return t(e(text.Substring(curIndex, startIndex - curIndex)));
+                    yield return T(E(text.Substring(curIndex, startIndex - curIndex)));
 
                 var targetText = text.Substring(startIndex, endIndex - startIndex);
 
@@ -81,13 +81,13 @@ namespace OpenTween
                 else if (entity is TwitterEntityEmoji emojiEntity)
                     yield return FormatEmojiEntity(targetText, emojiEntity);
                 else
-                    yield return t(e(targetText));
+                    yield return T(E(targetText));
 
                 curIndex = endIndex;
             }
 
             if (curIndex != text.Length)
-                yield return t(e(text.Substring(curIndex)));
+                yield return T(E(text.Substring(curIndex)));
         }
 
         /// <summary>
@@ -133,7 +133,7 @@ namespace OpenTween
             if (entity.DisplayUrl == null)
             {
                 expandedUrl = MyCommon.ConvertToReadableUrl(targetText);
-                return "<a href=\"" + e(entity.Url) + "\" title=\"" + e(expandedUrl) + "\">" + t(e(targetText)) + "</a>";
+                return "<a href=\"" + E(entity.Url) + "\" title=\"" + E(expandedUrl) + "\">" + T(E(targetText)) + "</a>";
             }
 
             var linkUrl = entity.Url;
@@ -154,30 +154,30 @@ namespace OpenTween
                 }
             }
 
-            return "<a href=\"" + e(linkUrl) + "\" title=\"" + e(titleText) + "\">" + t(e(entity.DisplayUrl)) + "</a>";
+            return "<a href=\"" + E(linkUrl) + "\" title=\"" + E(titleText) + "\">" + T(E(entity.DisplayUrl)) + "</a>";
         }
 
         private static string FormatHashtagEntity(string targetText, TwitterEntityHashtag entity)
-            => "<a class=\"hashtag\" href=\"https://twitter.com/search?q=%23" + eu(entity.Text) + "\">" + t(e(targetText)) + "</a>";
+            => "<a class=\"hashtag\" href=\"https://twitter.com/search?q=%23" + EU(entity.Text) + "\">" + T(E(targetText)) + "</a>";
 
         private static string FormatMentionEntity(string targetText, TwitterEntityMention entity)
-            => "<a class=\"mention\" href=\"https://twitter.com/" + eu(entity.ScreenName) + "\">" + t(e(targetText)) + "</a>";
+            => "<a class=\"mention\" href=\"https://twitter.com/" + EU(entity.ScreenName) + "\">" + T(E(targetText)) + "</a>";
 
         private static string FormatEmojiEntity(string targetText, TwitterEntityEmoji entity)
         {
             if (!SettingManager.Local.UseTwemoji)
-                return t(e(targetText));
+                return T(E(targetText));
 
             if (MyCommon.IsNullOrEmpty(entity.Url))
                 return "";
 
-            return "<img class=\"emoji\" src=\"" + e(entity.Url) + "\" alt=\"" + e(entity.Text) + "\" />";
+            return "<img class=\"emoji\" src=\"" + E(entity.Url) + "\" alt=\"" + E(entity.Text) + "\" />";
         }
 
         // 長いのでエイリアスとして e(...), eu(...), t(...) でエスケープできるようにする
-        private static readonly Func<string, string> e = EscapeHtml;
-        private static readonly Func<string, string> eu = Uri.EscapeDataString;
-        private static readonly Func<string, string> t = FilterText;
+        private static readonly Func<string, string> E = EscapeHtml;
+        private static readonly Func<string, string> EU = Uri.EscapeDataString;
+        private static readonly Func<string, string> T = FilterText;
 
         private static string EscapeHtml(string text)
         {
index 6e49c47..702d661 100644 (file)
@@ -49,7 +49,7 @@
             this.scrollBar.Maximum = 0;
             this.scrollBar.Name = "scrollBar";
             this.toolTip.SetToolTip(this.scrollBar, resources.GetString("scrollBar.ToolTip"));
-            this.scrollBar.ValueChanged += new System.EventHandler(this.scrollBar_ValueChanged);
+            this.scrollBar.ValueChanged += new System.EventHandler(this.ScrollBar_ValueChanged);
             // 
             // panelPictureBox
             // 
             this.searchImageSauceNaoMenuItem});
             this.contextMenuStrip.Name = "contextMenuStrip";
             this.toolTip.SetToolTip(this.contextMenuStrip, resources.GetString("contextMenuStrip.ToolTip"));
-            this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening);
+            this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStrip_Opening);
             // 
             // openMenuItem
             // 
             resources.ApplyResources(this.openMenuItem, "openMenuItem");
             this.openMenuItem.Name = "openMenuItem";
-            this.openMenuItem.Click += new System.EventHandler(this.openMenuItem_Click);
+            this.openMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click);
             // 
             // copyUrlMenuItem
             // 
             resources.ApplyResources(this.copyUrlMenuItem, "copyUrlMenuItem");
             this.copyUrlMenuItem.Name = "copyUrlMenuItem";
-            this.copyUrlMenuItem.Click += new System.EventHandler(this.copyUrlMenuItem_Click);
+            this.copyUrlMenuItem.Click += new System.EventHandler(this.CopyUrlMenuItem_Click);
             // 
             // toolStripSeparator1
             // 
             // 
             resources.ApplyResources(this.searchImageGoogleMenuItem, "searchImageGoogleMenuItem");
             this.searchImageGoogleMenuItem.Name = "searchImageGoogleMenuItem";
-            this.searchImageGoogleMenuItem.Click += new System.EventHandler(this.searchSimilarImageMenuItem_Click);
+            this.searchImageGoogleMenuItem.Click += new System.EventHandler(this.SearchSimilarImageMenuItem_Click);
             // 
             // searchImageSauceNaoMenuItem
             // 
             resources.ApplyResources(this.searchImageSauceNaoMenuItem, "searchImageSauceNaoMenuItem");
             this.searchImageSauceNaoMenuItem.Name = "searchImageSauceNaoMenuItem";
-            this.searchImageSauceNaoMenuItem.Click += new System.EventHandler(this.searchImageSauceNaoMenuItem_Click);
+            this.searchImageSauceNaoMenuItem.Click += new System.EventHandler(this.SearchImageSauceNaoMenuItem_Click);
             // 
             // TweetThumbnail
             // 
index 97a7d61..4a7e48e 100644 (file)
@@ -43,7 +43,7 @@ namespace OpenTween
 {
     public partial class TweetThumbnail : UserControl
     {
-        protected internal List<OTPictureBox> pictureBox = new List<OTPictureBox>();
+        protected internal List<OTPictureBox> PictureBox = new List<OTPictureBox>();
         protected MouseWheelMessageFilter filter = new MouseWheelMessageFilter();
 
         public event EventHandler<EventArgs>? ThumbnailLoading;
@@ -51,7 +51,7 @@ namespace OpenTween
         public event EventHandler<ThumbnailImageSearchEventArgs>? ThumbnailImageSearchClick;
 
         public ThumbnailInfo Thumbnail
-            => (ThumbnailInfo)this.pictureBox[this.scrollBar.Value].Tag;
+            => (ThumbnailInfo)this.PictureBox[this.scrollBar.Value].Tag;
 
         public TweetThumbnail()
             => this.InitializeComponent();
@@ -84,7 +84,7 @@ namespace OpenTween
             for (var i = 0; i < thumbnails.Length; i++)
             {
                 var thumb = thumbnails[i];
-                var picbox = this.pictureBox[i];
+                var picbox = this.PictureBox[i];
 
                 picbox.Tag = thumb;
                 picbox.ContextMenuStrip = this.contextMenuStrip;
@@ -128,20 +128,20 @@ namespace OpenTween
         /// <param name="count">表示するサムネイルの数</param>
         protected void SetThumbnailCount(int count)
         {
-            if (count == 0 && this.pictureBox.Count == 0)
+            if (count == 0 && this.PictureBox.Count == 0)
                 return;
 
             using (ControlTransaction.Layout(this.panelPictureBox, false))
             {
                 this.panelPictureBox.Controls.Clear();
-                foreach (var picbox in this.pictureBox)
+                foreach (var picbox in this.PictureBox)
                 {
                     var memoryImage = picbox.Image;
 
                     this.filter.Unregister(picbox);
 
-                    picbox.MouseWheel -= this.pictureBox_MouseWheel;
-                    picbox.DoubleClick -= this.pictureBox_DoubleClick;
+                    picbox.MouseWheel -= this.PictureBox_MouseWheel;
+                    picbox.DoubleClick -= this.PictureBox_DoubleClick;
                     picbox.Dispose();
 
                     memoryImage?.Dispose();
@@ -149,7 +149,7 @@ namespace OpenTween
                     // メモリリーク対策 (http://stackoverflow.com/questions/2792427#2793714)
                     picbox.ContextMenuStrip = null;
                 }
-                this.pictureBox.Clear();
+                this.PictureBox.Clear();
 
                 this.scrollBar.Maximum = (count > 0) ? count - 1 : 0;
                 this.scrollBar.Value = 0;
@@ -158,13 +158,13 @@ namespace OpenTween
                 {
                     var picbox = this.CreatePictureBox("pictureBox" + i);
                     picbox.Visible = i == 0;
-                    picbox.MouseWheel += this.pictureBox_MouseWheel;
-                    picbox.DoubleClick += this.pictureBox_DoubleClick;
+                    picbox.MouseWheel += this.PictureBox_MouseWheel;
+                    picbox.DoubleClick += this.PictureBox_DoubleClick;
 
                     this.filter.Register(picbox);
 
                     this.panelPictureBox.Controls.Add(picbox);
-                    this.pictureBox.Add(picbox);
+                    this.PictureBox.Add(picbox);
                 }
             }
         }
@@ -211,19 +211,19 @@ namespace OpenTween
             OTBaseForm.ScaleChildControl(this.scrollBar, factor);
         }
 
-        private void scrollBar_ValueChanged(object sender, EventArgs e)
+        private void ScrollBar_ValueChanged(object sender, EventArgs e)
         {
             using (ControlTransaction.Layout(this, false))
             {
                 var value = this.scrollBar.Value;
-                for (var i = 0; i < this.pictureBox.Count; i++)
+                for (var i = 0; i < this.PictureBox.Count; i++)
                 {
-                    this.pictureBox[i].Visible = i == value;
+                    this.PictureBox[i].Visible = i == value;
                 }
             }
         }
 
-        private void pictureBox_MouseWheel(object sender, MouseEventArgs e)
+        private void PictureBox_MouseWheel(object sender, MouseEventArgs e)
         {
             if (e.Delta > 0)
                 this.ScrollUp();
@@ -231,13 +231,13 @@ namespace OpenTween
                 this.ScrollDown();
         }
 
-        private void pictureBox_DoubleClick(object sender, EventArgs e)
+        private void PictureBox_DoubleClick(object sender, EventArgs e)
         {
             if (((PictureBox)sender).Tag is ThumbnailInfo thumb)
                 this.OpenImage(thumb);
         }
 
-        private void contextMenuStrip_Opening(object sender, CancelEventArgs e)
+        private void ContextMenuStrip_Opening(object sender, CancelEventArgs e)
         {
             var picbox = (OTPictureBox)this.contextMenuStrip.SourceControl;
             var thumb = (ThumbnailInfo)picbox.Tag;
@@ -257,7 +257,7 @@ namespace OpenTween
             }
         }
 
-        private void searchSimilarImageMenuItem_Click(object sender, EventArgs e)
+        private void SearchSimilarImageMenuItem_Click(object sender, EventArgs e)
         {
             var searchTargetUri = (string)this.searchImageGoogleMenuItem.Tag;
             var searchUri = this.GetImageSearchUriGoogle(searchTargetUri);
@@ -265,7 +265,7 @@ namespace OpenTween
             this.ThumbnailImageSearchClick?.Invoke(this, new ThumbnailImageSearchEventArgs(searchUri));
         }
 
-        private void searchImageSauceNaoMenuItem_Click(object sender, EventArgs e)
+        private void SearchImageSauceNaoMenuItem_Click(object sender, EventArgs e)
         {
             var searchTargetUri = (string)this.searchImageSauceNaoMenuItem.Tag;
             var searchUri = this.GetImageSearchUriSauceNao(searchTargetUri);
@@ -273,10 +273,10 @@ namespace OpenTween
             this.ThumbnailImageSearchClick?.Invoke(this, new ThumbnailImageSearchEventArgs(searchUri));
         }
 
-        private void openMenuItem_Click(object sender, EventArgs e)
+        private void OpenMenuItem_Click(object sender, EventArgs e)
             => this.OpenImage(this.Thumbnail);
 
-        private void copyUrlMenuItem_Click(object sender, EventArgs e)
+        private void CopyUrlMenuItem_Click(object sender, EventArgs e)
         {
             try
             {
index f2c31cd..17680f4 100644 (file)
@@ -81,37 +81,37 @@ namespace OpenTween
         private const string HASHTAG_TERMINATOR = "[^A-Za-z0-9_" + LATIN_ACCENTS + NON_LATIN_HASHTAG_CHARS + CJ_HASHTAG_CHARACTERS + "]";
         public const string HASHTAG = "(" + HASHTAG_BOUNDARY + ")(#|#)(" + HASHTAG_ALPHANUMERIC + "*" + HASHTAG_ALPHA + HASHTAG_ALPHANUMERIC + "*)(?=" + HASHTAG_TERMINATOR + "|" + HASHTAG_BOUNDARY + ")";
         // URL正規表現
-        private const string url_valid_preceding_chars = @"(?:[^A-Za-z0-9@@$##\ufffe\ufeff\uffff\u202a-\u202e]|^)";
-        public const string url_invalid_without_protocol_preceding_chars = @"[-_./]$";
-        private const string url_invalid_domain_chars = @"\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$\u2000-\u200a\u0009-\u000d\u0020\u0085\u00a0\u1680\u180e\u2028\u2029\u202f\u205f\u3000\ufffe\ufeff\uffff\u202a-\u202e";
-        private const string url_valid_domain_chars = @"[^" + url_invalid_domain_chars + "]";
-        private const string url_valid_subdomain = @"(?:(?:" + url_valid_domain_chars + @"(?:[_-]|" + url_valid_domain_chars + @")*)?" + url_valid_domain_chars + @"\.)";
-        private const string url_valid_domain_name = @"(?:(?:" + url_valid_domain_chars + @"(?:-|" + url_valid_domain_chars + @")*)?" + url_valid_domain_chars + @"\.)";
-        private const string url_valid_GTLD = @"(?:(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx)(?=[^0-9a-zA-Z]|$))";
-        private const string url_valid_CCTLD = @"(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?=[^0-9a-zA-Z]|$))";
-        private const string url_valid_punycode = @"(?:xn--[0-9a-z]+)";
-        private const string url_valid_domain = @"(?<domain>" + url_valid_subdomain + "*" + url_valid_domain_name + "(?:" + url_valid_GTLD + "|" + url_valid_CCTLD + ")|" + url_valid_punycode + ")";
-        public const string url_valid_ascii_domain = @"(?:(?:[a-z0-9" + LATIN_ACCENTS + @"]+)\.)+(?:" + url_valid_GTLD + "|" + url_valid_CCTLD + "|" + url_valid_punycode + ")";
-        public const string url_invalid_short_domain = "^" + url_valid_domain_name + url_valid_CCTLD + "$";
-        private const string url_valid_port_number = @"[0-9]+";
-
-        private const string url_valid_general_path_chars = @"[a-z0-9!*';:=+,.$/%#\[\]\-_~|&" + LATIN_ACCENTS + "]";
-        private const string url_balance_parens = @"(?:\(" + url_valid_general_path_chars + @"+\))";
-        private const string url_valid_path_ending_chars = @"(?:[+\-a-z0-9=_#/" + LATIN_ACCENTS + "]|" + url_balance_parens + ")";
-        private const string pth = "(?:" +
+        private const string UrlValidPrecedingChars = @"(?:[^A-Za-z0-9@@$##\ufffe\ufeff\uffff\u202a-\u202e]|^)";
+        public const string UrlInvalidWithoutProtocolPrecedingChars = @"[-_./]$";
+        private const string UrlInvalidDomainChars = @"\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$\u2000-\u200a\u0009-\u000d\u0020\u0085\u00a0\u1680\u180e\u2028\u2029\u202f\u205f\u3000\ufffe\ufeff\uffff\u202a-\u202e";
+        private const string UrlValidDomainChars = @"[^" + UrlInvalidDomainChars + "]";
+        private const string UrlValidSubdomain = @"(?:(?:" + UrlValidDomainChars + @"(?:[_-]|" + UrlValidDomainChars + @")*)?" + UrlValidDomainChars + @"\.)";
+        private const string UrlValidDomainName = @"(?:(?:" + UrlValidDomainChars + @"(?:-|" + UrlValidDomainChars + @")*)?" + UrlValidDomainChars + @"\.)";
+        private const string UrlValidGTLD = @"(?:(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx)(?=[^0-9a-zA-Z]|$))";
+        private const string UrlValidCCTLD = @"(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?=[^0-9a-zA-Z]|$))";
+        private const string UrlValidPunycode = @"(?:xn--[0-9a-z]+)";
+        private const string UrlValidDomain = @"(?<domain>" + UrlValidSubdomain + "*" + UrlValidDomainName + "(?:" + UrlValidGTLD + "|" + UrlValidCCTLD + ")|" + UrlValidPunycode + ")";
+        public const string UrlValidAsciiDomain = @"(?:(?:[a-z0-9" + LATIN_ACCENTS + @"]+)\.)+(?:" + UrlValidGTLD + "|" + UrlValidCCTLD + "|" + UrlValidPunycode + ")";
+        public const string UrlInvalidShortDomain = "^" + UrlValidDomainName + UrlValidCCTLD + "$";
+        private const string UrlValidPortNumber = @"[0-9]+";
+
+        private const string UrlValidGeneralPathChars = @"[a-z0-9!*';:=+,.$/%#\[\]\-_~|&" + LATIN_ACCENTS + "]";
+        private const string UrlBalanceParens = @"(?:\(" + UrlValidGeneralPathChars + @"+\))";
+        private const string UrlValidPathEndingChars = @"(?:[+\-a-z0-9=_#/" + LATIN_ACCENTS + "]|" + UrlBalanceParens + ")";
+        private const string Pth = "(?:" +
             "(?:" +
-                url_valid_general_path_chars + "*" +
-                "(?:" + url_balance_parens + url_valid_general_path_chars + "*)*" +
-                url_valid_path_ending_chars +
-                ")|(?:@" + url_valid_general_path_chars + "+/)" +
+                UrlValidGeneralPathChars + "*" +
+                "(?:" + UrlBalanceParens + UrlValidGeneralPathChars + "*)*" +
+                UrlValidPathEndingChars +
+                ")|(?:@" + UrlValidGeneralPathChars + "+/)" +
             ")";
-        private const string qry = @"(?<query>\?[a-z0-9!?*'();:&=+$/%#\[\]\-_.,~|]*[a-z0-9_&=#/])?";
-        public const string rgUrl = @"(?<before>" + url_valid_preceding_chars + ")" +
+        private const string Qry = @"(?<query>\?[a-z0-9!?*'();:&=+$/%#\[\]\-_.,~|]*[a-z0-9_&=#/])?";
+        public const string RgUrl = @"(?<before>" + UrlValidPrecedingChars + ")" +
                                     "(?<url>(?<protocol>https?://)?" +
-                                    "(?<domain>" + url_valid_domain + ")" +
-                                    "(?::" + url_valid_port_number + ")?" +
-                                    "(?<path>/" + pth + "*)?" +
-                                    qry +
+                                    "(?<domain>" + UrlValidDomain + ")" +
+                                    "(?::" + UrlValidPortNumber + ")?" +
+                                    "(?<path>/" + Pth + "*)?" +
+                                    Qry +
                                     ")";
 
         #endregion
@@ -1361,7 +1361,7 @@ namespace OpenTween
         /// <exception cref="WebApiException"/>
         public async Task RefreshFollowerIds()
         {
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             var cursor = -1L;
             var newFollowerIds = Enumerable.Empty<long>();
@@ -1389,7 +1389,7 @@ namespace OpenTween
         /// <exception cref="WebApiException"/>
         public async Task RefreshNoRetweetIds()
         {
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             this.noRTId = await this.Api.NoRetweetIds()
                 .ConfigureAwait(false);
@@ -1596,7 +1596,7 @@ namespace OpenTween
         {
             if (Twitter.AccountState != MyCommon.ACCOUNT_STATE.Valid) return null;
 
-            if (MyCommon._endingFlag) return null;
+            if (MyCommon.EndingFlag) return null;
 
             var limits = await this.Api.ApplicationRateLimitStatus()
                 .ConfigureAwait(false);
@@ -1612,7 +1612,7 @@ namespace OpenTween
         /// <exception cref="WebApiException"/>
         public async Task RefreshBlockIds()
         {
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             var cursor = -1L;
             var newBlockIds = Enumerable.Empty<long>();
@@ -1637,7 +1637,7 @@ namespace OpenTween
         /// <exception cref="WebApiException"/>
         public async Task RefreshMuteUserIdsAsync()
         {
-            if (MyCommon._endingFlag) return;
+            if (MyCommon.EndingFlag) return;
 
             var ids = await TwitterIds.GetAllItemsAsync(x => this.Api.MutesUsersIds(x))
                 .ConfigureAwait(false);
index ad8d69f..689256a 100644 (file)
@@ -84,8 +84,6 @@ namespace OpenTween
         public string RecentPost = "";
         public DateTimeUtc PostCreatedAt;
         public string PostSource = "";        // html形式 "<a href="http://sourceforge.jp/projects/tween/wiki/FrontPage" rel="nofollow">Tween</a>"
-        public bool isFollowing = false;
-        public bool isFollowed = false;
 
         public override string ToString()
             => this.ScreenName + " / " + this.Name;
index f6db1c4..0cdc1f6 100644 (file)
@@ -178,7 +178,7 @@ namespace OpenTween
                     .Concat(TweetExtractor.ExtractEmojiEntities(descriptionText));
 
                 var html = TweetFormatter.AutoLinkHtml(descriptionText, mergedEntities);
-                html = this.mainForm.createDetailHtml(html);
+                html = this.mainForm.CreateDetailHtml(html);
 
                 if (cancellationToken.IsCancellationRequested)
                     return;
@@ -257,7 +257,7 @@ namespace OpenTween
                 var mergedEntities = entities.Concat(TweetExtractor.ExtractEmojiEntities(status.FullText));
 
                 var html = TweetFormatter.AutoLinkHtml(status.FullText, mergedEntities);
-                html = this.mainForm.createDetailHtml(html +
+                html = this.mainForm.CreateDetailHtml(html +
                     " Posted at " + MyCommon.DateTimeParse(status.CreatedAt).ToLocalTimeString() +
                     " via " + status.Source);