OSDN Git Service

シンプルな型名を使用する (IDE0049)
authorKimura Youichi <kim.upsilon@bucyou.net>
Wed, 28 Aug 2019 17:50:40 +0000 (02:50 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Wed, 28 Aug 2019 19:26:39 +0000 (04:26 +0900)
12 files changed:
OpenTween/FilterDialog.cs
OpenTween/HookGlobalHotkey.cs
OpenTween/ListManage.cs
OpenTween/NativeMethods.cs
OpenTween/Setting/SettingAtIdList.cs
OpenTween/Setting/SettingCommon.cs
OpenTween/ToolStripAPIGauge.cs
OpenTween/Tween.cs
OpenTween/TweenAboutBox.cs
OpenTween/Twitter.cs
OpenTween/UserInfo.cs
OpenTween/WebBrowserController.cs

index fe9c07b..c0391a9 100644 (file)
@@ -1345,7 +1345,7 @@ namespace OpenTween
                     for (var i = tbox.SelectionStart - 1; i >= 0; i--)
                     {
                         var c = tbox.Text[i];
-                        if (Char.IsLetterOrDigit(c) || c == '_')
+                        if (char.IsLetterOrDigit(c) || c == '_')
                         {
                             continue;
                         }
index 6a07ee3..0812849 100644 (file)
@@ -84,10 +84,10 @@ namespace OpenTween
            _targetForm.HandleDestroyed += this.OnHandleDestroyed;
         }
 
-        public void OnHandleCreated(Object sender, EventArgs e)
+        public void OnHandleCreated(object sender, EventArgs e)
             => this.AssignHandle(_targetForm.Handle);
 
-        public void OnHandleDestroyed(Object sender, EventArgs e)
+        public void OnHandleDestroyed(object sender, EventArgs e)
             => this.ReleaseHandle();
 
         public bool RegisterOriginalHotkey(Keys hotkey, int hotkeyValue, ModKeys modifiers)
index 672f409..7ada81c 100644 (file)
@@ -320,7 +320,7 @@ namespace OpenTween
                 this.UserFollowerNum.Text = user.FollowersCount.ToString("#,###,##0");
                 this.UserPostsNum.Text = user.StatusesCount.ToString("#,###,##0");
                 this.UserProfile.Text = user.Description;
-                if (!String.IsNullOrEmpty(user.RecentPost))
+                if (!string.IsNullOrEmpty(user.RecentPost))
                 {
                     this.UserTweetDateTime.Text = user.PostCreatedAt.ToLocalTimeString("yy/MM/dd HH:mm");
                     this.UserTweet.Text = user.RecentPost;
index a6523e3..e7557e7 100644 (file)
@@ -182,25 +182,25 @@ namespace OpenTween
 
         private struct FLASHWINFO
         {
-            public Int32 cbSize;    // FLASHWINFO構造体のサイズ
+            public int cbSize;    // FLASHWINFO構造体のサイズ
             public IntPtr hwnd;     // 点滅対象のウィンドウ・ハンドル
-            public Int32 dwFlags;   // 以下の「FLASHW_XXX」のいずれか
-            public Int32 uCount;    // 点滅する回数
-            public Int32 dwTimeout; // 点滅する間隔(ミリ秒単位)
+            public int dwFlags;   // 以下の「FLASHW_XXX」のいずれか
+            public int uCount;    // 点滅する回数
+            public int dwTimeout; // 点滅する間隔(ミリ秒単位)
         }
 
         // 点滅を止める
-        private const Int32 FLASHW_STOP = 0;
+        private const int FLASHW_STOP = 0;
         // タイトルバーを点滅させる
-        private const Int32 FLASHW_CAPTION = 0x1;
+        private const int FLASHW_CAPTION = 0x1;
         // タスクバー・ボタンを点滅させる
-        private const Int32 FLASHW_TRAY = 0x2;
+        private const int FLASHW_TRAY = 0x2;
         // タスクバー・ボタンとタイトルバーを点滅させる
-        private const Int32 FLASHW_ALL = 0x3;
+        private const int FLASHW_ALL = 0x3;
         // FLASHW_STOPが指定されるまでずっと点滅させる
-        private const Int32 FLASHW_TIMER = 0x4;
+        private const int FLASHW_TIMER = 0x4;
         // ウィンドウが最前面に来るまでずっと点滅させる
-        private const Int32 FLASHW_TIMERNOFG = 0xC;
+        private const int FLASHW_TIMERNOFG = 0xC;
         #endregion
 
         [DllImport("user32.dll")]
index 37b4000..5efd780 100644 (file)
@@ -44,7 +44,7 @@ namespace OpenTween
             => SaveSettings(this);
 
         public SettingAtIdList()
-            => this.AtIdList = new List<String>();
+            => this.AtIdList = new List<string>();
 
         public SettingAtIdList(List<string> ids)
             => this.AtIdList = ids;
index 289dd17..353f425 100644 (file)
@@ -64,7 +64,7 @@ namespace OpenTween
 
         private string Encrypt(string password)
         {
-            if (String.IsNullOrEmpty(password)) password = "";
+            if (string.IsNullOrEmpty(password)) password = "";
             if (password.Length > 0)
             {
                 try
@@ -83,7 +83,7 @@ namespace OpenTween
         }
         private string Decrypt(string password)
         {
-            if (String.IsNullOrEmpty(password)) password = "";
+            if (string.IsNullOrEmpty(password)) password = "";
             if (password.Length > 0)
             {
                 try
@@ -269,7 +269,7 @@ namespace OpenTween
         }
         private string Encrypt(string password)
         {
-            if (String.IsNullOrEmpty(password)) password = "";
+            if (string.IsNullOrEmpty(password)) password = "";
             if (password.Length > 0)
             {
                 try
@@ -288,7 +288,7 @@ namespace OpenTween
         }
         private string Decrypt(string password)
         {
-            if (String.IsNullOrEmpty(password)) password = "";
+            if (string.IsNullOrEmpty(password)) password = "";
             if (password.Length > 0)
             {
                 try
index 4aeee81..6e60632 100644 (file)
@@ -229,7 +229,7 @@ namespace OpenTween
                 "API rest {0} {1}/{2}" + Environment.NewLine +
                 "(reset after {3} minutes)";
 
-            this.ToolTipText = String.Format(toolTipTextFormat, endpointText, remainCountText, maxCountText, minuteText);
+            this.ToolTipText = string.Format(toolTipTextFormat, endpointText, remainCountText, maxCountText, minuteText);
         }
 
         #endregion
index 4d8011e..1032221 100644 (file)
@@ -816,7 +816,7 @@ namespace OpenTween
             tw.RestrictFavCheck = SettingManager.Common.RestrictFavCheck;
             tw.ReadOwnPost = SettingManager.Common.ReadOwnPost;
             tw.TrackWord = SettingManager.Common.TrackWord;
-            TrackToolStripMenuItem.Checked = !String.IsNullOrEmpty(tw.TrackWord);
+            TrackToolStripMenuItem.Checked = !string.IsNullOrEmpty(tw.TrackWord);
             tw.AllAtReply = SettingManager.Common.AllAtReply;
             AllrepliesToolStripMenuItem.Checked = tw.AllAtReply;
             ShortUrl.Instance.DisableExpanding = !SettingManager.Common.TinyUrlResolve;
@@ -6108,7 +6108,7 @@ namespace OpenTween
                             for (var i = StatusText.SelectionStart - 1; i >= 0; i--)
                             {
                                 var c = StatusText.Text[i];
-                                if (Char.IsLetterOrDigit(c) || c == '_')
+                                if (char.IsLetterOrDigit(c) || c == '_')
                                 {
                                     continue;
                                 }
@@ -9241,7 +9241,7 @@ namespace OpenTween
         private void MenuStrip1_MenuActivate(object sender, EventArgs e)
         {
             // フォーカスがメニューに移る (MenuStrip1.Tag フラグを立てる)
-            MenuStrip1.Tag = new Object();
+            MenuStrip1.Tag = new object();
             MenuStrip1.Select(); // StatusText がフォーカスを持っている場合 Leave が発生
         }
 
index 25c90b5..119bebf 100644 (file)
@@ -50,7 +50,7 @@ namespace OpenTween
             // TODO: [プロジェクト] メニューの下にある [プロジェクト プロパティ] ダイアログの [アプリケーション] ペインで、アプリケーションのアセンブリ情報を 
             //    カスタマイズします。
             this.LabelProductName.Text = ApplicationSettings.ApplicationName;
-            this.LabelVersion.Text = String.Format(Properties.Resources.TweenAboutBox_LoadText2, MyCommon.GetReadableVersion());
+            this.LabelVersion.Text = string.Format(Properties.Resources.TweenAboutBox_LoadText2, MyCommon.GetReadableVersion());
             this.LabelCopyright.Text = GetApplicationAttribute<AssemblyCopyrightAttribute>().Copyright;
             this.LabelCompanyName.Text = Application.CompanyName;
             this.TextBoxDescription.Text = GetApplicationAttribute<AssemblyDescriptionAttribute>().Description;
index 485d61f..326b8f3 100644 (file)
@@ -972,7 +972,7 @@ namespace OpenTween
         /// startStatusId からリプライ先の発言を辿る。発言は posts 以外からは検索しない。
         /// </summary>
         /// <returns>posts の中から検索されたリプライチェインの末端</returns>
-        internal static PostClass FindTopOfReplyChain(IDictionary<Int64, PostClass> posts, Int64 startStatusId)
+        internal static PostClass FindTopOfReplyChain(IDictionary<long, PostClass> posts, long startStatusId)
         {
             if (!posts.ContainsKey(startStatusId))
                 throw new ArgumentException("startStatusId (" + startStatusId + ") が posts の中から見つかりませんでした。", nameof(startStatusId));
@@ -991,7 +991,7 @@ namespace OpenTween
         public async Task GetRelatedResult(bool read, RelatedPostsTabModel tab)
         {
             var targetPost = tab.TargetPost;
-            var relPosts = new Dictionary<Int64, PostClass>();
+            var relPosts = new Dictionary<long, PostClass>();
             if (targetPost.TextFromApi.Contains("@") && targetPost.InReplyToStatusId == null)
             {
                 //検索結果対応
@@ -1044,7 +1044,7 @@ namespace OpenTween
                 .Concat(Twitter.ThirdPartyStatusUrlRegex.Matches(text).Cast<Match>());
             foreach (var _match in ma)
             {
-                if (Int64.TryParse(_match.Groups["StatusId"].Value, out var _statusId))
+                if (long.TryParse(_match.Groups["StatusId"].Value, out var _statusId))
                 {
                     if (relPosts.ContainsKey(_statusId))
                         continue;
@@ -1903,7 +1903,7 @@ namespace OpenTween
             public string Event { get; set; }
             public string Username { get; set; }
             public string Target { get; set; }
-            public Int64 Id { get; set; }
+            public long Id { get; set; }
             public bool IsMe { get; set; }
         }
 
index adb975d..fd94626 100644 (file)
@@ -65,7 +65,7 @@ namespace OpenTween
                 this.PostSource = user.Status.Source;
             }
         }
-        public Int64 Id = 0;
+        public long Id = 0;
         public string Name = "";
         public string ScreenName = "";
         public string Location = "";
index c2c750e..c447b69 100644 (file)
@@ -245,7 +245,7 @@ namespace OpenTween
             int MapUrlToZone([In, MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, out int pdwZone, int dwFlags);
 
             [PreserveSig]
-            int GetSecurityId([MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, [MarshalAs(UnmanagedType.LPArray)] byte[] pbSecurityId, ref UInt32 pcbSecurityId, UInt32 dwReserved);
+            int GetSecurityId([MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, [MarshalAs(UnmanagedType.LPArray)] byte[] pbSecurityId, ref uint pcbSecurityId, uint dwReserved);
 
             [PreserveSig]
             int ProcessUrlAction([In, MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, int dwAction, out byte pPolicy, int cbPolicy, byte pContext, int cbContext, int dwFlags, int dwReserved);