private const string GetMethod = "GET";
private IHttpConnection httpCon; //HttpConnectionApi or HttpConnectionOAuth
- private HttpVarious httpConVar = new HttpVarious();
private enum AuthMethod
{
public sealed class DetailsListView : ListView
{
private Rectangle changeBounds;
- private EventHandlerList _handlers = new EventHandlerList();
public ContextMenuStrip ColumnHeaderContextMenuStrip { get; set; }
private object _growlApp;
private object _targetConnector;
- private object _targetCore;
private string _appName = "";
bool _initialized = false;
try
{
_targetConnector = _connector.CreateInstance("Growl.Connector.GrowlConnector");
- _targetCore = _core.CreateInstance("Growl.CoreLibrary");
Type _t = _connector.GetType("Growl.Connector.NotificationType");
_growlNTreply = _t.InvokeMember(null,
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>();
private bool _waitLists = false;
private BackgroundWorker[] _bw = new BackgroundWorker[20];
private BackgroundWorker _bwFollower;
- private InternetSecurityManager SecurityManager;
private int UnreadCounter = -1;
private int UnreadAtCounter = -1;
//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;
ApplyListViewIconSize(SettingDialog.IconSz);
- tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
-
StatusLabel.Text = Properties.Resources.Form1_LoadText1; //画面右下の状態表示を変更
StatusLabelUrl.Text = ""; //画面左下のリンク先URL表示部を初期化
NameLabel.Text = ""; //発言詳細部名前ラベル初期化
{
lock (_syncObject)
{
- tw.TinyUrlResolve = SettingDialog.TinyUrlResolve;
tw.RestrictFavCheck = SettingDialog.RestrictFavCheck;
tw.ReadOwnPost = SettingDialog.ReadOwnPost;
ShortUrl.Instance.DisableExpanding = !SettingDialog.TinyUrlResolve;
public string id = "";
public bool isFollowing = false;
public bool isFollowed = false;
- public bool isError = false;
public FriendshipInfo(string id)
{
this.id = id;
if (!string.IsNullOrEmpty(rt))
{
if (string.IsNullOrEmpty(result)) result = rt;
- fInfo.isError = true;
}
}
e.Result = result;
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; }
//プロパティからアクセスされる共通情報
private string _uname;
- private bool _tinyUrlResolve;
private bool _restrictFavCheck;
private bool _readOwnPost;
}
}
- public bool TinyUrlResolve
- {
- set
- {
- _tinyUrlResolve = value;
- }
- }
-
public bool RestrictFavCheck
{
set
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
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)
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 &
{
pPolicy = WebBrowserAPI.URLPOLICY_DISALLOW;
}
- return HRESULT.S_OK;
+ return (int)HRESULT.S_OK;
}
//他のものについてはデフォルト処理
return WebBrowserAPI.INET_E_DEFAULT_ACTION;