OSDN Git Service

パラメータの行を揃える (SA1117)
authorKimura Youichi <kim.upsilon@bucyou.net>
Sun, 27 Feb 2022 18:44:56 +0000 (03:44 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sun, 27 Feb 2022 23:43:45 +0000 (08:43 +0900)
27 files changed:
OpenTween.Tests/Api/TwitterApiTest.cs
OpenTween.Tests/Connection/OAuthUtilityTest.cs
OpenTween.Tests/Models/PostFilterRuleTest.cs
OpenTween.Tests/Thumbnail/Services/FoursquareCheckinTest.cs
OpenTween/Api/TwitterApi.cs
OpenTween/AppendSettingDialog.cs
OpenTween/Connection/Networking.cs
OpenTween/Connection/OAuthEchoHandler.cs
OpenTween/Connection/OAuthHandler.cs
OpenTween/Connection/OAuthUtility.cs
OpenTween/Connection/TwitterApiConnection.cs
OpenTween/Growl.cs
OpenTween/ImageCache.cs
OpenTween/Models/PostClass.cs
OpenTween/Models/PostFilterRule.cs
OpenTween/Models/TabInformations.cs
OpenTween/MyCommon.cs
OpenTween/NativeMethods.cs
OpenTween/OTBaseForm.cs
OpenTween/Thumbnail/Services/ImgAzyobuziNet.cs
OpenTween/Thumbnail/Services/SimpleThumbnailService.cs
OpenTween/Thumbnail/Services/TonTwitterCom.cs
OpenTween/Thumbnail/Services/Youtube.cs
OpenTween/Tween.cs
OpenTween/Twitter.cs
OpenTween/UserInfoDialog.cs
OpenTween/WebBrowserController.cs

index da1ebc3..577fccd 100644 (file)
@@ -217,9 +217,14 @@ namespace OpenTween.Api
             using var twitterApi = new TwitterApi(ApiKey.Create("fake_consumer_key"), ApiKey.Create("fake_consumer_secret"));
             twitterApi.apiConnection = mock.Object;
 
-            await twitterApi.StatusesUpdate("hogehoge", replyToId: 100L, mediaIds: new[] { 10L, 20L },
-                    autoPopulateReplyMetadata: true, excludeReplyUserIds: new[] { 100L, 200L },
-                    attachmentUrl: "https://twitter.com/twitterapi/status/22634515958")
+            await twitterApi.StatusesUpdate(
+                    "hogehoge",
+                    replyToId: 100L,
+                    mediaIds: new[] { 10L, 20L },
+                    autoPopulateReplyMetadata: true,
+                    excludeReplyUserIds: new[] { 100L, 200L },
+                    attachmentUrl: "https://twitter.com/twitterapi/status/22634515958"
+                )
                 .IgnoreResponse()
                 .ConfigureAwait(false);
 
index 0c607b4..6717c1f 100644 (file)
@@ -52,8 +52,12 @@ namespace OpenTween.Connection
         {
             // GET http://example.com/hoge?aaa=foo に対する署名を生成
             // 実際の param は oauth_consumer_key などのパラメーターが加わった状態で渡される
-            var oauthSignature = OAuthUtility.CreateSignature(ApiKey.Create("ConsumerSecret"), "TokenSecret",
-                "GET", new Uri("http://example.com/hoge"), new Dictionary<string, string> { ["aaa"] = "foo" });
+            var oauthSignature = OAuthUtility.CreateSignature(
+                ApiKey.Create("ConsumerSecret"),
+                "TokenSecret",
+                "GET",
+                new Uri("http://example.com/hoge"),
+                new Dictionary<string, string> { ["aaa"] = "foo" });
 
             var expectSignatureBase = "GET&http%3A%2F%2Fexample.com%2Fhoge&aaa%3Dfoo";
             var expectSignatureKey = "ConsumerSecret&TokenSecret";
@@ -68,8 +72,12 @@ namespace OpenTween.Connection
         {
             // GET http://example.com/hoge?aaa=foo&bbb=bar に対する署名を生成
             // 複数のパラメータが渡される場合は name 順でソートされる
-            var oauthSignature = OAuthUtility.CreateSignature(ApiKey.Create("ConsumerSecret"), "TokenSecret",
-                "GET", new Uri("http://example.com/hoge"), new Dictionary<string, string> {
+            var oauthSignature = OAuthUtility.CreateSignature(
+                ApiKey.Create("ConsumerSecret"),
+                "TokenSecret",
+                "GET",
+                new Uri("http://example.com/hoge"),
+                new Dictionary<string, string> {
                     ["bbb"] = "bar",
                     ["aaa"] = "foo",
                 });
@@ -87,8 +95,12 @@ namespace OpenTween.Connection
         {
             // GET http://example.com/hoge?aaa=foo に対する署名を生成
             // リクエストトークンの発行時は tokenSecret が空の状態で署名を生成することになる
-            var oauthSignature = OAuthUtility.CreateSignature(ApiKey.Create("ConsumerSecret"), null,
-                "GET", new Uri("http://example.com/hoge"), new Dictionary<string, string> { ["aaa"] = "foo" });
+            var oauthSignature = OAuthUtility.CreateSignature(
+                ApiKey.Create("ConsumerSecret"),
+                null,
+                "GET",
+                new Uri("http://example.com/hoge"),
+                new Dictionary<string, string> { ["aaa"] = "foo" });
 
             var expectSignatureBase = "GET&http%3A%2F%2Fexample.com%2Fhoge&aaa%3Dfoo";
             var expectSignatureKey = "ConsumerSecret&"; // 末尾の & は除去されない
@@ -102,8 +114,14 @@ namespace OpenTween.Connection
         public void CreateAuthorization_Test()
         {
             var authorization = OAuthUtility.CreateAuthorization(
-                "GET", new Uri("http://example.com/hoge"), new Dictionary<string, string> { ["aaa"] = "hoge" },
-                ApiKey.Create("ConsumerKey"), ApiKey.Create("ConsumerSecret"), "AccessToken", "AccessSecret", "Realm");
+                "GET",
+                new Uri("http://example.com/hoge"),
+                new Dictionary<string, string> { ["aaa"] = "hoge" },
+                ApiKey.Create("ConsumerKey"),
+                ApiKey.Create("ConsumerSecret"),
+                "AccessToken",
+                "AccessSecret",
+                "Realm");
 
             Assert.StartsWith("OAuth ", authorization, StringComparison.Ordinal);
 
index 4e9485b..5c6846a 100644 (file)
@@ -1438,7 +1438,8 @@ namespace OpenTween.Models
             var filter = new PostFilterRule();
 
             Assert.PropertyChanged(
-                filter, "FilterName",
+                filter,
+                "FilterName",
                 () => filter.FilterName = "hogehoge"
             );
 
@@ -1454,7 +1455,8 @@ namespace OpenTween.Models
 
             // 値に変化がないので PropertyChanged イベントは発生しない
             TestUtils.NotPropertyChanged(
-                filter, "FilterName",
+                filter,
+                "FilterName",
                 () => filter.FilterName = "hogehoge"
             );
 
index 0f41b77..ae9edd9 100644 (file)
@@ -97,7 +97,8 @@ namespace OpenTween.Thumbnail.Services
 
                 await service.GetThumbnailInfoAsync(
                     "https://www.swarmapp.com/c/xxxxxxxx",
-                    post, CancellationToken.None);
+                    post,
+                    CancellationToken.None);
 
                 Assert.Equal(0, handler.QueueCount);
             }
@@ -135,7 +136,8 @@ namespace OpenTween.Thumbnail.Services
 
                 await service.GetThumbnailInfoAsync(
                     "https://foursquare.com/hogehoge/checkin/xxxxxxxx",
-                    post, CancellationToken.None);
+                    post,
+                    CancellationToken.None);
 
                 Assert.Equal(0, handler.QueueCount);
             }
@@ -173,7 +175,8 @@ namespace OpenTween.Thumbnail.Services
 
                 await service.GetThumbnailInfoAsync(
                     "https://foursquare.com/hogehoge/checkin/xxxxxxxx?s=aaaaaaa",
-                    post, CancellationToken.None);
+                    post,
+                    CancellationToken.None);
 
                 Assert.Equal(0, handler.QueueCount);
             }
