OSDN Git Service

使用されていないフィールドを削除 (CA1823)
authorKimura Youichi <kim.upsilon@bucyou.net>
Sun, 13 Jul 2014 00:51:08 +0000 (09:51 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Mon, 21 Jul 2014 06:26:57 +0000 (15:26 +0900)
http://msdn.microsoft.com/ja-jp/library/ms245042.aspx

OpenTween/Connection/HttpTwitter.cs
OpenTween/DetailsListView.cs
OpenTween/Growl.cs
OpenTween/StatusDictionary.cs
OpenTween/Tween.cs
OpenTween/TweetThumbnail.cs
OpenTween/Twitter.cs
OpenTween/WebBrowserController.cs

index a9b9753..1639fc4 100644 (file)
@@ -48,7 +48,6 @@ namespace OpenTween
         private const string GetMethod = "GET";
 
         private IHttpConnection httpCon; //HttpConnectionApi or HttpConnectionOAuth
-        private HttpVarious httpConVar = new HttpVarious();
 
         private enum AuthMethod
         {
index d437b57..25e5e24 100644 (file)
@@ -39,7 +39,6 @@ namespace OpenTween.OpenTweenCustomControl
     public sealed class DetailsListView : ListView
     {
         private Rectangle changeBounds;
-        private EventHandlerList _handlers = new EventHandlerList();
 
         public ContextMenuStrip ColumnHeaderContextMenuStrip { get; set; }
 
index eb73ff5..f233404 100644 (file)
@@ -50,7 +50,6 @@ namespace OpenTween
         private object _growlApp;
 
         private object _targetConnector;
-        private object _targetCore;
 
         private string _appName = "";
         bool _initialized = false;
@@ -155,7 +154,6 @@ namespace OpenTween
             try
             {
                 _targetConnector = _connector.CreateInstance("Growl.Connector.GrowlConnector");
-                _targetCore = _core.CreateInstance("Growl.CoreLibrary");
                 Type _t = _connector.GetType("Growl.Connector.NotificationType");
 
                 _growlNTreply = _t.InvokeMember(null,
index e24f11a..a0e853b 100644 (file)
@@ -394,13 +394,6 @@ namespace OpenTween
         private List<long> _deletedIds = new List<long>();
         private Dictionary<long, PostClass> _retweets = new Dictionary<long, PostClass>();
         private Stack<TabClass> _removedTab = new Stack<TabClass>();
-        private List<ScrubGeoInfo> _scrubGeo = new List<ScrubGeoInfo>();
-
-        private class ScrubGeoInfo
-        {
-            public long UserId = 0;
-            public long UpToStatusId = 0;
-        }
 
         public List<long> BlockIds = new List<long>();
         public List<long> MuteUserIds = new List<long>();
index f8365cd..4016214 100644 (file)
@@ -199,7 +199,6 @@ namespace OpenTween
         private bool _waitLists = false;
         private BackgroundWorker[] _bw = new BackgroundWorker[20];
         private BackgroundWorker _bwFollower;
-        private InternetSecurityManager SecurityManager;
 
         private int UnreadCounter = -1;
         private int UnreadAtCounter = -1;
@@ -615,7 +614,7 @@ namespace OpenTween
 
             //Win32Api.SetProxy(HttpConnection.ProxyType.Specified, "127.0.0.1", 8080, "user", "pass")
 
-            SecurityManager = new InternetSecurityManager(PostBrowser);
+            new InternetSecurityManager(PostBrowser);
             this.PostBrowser.AllowWebBrowserDrop = false;  // COMException を回避するため、ActiveX の初期化が終わってから設定する
 
             MyCommon.TwitterApiInfo.AccessLimitUpdated += TwitterApiStatus_AccessLimitUpdated;
@@ -1117,8 +1116,6 @@ namespace OpenTween
 
             ApplyListViewIconSize(SettingDialog.IconSz);
 
-            tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
-
             StatusLabel.Text = Properties.Resources.Form1_LoadText1;       //画面右下の状態表示を変更
             StatusLabelUrl.Text = "";            //画面左下のリンク先URL表示部を初期化
             NameLabel.Text = "";                 //発言詳細部名前ラベル初期化
@@ -3890,7 +3887,6 @@ namespace OpenTween
             {
                 lock (_syncObject)
                 {
-                    tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
                     tw.RestrictFavCheck = SettingDialog.RestrictFavCheck;
                     tw.ReadOwnPost = SettingDialog.ReadOwnPost;
                     ShortUrl.Instance.DisableExpanding = !SettingDialog.TinyUrlResolve;
@@ -11270,7 +11266,6 @@ namespace OpenTween
                 public string id = "";
                 public bool isFollowing = false;
                 public bool isFollowed = false;
-                public bool isError = false;
                 public FriendshipInfo(string id)
                 {
                     this.id = id;
@@ -11289,7 +11284,6 @@ namespace OpenTween
                 if (!string.IsNullOrEmpty(rt))
                 {
                     if (string.IsNullOrEmpty(result)) result = rt;
-                    fInfo.isError = true;
                 }
             }
             e.Result = result;
index 39d2bb4..a4a5dd8 100644 (file)
@@ -44,8 +44,6 @@ namespace OpenTween
         public event EventHandler<ThumbnailDoubleClickEventArgs> ThumbnailDoubleClick;
         public event EventHandler<ThumbnailImageSearchEventArgs> ThumbnailImageSearchClick;
 
-        private object uiLockObj = new object();
-
         public ThumbnailInfo Thumbnail
         {
             get { return this.pictureBox[this.scrollBar.Value].Tag as ThumbnailInfo; }
index 7fa3814..ca05c69 100644 (file)
@@ -152,7 +152,6 @@ namespace OpenTween
         //プロパティからアクセスされる共通情報
         private string _uname;
 
-        private bool _tinyUrlResolve;
         private bool _restrictFavCheck;
 
         private bool _readOwnPost;
@@ -1203,14 +1202,6 @@ namespace OpenTween
             }
         }
 
-        public bool TinyUrlResolve
-        {
-            set
-            {
-                _tinyUrlResolve = value;
-            }
-        }
-
         public bool RestrictFavCheck
         {
             set
index 5295bb8..6a3506b 100644 (file)
@@ -265,12 +265,12 @@ namespace OpenTween
     public class InternetSecurityManager : WebBrowserAPI.IServiceProvider, WebBrowserAPI.IInternetSecurityManager
     {
     #region "HRESULT"
-        private class HRESULT
+        private enum HRESULT
         {
-            public static int S_OK = 0x0;
-            public static int S_FALSE = 0x1;
-            public static int E_NOTIMPL = unchecked((int)0x80004001);
-            public static int E_NOINTERFACE = unchecked((int)0x80004002);
+            S_OK = 0x0,
+            S_FALSE = 0x1,
+            E_NOTIMPL = unchecked((int)0x80004001),
+            E_NOINTERFACE = unchecked((int)0x80004002),
         }
     #endregion
 
@@ -356,7 +356,7 @@ namespace OpenTween
                 var punk = Marshal.GetIUnknownForObject(this);
                 return Marshal.QueryInterface(punk, ref riid, out ppvObject);
             }
-            return HRESULT.E_NOINTERFACE;
+            return (int)HRESULT.E_NOINTERFACE;
         }
 
         int WebBrowserAPI.IInternetSecurityManager.GetSecurityId(string pwszUrl, byte[] pbSecurityId, ref uint pcbSecurityId, uint dwReserved)
@@ -416,7 +416,7 @@ namespace OpenTween
                     pPolicy = WebBrowserAPI.URLPOLICY_DISALLOW;
                 }
                 if (Regex.IsMatch(pwszUrl, @"^https?://((api\.)?twitter\.com/|([a-zA-Z0-9]+\.)?twimg\.com/)")) pPolicy = WebBrowserAPI.URLPOLICY_ALLOW;
-                return HRESULT.S_OK;
+                return (int)HRESULT.S_OK;
             }
             // ActiveX実行状態かを検査しポリシー設定
             if (WebBrowserAPI.URLACTION_ACTIVEX_MIN <= dwAction &
@@ -431,7 +431,7 @@ namespace OpenTween
                 {
                     pPolicy = WebBrowserAPI.URLPOLICY_DISALLOW;
                 }
-                return HRESULT.S_OK;
+                return (int)HRESULT.S_OK;
             }
             //他のものについてはデフォルト処理
             return WebBrowserAPI.INET_E_DEFAULT_ACTION;