@@ -202,7 +205,8 @@ namespace OpenTween.Thumbnail.Services
 
                 await service.GetThumbnailInfoAsync(
                     "https://www.swarmapp.com/c/xxxxxxxx",
-                    post, CancellationToken.None);
+                    post,
+                    CancellationToken.None);
 
                 Assert.Equal(1, handler.QueueCount);
             }
index 928de6f..8dcdc19 100644 (file)
@@ -137,8 +137,13 @@ namespace OpenTween.Api
             return this.Connection.GetAsync<TwitterStatus>(endpoint, param, "/statuses/show/:id");
         }
 
-        public Task<LazyJson<TwitterStatus>> StatusesUpdate(string status, long? replyToId, IReadOnlyList<long>? mediaIds,
-            bool? autoPopulateReplyMetadata = null, IReadOnlyList<long>? excludeReplyUserIds = null, string? attachmentUrl = null)
+        public Task<LazyJson<TwitterStatus>> StatusesUpdate(
+            string status,
+            long? replyToId,
+            IReadOnlyList<long>? mediaIds,
+            bool? autoPopulateReplyMetadata = null,
+            IReadOnlyList<long>? excludeReplyUserIds = null,
+            string? attachmentUrl = null)
         {
             var endpoint = new Uri("statuses/update.json", UriKind.Relative);
             var param = new Dictionary<string, string>
index 56260ca..8edbf41 100644 (file)
@@ -224,8 +224,11 @@ namespace OpenTween
 
                     authUserCombo.SelectedIndex = idx;
 
-                    MessageBox.Show(this, Properties.Resources.AuthorizeButton_Click1,
-                        "Authenticate", MessageBoxButtons.OK);
+                    MessageBox.Show(
+                        this,
+                        Properties.Resources.AuthorizeButton_Click1,
+                        "Authenticate",
+                        MessageBoxButtons.OK);
                 }
                 catch (WebApiException ex)
                 {
index a22d04b..27d1f1a 100644 (file)
@@ -113,8 +113,12 @@ namespace OpenTween.Connection
                 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
         }
 
-        public static void SetWebProxy(ProxyType proxyType, string proxyAddress, int proxyPort,
-            string proxyUser, string proxyPassword)
+        public static void SetWebProxy(
+            ProxyType proxyType,
+            string proxyAddress,
+            int proxyPort,
+            string proxyUser,
+            string proxyPassword)
         {
             IWebProxy? proxy;
             switch (proxyType)
index 6bf4c7d..8bc7abb 100644 (file)
@@ -52,11 +52,24 @@ namespace OpenTween.Connection
             return base.SendAsync(request, cancellationToken);
         }
 
-        public static OAuthEchoHandler CreateHandler(HttpMessageHandler innerHandler, Uri authServiceProvider,
-            ApiKey consumerKey, ApiKey consumerSecret, string accessToken, string accessSecret, Uri? realm = null)
+        public static OAuthEchoHandler CreateHandler(
+            HttpMessageHandler innerHandler,
+            Uri authServiceProvider,
+            ApiKey consumerKey,
+            ApiKey consumerSecret,
+            string accessToken,
+            string accessSecret,
+            Uri? realm = null)
         {
-            var credential = OAuthUtility.CreateAuthorization("GET", authServiceProvider, null,
-                consumerKey, consumerSecret, accessToken, accessSecret, realm?.AbsoluteUri);
+            var credential = OAuthUtility.CreateAuthorization(
+                "GET",
+                authServiceProvider,
+                null,
+                consumerKey,
+                consumerSecret,
+                accessToken,
+                accessSecret,
+                realm?.AbsoluteUri);
 
             return new OAuthEchoHandler(innerHandler, authServiceProvider, credential);
         }
index b302a35..1b46c71 100644 (file)
@@ -57,8 +57,14 @@ namespace OpenTween.Connection
             var query = await GetParameters(request.RequestUri, request.Content)
                 .ConfigureAwait(false);
 
-            var credential = OAuthUtility.CreateAuthorization(request.Method.ToString().ToUpperInvariant(), request.RequestUri, query,
-                this.ConsumerKey, this.ConsumerSecret, this.AccessToken, this.AccessSecret);
+            var credential = OAuthUtility.CreateAuthorization(
+                request.Method.ToString().ToUpperInvariant(),
+                request.RequestUri,
+                query,
+                this.ConsumerKey,
+                this.ConsumerSecret,
+                this.AccessToken,
+                this.AccessSecret);
             request.Headers.TryAddWithoutValidation("Authorization", credential);
 
             if (request.Content is FormUrlEncodedContent postContent)
index 22aa278..c600f81 100644 (file)
@@ -55,8 +55,14 @@ namespace OpenTween.Connection
         /// <param name="token">アクセストークン、もしくはリクエストトークン。未取得なら空文字列</param>
         /// <param name="tokenSecret">アクセストークンシークレット。認証処理では空文字列</param>
         /// <param name="realm">realm (必要な場合のみ)</param>
-        public static string CreateAuthorization(string httpMethod, Uri requestUri, IEnumerable<KeyValuePair<string, string>>? query,
-            ApiKey consumerKey, ApiKey consumerSecret, string token, string tokenSecret,
+        public static string CreateAuthorization(
+            string httpMethod,
+            Uri requestUri,
+            IEnumerable<KeyValuePair<string, string>>? query,
+            ApiKey consumerKey,
+            ApiKey consumerSecret,
+            string token,
+            string tokenSecret,
             string? realm = null)
         {
             // OAuth共通情報取得
index f42d93d..59b479d 100644 (file)
@@ -437,8 +437,14 @@ namespace OpenTween.Connection
         {
             var uri = new Uri(RestApiBase, authServiceProvider);
 
-            return OAuthEchoHandler.CreateHandler(Networking.CreateHttpClientHandler(), uri,
-                this.consumerKey, this.consumerSecret, this.AccessToken, this.AccessSecret, realm);
+            return OAuthEchoHandler.CreateHandler(
+                Networking.CreateHttpClientHandler(),
+                uri,
+                this.consumerKey,
+                this.consumerSecret,
+                this.AccessToken,
+                this.AccessSecret,
+                realm);
         }
 
         public void Dispose()
@@ -512,8 +518,12 @@ namespace OpenTween.Connection
             return response;
         }
 
-        private static async Task<IDictionary<string, string>> GetOAuthTokenAsync(Uri uri, IDictionary<string, string> param,
-            ApiKey consumerKey, ApiKey consumerSecret, (string Token, string TokenSecret)? oauthToken)
+        private static async Task<IDictionary<string, string>> GetOAuthTokenAsync(
+            Uri uri,
+            IDictionary<string, string> param,
+            ApiKey consumerKey,
+            ApiKey consumerSecret,
+            (string Token, string TokenSecret)? oauthToken)
         {
             HttpClient authorizeClient;
             if (oauthToken != null)
index 09e349c..afbca36 100644 (file)
@@ -144,14 +144,28 @@ namespace OpenTween
                 this._targetConnector = this._connector.CreateInstance("Growl.Connector.GrowlConnector");
                 var _t = this._connector.GetType("Growl.Connector.NotificationType");
 
-                this._growlNTreply = _t.InvokeMember(null,
-                    BindingFlags.CreateInstance, null, null, new object[] { "REPLY", "Reply" }, CultureInfo.InvariantCulture);
+                this._growlNTreply = _t.InvokeMember(
+                    null,
+                    BindingFlags.CreateInstance,
+                    null,
+                    null,
+                    new object[] { "REPLY", "Reply" },
+                    CultureInfo.InvariantCulture);
 
                 this._growlNTdm = _t.InvokeMember(null,
-                    BindingFlags.CreateInstance, null, null, new object[] { "DIRECT_MESSAGE", "DirectMessage" }, CultureInfo.InvariantCulture);
-
-                this._growlNTnew = _t.InvokeMember(null,
-                    BindingFlags.CreateInstance, null, null, new object[] { "NOTIFY", "新着通知" }, CultureInfo.InvariantCulture);
+                    BindingFlags.CreateInstance,
+                    null,
+                    null,
+                    new object[] { "DIRECT_MESSAGE", "DirectMessage" },
+                    CultureInfo.InvariantCulture);
+
+                this._growlNTnew = _t.InvokeMember(
+                    null,
+                    BindingFlags.CreateInstance,
+                    null,
+                    null,
+                    new object[] { "NOTIFY", "新着通知" },
+                    CultureInfo.InvariantCulture);
 
                 var encryptType =
                         this._connector.GetType("Growl.Connector.Cryptography+SymmetricAlgorithmType").InvokeMember(
@@ -165,10 +179,11 @@ namespace OpenTween
                 if (File.Exists(Path.Combine(Application.StartupPath, "Icons\\Tween.png")))
                 {
                     // Icons\Tween.pngを使用
-                    var ci = this._core.GetType(
-                        "Growl.CoreLibrary.Resource").GetConstructor(
+                    var ci = this._core.GetType("Growl.CoreLibrary.Resource").GetConstructor(
                         BindingFlags.NonPublic | BindingFlags.Instance,
-                        null, new Type[] { typeof(string) }, null);
+                        null,
+                        new Type[] { typeof(string) },
+                        null);
 
                     var data = ci.Invoke(new object[] { Path.Combine(Application.StartupPath, "Icons\\Tween.png") });
                     var pi = this._growlApp.GetType().GetProperty("Icon");
@@ -178,17 +193,19 @@ namespace OpenTween
                 else if (File.Exists(Path.Combine(Application.StartupPath, "Icons\\MIcon.ico")))
                 {
                     // アイコンセットにMIcon.icoが存在する場合それを使用
-                    var cibd = this._core.GetType(
-                        "Growl.CoreLibrary.BinaryData").GetConstructor(
+                    var cibd = this._core.GetType("Growl.CoreLibrary.BinaryData").GetConstructor(
                         BindingFlags.Public | BindingFlags.Instance,
-                        null, new Type[] { typeof(byte[]) }, null);
+                        null,
+                        new Type[] { typeof(byte[]) },
+                        null);
                     var bdata = cibd.Invoke(
                         new object[] { this.IconToByteArray(Path.Combine(Application.StartupPath, "Icons\\MIcon.ico")) });
 
-                    var ciRes = this._core.GetType(
-                        "Growl.CoreLibrary.Resource").GetConstructor(
+                    var ciRes = this._core.GetType("Growl.CoreLibrary.Resource").GetConstructor(
                         BindingFlags.NonPublic | BindingFlags.Instance,
-                        null, new Type[] { bdata.GetType() }, null);
+                        null,
+                        new Type[] { bdata.GetType() },
+                        null);
 
                     var data = ciRes.Invoke(new object[] { bdata });
                     var pi = this._growlApp.GetType().GetProperty("Icon");
@@ -197,17 +214,19 @@ namespace OpenTween
                 else
                 {
                     // 内蔵アイコンリソースを使用
-                    var cibd = this._core.GetType(
-                        "Growl.CoreLibrary.BinaryData").GetConstructor(
+                    var cibd = this._core.GetType("Growl.CoreLibrary.BinaryData").GetConstructor(
                         BindingFlags.Public | BindingFlags.Instance,
-                        null, new Type[] { typeof(byte[]) }, null);
+                        null,
+                        new Type[] { typeof(byte[]) },
+                        null);
                     var bdata = cibd.Invoke(
                         new object[] { this.IconToByteArray(Properties.Resources.MIcon) });
 
-                    var ciRes = this._core.GetType(
-                        "Growl.CoreLibrary.Resource").GetConstructor(
+                    var ciRes = this._core.GetType("Growl.CoreLibrary.Resource").GetConstructor(
                         BindingFlags.NonPublic | BindingFlags.Instance,
-                        null, new Type[] { bdata.GetType() }, null);
+                        null,
+                        new Type[] { bdata.GetType() },
+                        null);
 
                     var data = ciRes.Invoke(new object[] { bdata });
                     var pi = this._growlApp.GetType().GetProperty("Icon");
@@ -323,7 +342,10 @@ namespace OpenTween
                         CultureInfo.InvariantCulture);
             }
             var cc = this._connector.GetType("Growl.Connector.CallbackContext").InvokeMember(
-                null, BindingFlags.CreateInstance, null, this._connector,
+                null,
+                BindingFlags.CreateInstance,
+                null,
+                this._connector,
                 new object[] { "some fake information", notificationName },
                 CultureInfo.InvariantCulture);
             this._targetConnector!.GetType().InvokeMember("Notify", BindingFlags.InvokeMethod, null, this._targetConnector, new object[] { n, cc }, CultureInfo.InvariantCulture);
index 01d9cae..e97ed97 100644 (file)
@@ -109,7 +109,8 @@ namespace OpenTween
 
                     return imageTask;
                 }
-            }, cancelToken);
+            },
+            cancelToken);
         }
 
         private async Task<MemoryImage> FetchImageAsync(string uri, CancellationToken cancelToken)
index d3d53db..035c197 100644 (file)
@@ -320,8 +320,10 @@ namespace OpenTween.Models
                 if (this.SourceUri == null)
                     return WebUtility.HtmlEncode(this.Source);
 
-                return string.Format("<a href=\"{0}\" rel=\"nofollow\">{1}</a>",
-                    WebUtility.HtmlEncode(this.SourceUri.AbsoluteUri), WebUtility.HtmlEncode(this.Source));
+                return string.Format(
+                    "<a href=\"{0}\" rel=\"nofollow\">{1}</a>",
+                    WebUtility.HtmlEncode(this.SourceUri.AbsoluteUri),
+                    WebUtility.HtmlEncode(this.Source));
             }
         }
 
index 8ab4c5b..f5f86f3 100644 (file)
@@ -257,13 +257,27 @@ namespace OpenTween.Models
 
             var matchExpr = this.MakeFiltersExpr(
                 postParam,
-                this.FilterName, this.FilterBody, this.FilterSource, this.FilterRt,
-                this.UseRegex, this.CaseSensitive, this.UseNameField, this.UseLambda, this.FilterByUrl);
+                this.FilterName,
+                this.FilterBody,
+                this.FilterSource,
+                this.FilterRt,
+                this.UseRegex,
+                this.CaseSensitive,
+                this.UseNameField,
+                this.UseLambda,
+                this.FilterByUrl);
 
             var excludeExpr = this.MakeFiltersExpr(
                 postParam,
-                this.ExFilterName, this.ExFilterBody, this.ExFilterSource, this.ExFilterRt,
-                this.ExUseRegex, this.ExCaseSensitive, this.ExUseNameField, this.ExUseLambda, this.ExFilterByUrl);
+                this.ExFilterName,
+                this.ExFilterBody,
+                this.ExFilterSource,
+                this.ExFilterRt,
+                this.ExUseRegex,
+                this.ExCaseSensitive,
+                this.ExUseNameField,
+                this.ExUseLambda,
+                this.ExFilterByUrl);
 
             Expression<Func<PostClass, MyCommon.HITRESULT>> filterExpr;
 
@@ -326,8 +340,15 @@ namespace OpenTween.Models
 
         protected virtual Expression? MakeFiltersExpr(
             ParameterExpression postParam,
-            string? filterName, string[] filterBody, string? filterSource, bool filterRt,
-            bool useRegex, bool caseSensitive, bool useNameField, bool useLambda, bool filterByUrl)
+            string? filterName,
+            string[] filterBody,
+            string? filterSource,
+            bool filterRt,
+            bool useRegex,
+            bool caseSensitive,
+            bool useNameField,
+            bool useLambda,
+            bool filterByUrl)
         {
             var filterExprs = new List<Expression>();
 
@@ -413,8 +434,12 @@ namespace OpenTween.Models
         }
 
         protected Expression MakeGenericFilter(
-            ParameterExpression postParam, string targetFieldName, string pattern,
-            bool useRegex, bool caseSensitive, bool exactMatch = false)
+            ParameterExpression postParam,
+            string targetFieldName,
+            string pattern,
+            bool useRegex,
+            bool caseSensitive,
+            bool exactMatch = false)
         {
             // x.<targetFieldName>
             var targetField = Expression.Property(
index 5d95774..6059d1e 100644 (file)
@@ -326,8 +326,11 @@ namespace OpenTween.Models
         public int SubmitUpdate()
             => this.SubmitUpdate(out _, out _, out _, out _);
 
-        public int SubmitUpdate(out string soundFile, out PostClass[] notifyPosts,
-            out bool newMentionOrDm, out bool isDeletePost)
+        public int SubmitUpdate(
+            out string soundFile,
+            out PostClass[] notifyPosts,
+            out bool newMentionOrDm,
+            out bool isDeletePost)
         {
             // 注:メインスレッドから呼ぶこと
             lock (this.LockObj)
index 7348754..582eb68 100644 (file)
@@ -492,13 +492,11 @@ namespace OpenTween
 
             if (idx_to < idx_fr)
             {
-                Array.Copy(values, idx_to, values,
-                    idx_to + 1, num_moved);
+                Array.Copy(values, idx_to, values, idx_to + 1, num_moved);
             }
             else
             {
-                Array.Copy(values, idx_fr + 1, values,
-                    idx_fr, num_moved);
+                Array.Copy(values, idx_fr + 1, values, idx_fr, num_moved);
             }
 
             values[idx_to] = moved_value;
index 70867d0..cfac940 100644 (file)
@@ -243,8 +243,7 @@ namespace OpenTween
 
         #region "グローバルフック"
         [DllImport("user32")]
-        private static extern int RegisterHotKey(IntPtr hwnd, int id,
-            int fsModifiers, int vk);
+        private static extern int RegisterHotKey(IntPtr hwnd, int id, int fsModifiers, int vk);
         [DllImport("user32")]
         private static extern int UnregisterHotKey(IntPtr hwnd, int id);
         [DllImport("kernel32", CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true)]
@@ -465,29 +464,31 @@ namespace OpenTween
         {
             var foundHwnd = IntPtr.Zero;
 
-            EnumWindows((hWnd, lParam) =>
-            {
-                GetWindowThreadProcessId(hWnd, out var procId);
-
-                if (procId == pid)
+            EnumWindows(
+                (hWnd, lParam) =>
                 {
-                    var windowTitleLen = GetWindowTextLength(hWnd);
+                    GetWindowThreadProcessId(hWnd, out var procId);
 
-                    if (windowTitleLen > 0)
+                    if (procId == pid)
                     {
-                        var windowTitle = new StringBuilder(windowTitleLen + 1);
-                        GetWindowText(hWnd, windowTitle, windowTitle.Capacity);
+                        var windowTitleLen = GetWindowTextLength(hWnd);
 
-                        if (windowTitle.ToString().Contains(searchWindowTitle))
+                        if (windowTitleLen > 0)
                         {
-                            foundHwnd = hWnd;
-                            return false;
+                            var windowTitle = new StringBuilder(windowTitleLen + 1);
+                            GetWindowText(hWnd, windowTitle, windowTitle.Capacity);
+
+                            if (windowTitle.ToString().Contains(searchWindowTitle))
+                            {
+                                foundHwnd = hWnd;
+                                return false;
+                            }
                         }
                     }
-                }
 
-                return true;
-            }, IntPtr.Zero);
+                    return true;
+                },
+                IntPtr.Zero);
 
             return foundHwnd;
         }
index 7e87990..8a0c588 100644 (file)
@@ -101,7 +101,8 @@ namespace OpenTween
                 {
                     tcs.SetException(ex);
                 }
-            }, null);
+            },
+            null);
 
             return tcs.Task;
         }
index 4804950..409b129 100644 (file)
@@ -216,7 +216,8 @@ namespace OpenTween.Thumbnail.Services
                 }
 
                 return null;
-            }, token);
+            },
+            token);
         }
 
         public virtual void Dispose()
index 9125af0..36154b7 100644 (file)
@@ -73,7 +73,8 @@ namespace OpenTween.Thumbnail.Services
                     TooltipText = null,
                     FullSizeImageUrl = this.ReplaceUrl(url, this.fullsize_replacement)
                 };
-            }, token);
+            },
+            token);
         }
 
         protected string? ReplaceUrl(string url)
index 72b774b..ceb49be 100644 (file)
@@ -61,25 +61,28 @@ namespace OpenTween.Thumbnail.Services
                     TooltipText = null,
                     FullSizeImageUrl = largeUrl,
                 };
-            }, token);
+            },
+            token);
         }
 
         public class Thumbnail : ThumbnailInfo
         {
             public override Task<MemoryImage> LoadThumbnailImageAsync(HttpClient http, CancellationToken cancellationToken)
             {
-                return Task.Run(async () =>
-                {
-                    var apiConnection = TonTwitterCom.GetApiConnection!();
+                return Task.Run(
+                    async () =>
+                    {
+                        var apiConnection = TonTwitterCom.GetApiConnection!();
 
-                    using var imageStream = await apiConnection.GetStreamAsync(new Uri(this.ThumbnailImageUrl), null)
-                        .ConfigureAwait(false);
+                        using var imageStream = await apiConnection.GetStreamAsync(new Uri(this.ThumbnailImageUrl), null)
+                            .ConfigureAwait(false);
 
-                    cancellationToken.ThrowIfCancellationRequested();
+                        cancellationToken.ThrowIfCancellationRequested();
 
-                    return await MemoryImage.CopyFromStreamAsync(imageStream)
-                        .ConfigureAwait(false);
-                }, cancellationToken);
+                        return await MemoryImage.CopyFromStreamAsync(imageStream)
+                            .ConfigureAwait(false);
+                    },
+                    cancellationToken);
             }
         }
     }
index d283b54..8af3a08 100644 (file)
@@ -60,7 +60,8 @@ namespace OpenTween.Thumbnail.Services
                     TooltipText = null,
                     IsPlayable = true,
                 };
-            }, token);
+            },
+            token);
         }
     }
 }
index 5bf0da9..0dcaca3 100644 (file)
@@ -899,9 +899,12 @@ namespace OpenTween
             // Twitter用通信クラス初期化
             Networking.DefaultTimeout = TimeSpan.FromSeconds(SettingManager.Common.DefaultTimeOut);
             Networking.UploadImageTimeout = TimeSpan.FromSeconds(SettingManager.Common.UploadImageTimeout);
-            Networking.SetWebProxy(SettingManager.Local.ProxyType,
-                SettingManager.Local.ProxyAddress, SettingManager.Local.ProxyPort,
-                SettingManager.Local.ProxyUser, SettingManager.Local.ProxyPassword);
+            Networking.SetWebProxy(
+                SettingManager.Local.ProxyType,
+                SettingManager.Local.ProxyAddress,
+                SettingManager.Local.ProxyPort,
+                SettingManager.Local.ProxyUser,
+                SettingManager.Local.ProxyPassword);
             Networking.ForceIPv4 = SettingManager.Common.ForceIPv4;
 
             TwitterApiConnection.RestApiHost = SettingManager.Common.TwitterApiHost;
@@ -920,8 +923,12 @@ namespace OpenTween
             }
             catch (WebApiException ex)
             {
-                MessageBox.Show(this, string.Format(Properties.Resources.StartupAuthError_Text, ex.Message),
-                    ApplicationSettings.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                MessageBox.Show(
+                    this,
+                    string.Format(Properties.Resources.StartupAuthError_Text, ex.Message),
+                    ApplicationSettings.ApplicationName,
+                    MessageBoxButtons.OK,
+                    MessageBoxIcon.Warning);
             }
 
             // サムネイル関連の初期化
@@ -1405,8 +1412,11 @@ namespace OpenTween
 
             // 更新確定
             int addCount;
-            addCount = this._statuses.SubmitUpdate(out var soundFile, out var notifyPosts,
-                out var newMentionOrDm, out var isDelete);
+            addCount = this._statuses.SubmitUpdate(
+                out var soundFile,
+                out var notifyPosts,
+                out var newMentionOrDm,
+                out var isDelete);
 
             if (MyCommon._endingFlag) return;
 
@@ -2539,8 +2549,12 @@ namespace OpenTween
             }
         }
 
-        private async Task PostMessageAsyncInternal(IProgress<string> p, CancellationToken ct, PostStatusParams postParams,
-            IMediaUploadService? uploadService, IMediaItem[]? uploadItems)
+        private async Task PostMessageAsyncInternal(
+            IProgress<string> p,
+            CancellationToken ct,
+            PostStatusParams postParams,
+            IMediaUploadService? uploadService,
+            IMediaItem[]? uploadItems)
         {
             if (ct.IsCancellationRequested)
                 return;
@@ -2938,9 +2952,11 @@ namespace OpenTween
                 {
                     if (multiFavoriteChangeDialogEnable)
                     {
-                        var confirm = MessageBox.Show(Properties.Resources.FavRemoveToolStripMenuItem_ClickText1,
+                        var confirm = MessageBox.Show(
+                            Properties.Resources.FavRemoveToolStripMenuItem_ClickText1,
                             Properties.Resources.FavRemoveToolStripMenuItem_ClickText2,
-                            MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                            MessageBoxButtons.OKCancel,
+                            MessageBoxIcon.Question);
 
                         if (confirm == DialogResult.Cancel)
                             return;
@@ -3250,10 +3266,12 @@ namespace OpenTween
             if (!posts.Any(x => x.CanDeleteBy(this.tw.UserId)))
                 return;
 
-            var ret = MessageBox.Show(this,
+            var ret = MessageBox.Show(
+                this,
                 string.Format(Properties.Resources.DeleteStripMenuItem_ClickText1, Environment.NewLine),
                 Properties.Resources.DeleteStripMenuItem_ClickText2,
-                MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                MessageBoxButtons.OKCancel,
+                MessageBoxIcon.Question);
 
             if (ret != DialogResult.OK)
                 return;
@@ -3482,9 +3500,12 @@ namespace OpenTween
 
                     Networking.DefaultTimeout = TimeSpan.FromSeconds(SettingManager.Common.DefaultTimeOut);
                     Networking.UploadImageTimeout = TimeSpan.FromSeconds(SettingManager.Common.UploadImageTimeout);
-                    Networking.SetWebProxy(SettingManager.Local.ProxyType,
-                        SettingManager.Local.ProxyAddress, SettingManager.Local.ProxyPort,
-                        SettingManager.Local.ProxyUser, SettingManager.Local.ProxyPassword);
+                    Networking.SetWebProxy(
+                        SettingManager.Local.ProxyType,
+                        SettingManager.Local.ProxyAddress,
+                        SettingManager.Local.ProxyPort,
+                        SettingManager.Local.ProxyUser,
+                        SettingManager.Local.ProxyPassword);
                     Networking.ForceIPv4 = SettingManager.Common.ForceIPv4;
 
                     this.ImageSelector.Reset(this.tw, this.tw.Configuration);
@@ -4090,8 +4111,13 @@ namespace OpenTween
             if (confirm)
             {
                 var tmp = string.Format(Properties.Resources.RemoveSpecifiedTabText1, Environment.NewLine);
-                if (MessageBox.Show(tmp, TabName + " " + Properties.Resources.RemoveSpecifiedTabText2,
-                                 MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
+                var result = MessageBox.Show(
+                    tmp,
+                    TabName + " " + Properties.Resources.RemoveSpecifiedTabText2,
+                    MessageBoxButtons.OKCancel,
+                    MessageBoxIcon.Question,
+                    MessageBoxDefaultButton.Button2);
+                if (result == DialogResult.Cancel)
                 {
                     return false;
                 }
@@ -4891,7 +4917,8 @@ namespace OpenTween
 
                         using var fnt = new Font(e.Item.Font, FontStyle.Bold);
 
-                        TextRenderer.DrawText(e.Graphics,
+                        TextRenderer.DrawText(
+                            e.Graphics,
                             post.IsDeleted ? "(DELETED)" : post.TextSingleLine,
                             e.Item.Font,
                             Rectangle.Round(rct),
@@ -4900,7 +4927,8 @@ namespace OpenTween
                             TextFormatFlags.EndEllipsis |
                             TextFormatFlags.GlyphOverhangPadding |
                             TextFormatFlags.NoPrefix);
-                        TextRenderer.DrawText(e.Graphics,
+                        TextRenderer.DrawText(
+                            e.Graphics,
                             e.Item.SubItems[4].Text + " / " + e.Item.SubItems[1].Text + " (" + e.Item.SubItems[3].Text + ") " + e.Item.SubItems[5].Text + e.Item.SubItems[6].Text + " [" + e.Item.SubItems[7].Text + "]",
                             fnt,
                             rctB,
@@ -4920,28 +4948,30 @@ namespace OpenTween
 
                         if (drawLineCount == 1)
                         {
-                            TextRenderer.DrawText(e.Graphics,
-                                                    text,
-                                                    e.Item.Font,
-                                                    Rectangle.Round(rct),
-                                                    color,
-                                                    TextFormatFlags.SingleLine |
-                                                    TextFormatFlags.EndEllipsis |
-                                                    TextFormatFlags.GlyphOverhangPadding |
-                                                    TextFormatFlags.NoPrefix |
-                                                    TextFormatFlags.VerticalCenter);
+                            TextRenderer.DrawText(
+                                e.Graphics,
+                                text,
+                                e.Item.Font,
+                                Rectangle.Round(rct),
+                                color,
+                                TextFormatFlags.SingleLine |
+                                TextFormatFlags.EndEllipsis |
+                                TextFormatFlags.GlyphOverhangPadding |
+                                TextFormatFlags.NoPrefix |
+                                TextFormatFlags.VerticalCenter);
                         }
                         else
                         {
-                            TextRenderer.DrawText(e.Graphics,
-                                                    text,
-                                                    e.Item.Font,
-                                                    Rectangle.Round(rct),
-                                                    color,
-                                                    TextFormatFlags.WordBreak |
-                                                    TextFormatFlags.EndEllipsis |
-                                                    TextFormatFlags.GlyphOverhangPadding |
-                                                    TextFormatFlags.NoPrefix);
+                            TextRenderer.DrawText(
+                                e.Graphics,
+                                text,
+                                e.Item.Font,
+                                Rectangle.Round(rct),
+                                color,
+                                TextFormatFlags.WordBreak |
+                                TextFormatFlags.EndEllipsis |
+                                TextFormatFlags.GlyphOverhangPadding |
+                                TextFormatFlags.NoPrefix);
                         }
                     }
                 }
@@ -5400,13 +5430,17 @@ namespace OpenTween
                     // 更新不要
                     if (!startup)
                     {
-                        var msgtext = string.Format(Properties.Resources.CheckNewVersionText7,
-                            MyCommon.GetReadableVersion(), MyCommon.GetReadableVersion(versionInfo.Version));
+                        var msgtext = string.Format(
+                            Properties.Resources.CheckNewVersionText7,
+                            MyCommon.GetReadableVersion(),
+                            MyCommon.GetReadableVersion(versionInfo.Version));
                         msgtext = MyCommon.ReplaceAppName(msgtext);
 
-                        MessageBox.Show(msgtext,
+                        MessageBox.Show(
+                            msgtext,
                             MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2),
-                            MessageBoxButtons.OK, MessageBoxIcon.Information);
+                            MessageBoxButtons.OK,
+                            MessageBoxIcon.Information);
                     }
                     return;
                 }
@@ -5435,9 +5469,12 @@ namespace OpenTween
                 this.StatusLabel.Text = Properties.Resources.CheckNewVersionText9;
                 if (!startup)
                 {
-                    MessageBox.Show(Properties.Resources.CheckNewVersionText10,
+                    MessageBox.Show(
+                        Properties.Resources.CheckNewVersionText10,
                         MyCommon.ReplaceAppName(Properties.Resources.CheckNewVersionText2),
-                        MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
+                        MessageBoxButtons.OK,
+                        MessageBoxIcon.Exclamation,
+                        MessageBoxDefaultButton.Button2);
                 }
             }
         }
@@ -7122,8 +7159,12 @@ namespace OpenTween
             var match = Twitter.StatusUrlRegex.Match(inputText);
             if (!match.Success)
             {
-                MessageBox.Show(this, Properties.Resources.OpenURL_InvalidFormat,
-                    Properties.Resources.OpenURL_Caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                MessageBox.Show(
+                    this,
+                    Properties.Resources.OpenURL_InvalidFormat,
+                    Properties.Resources.OpenURL_Caption,
+                    MessageBoxButtons.OK,
+                    MessageBoxIcon.Error);
                 return;
             }
 
@@ -7142,9 +7183,11 @@ namespace OpenTween
         {
             var tab = this.CurrentTab;
 
-            var rslt = MessageBox.Show(string.Format(Properties.Resources.SaveLogMenuItem_ClickText1, Environment.NewLine),
-                    Properties.Resources.SaveLogMenuItem_ClickText2,
-                    MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
+            var rslt = MessageBox.Show(
+                string.Format(Properties.Resources.SaveLogMenuItem_ClickText1, Environment.NewLine),
+                Properties.Resources.SaveLogMenuItem_ClickText2,
+                MessageBoxButtons.YesNoCancel,
+                MessageBoxIcon.Question);
             if (rslt == DialogResult.Cancel) return;
 
             this.SaveFileDialog1.FileName = $"{ApplicationSettings.AssemblyName}Posts{DateTimeUtc.Now.ToLocalTime():yyMMdd-HHmmss}.tsv";
@@ -10037,7 +10080,8 @@ namespace OpenTween
                 if (isFollowing)
                 {
                     if (MessageBox.Show(
-                        Properties.Resources.GetFriendshipInfo7 + System.Environment.NewLine + result, Properties.Resources.GetFriendshipInfo8,
+                        Properties.Resources.GetFriendshipInfo7 + System.Environment.NewLine + result,
+                        Properties.Resources.GetFriendshipInfo8,
                         MessageBoxButtons.YesNo,
                         MessageBoxIcon.Question,
                         MessageBoxDefaultButton.Button2) == DialogResult.Yes)
index 1f65d31..36f885d 100644 (file)
@@ -129,21 +129,25 @@ namespace OpenTween
         /// <summary>
         /// attachment_url に指定可能な URL を判定する正規表現
         /// </summary>
-        public static readonly Regex AttachmentUrlRegex = new Regex(@"https?://(
+        public static readonly Regex AttachmentUrlRegex = new Regex(
+            @"https?://(
    twitter\.com/[0-9A-Za-z_]+/status/[0-9]+
  | mobile\.twitter\.com/[0-9A-Za-z_]+/status/[0-9]+
  | twitter\.com/messages/compose\?recipient_id=[0-9]+(&.+)?
-)$", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
+)$",
+            RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
 
         /// <summary>
         /// FavstarやaclogなどTwitter関連サービスのパーマリンクURLからステータスIDを抽出する正規表現
         /// </summary>
-        public static readonly Regex ThirdPartyStatusUrlRegex = new Regex(@"https?://(?:[^.]+\.)?(?:
+        public static readonly Regex ThirdPartyStatusUrlRegex = new Regex(
+            @"https?://(?:[^.]+\.)?(?:
   favstar\.fm/users/[a-zA-Z0-9_]+/status/       # Favstar
 | favstar\.fm/t/                                # Favstar (short)
 | aclog\.koba789\.com/i/                        # aclog
 | frtrt\.net/solo_status\.php\?status=          # RtRT
-)(?<StatusId>[0-9]+)", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
+)(?<StatusId>[0-9]+)",
+            RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
 
         /// <summary>
         /// DM送信かどうかを判定する正規表現
@@ -270,8 +274,14 @@ namespace OpenTween
                 return null;
             }
 
-            var response = await this.Api.StatusesUpdate(param.Text, param.InReplyToStatusId, param.MediaIds,
-                    param.AutoPopulateReplyMetadata, param.ExcludeReplyUserIds, param.AttachmentUrl)
+            var response = await this.Api.StatusesUpdate(
+                    param.Text,
+                    param.InReplyToStatusId,
+                    param.MediaIds,
+                    param.AutoPopulateReplyMetadata,
+                    param.ExcludeReplyUserIds,
+                    param.AttachmentUrl
+                )
                 .ConfigureAwait(false);
 
             var status = await response.LoadJsonAsync()
@@ -1146,8 +1156,11 @@ namespace OpenTween
             this.CreateDirectMessagesEventFromJson(events, users, apps, read);
         }
 
-        private void CreateDirectMessagesEventFromJson(IEnumerable<TwitterMessageEvent> events, IReadOnlyDictionary<string, TwitterUser> users,
-            IReadOnlyDictionary<string, TwitterMessageEventList.App> apps, bool read)
+        private void CreateDirectMessagesEventFromJson(
+            IEnumerable<TwitterMessageEvent> events,
+            IReadOnlyDictionary<string, TwitterUser> users,
+            IReadOnlyDictionary<string, TwitterMessageEventList.App> apps,
+            bool read)
         {
             foreach (var eventItem in events)
             {
index 5cd48f4..8b42c20 100644 (file)
@@ -372,9 +372,12 @@ namespace OpenTween
 
         private async void ButtonUnFollow_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show(this._displayUser.ScreenName + Properties.Resources.ButtonUnFollow_ClickText1,
-                               Properties.Resources.ButtonUnFollow_ClickText2,
-                               MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
+            if (MessageBox.Show(
+                this._displayUser.ScreenName + Properties.Resources.ButtonUnFollow_ClickText1,
+                Properties.Resources.ButtonUnFollow_ClickText2,
+                MessageBoxButtons.YesNo,
+                MessageBoxIcon.Warning,
+                MessageBoxDefaultButton.Button2) == DialogResult.Yes)
             {
                 using (ControlTransaction.Disabled(this.ButtonUnFollow))
                 {
@@ -616,9 +619,12 @@ namespace OpenTween
 
         private async void ButtonBlock_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show(this._displayUser.ScreenName + Properties.Resources.ButtonBlock_ClickText1,
-                                Properties.Resources.ButtonBlock_ClickText2,
-                                MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
+            if (MessageBox.Show(
+                this._displayUser.ScreenName + Properties.Resources.ButtonBlock_ClickText1,
+                Properties.Resources.ButtonBlock_ClickText2,
+                MessageBoxButtons.YesNo,
+                MessageBoxIcon.Warning,
+                MessageBoxDefaultButton.Button2) == DialogResult.Yes)
             {
                 using (ControlTransaction.Disabled(this.ButtonBlock))
                 {
@@ -640,9 +646,12 @@ namespace OpenTween
 
         private async void ButtonReportSpam_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show(this._displayUser.ScreenName + Properties.Resources.ButtonReportSpam_ClickText1,
-                                Properties.Resources.ButtonReportSpam_ClickText2,
-                                MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
+            if (MessageBox.Show(
+                this._displayUser.ScreenName + Properties.Resources.ButtonReportSpam_ClickText1,
+                Properties.Resources.ButtonReportSpam_ClickText2,
+                MessageBoxButtons.YesNo,
+                MessageBoxIcon.Warning,
+                MessageBoxDefaultButton.Button2) == DialogResult.Yes)
             {
                 using (ControlTransaction.Disabled(this.ButtonReportSpam))
                 {
@@ -664,9 +673,12 @@ namespace OpenTween
 
         private async void ButtonBlockDestroy_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show(this._displayUser.ScreenName + Properties.Resources.ButtonBlockDestroy_ClickText1,
-                                Properties.Resources.ButtonBlockDestroy_ClickText2,
-                                MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
+            if (MessageBox.Show(
+                this._displayUser.ScreenName + Properties.Resources.ButtonBlockDestroy_ClickText1,
+                Properties.Resources.ButtonBlockDestroy_ClickText2,
+                MessageBoxButtons.YesNo,
+                MessageBoxIcon.Warning,
+                MessageBoxDefaultButton.Button2) == DialogResult.Yes)
             {
                 using (ControlTransaction.Disabled(this.ButtonBlockDestroy))
                 {
@@ -722,8 +734,12 @@ namespace OpenTween
             if (e.Data.GetDataPresent(DataFormats.FileDrop) &&
                 !e.Data.GetDataPresent(DataFormats.Html, false)) // WebBrowserコントロールからの絵文字画像D&Dは弾く
             {
-                var ret = MessageBox.Show(this, Properties.Resources.ChangeIconToolStripMenuItem_Confirm,
-                    ApplicationSettings.ApplicationName, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                var ret = MessageBox.Show(
+                    this,
+                    Properties.Resources.ChangeIconToolStripMenuItem_Confirm,
+                    ApplicationSettings.ApplicationName,
+                    MessageBoxButtons.OKCancel,
+                    MessageBoxIcon.Question);
                 if (ret != DialogResult.OK)
                     return;
 
index 6d90bea..88fd73d 100644 (file)
@@ -309,7 +309,8 @@ namespace OpenTween
             {
                 this.ocxServiceProvider.QueryService(
                     ref WebBrowserAPI.SID_SProfferService,
-                    ref WebBrowserAPI.IID_IProfferService, out this.profferServicePtr);
+                    ref WebBrowserAPI.IID_IProfferService,
+                    out this.profferServicePtr);
             }
             catch (SEHException ex)
             {
@@ -344,8 +345,10 @@ namespace OpenTween
             }
         }
 
-        int WebBrowserAPI.IServiceProvider.QueryService(ref Guid guidService,
-            ref Guid riid, out IntPtr ppvObject)
+        int WebBrowserAPI.IServiceProvider.QueryService(
+            ref Guid guidService,
+            ref Guid riid,
+            out IntPtr ppvObject)
         {
 
             ppvObject = IntPtr.Zero;