{
public partial class AtIdSupplement : OTBaseForm
{
+ public string StartsWith { get; set; } = "";
+
public string inputText = "";
public bool isBack = false;
private string startChar = "";
- // private bool tabkeyFix = false;
-
- private string _StartsWith = "";
public void AddItem(string id)
{
private void AtIdSupplement_Shown(object sender, EventArgs e) /*Handles this.Shown*/
{
TextId.Text = startChar;
- if (!string.IsNullOrEmpty(_StartsWith))
+ if (!string.IsNullOrEmpty(this.StartsWith))
{
- TextId.Text += _StartsWith.Substring(0, _StartsWith.Length);
+ TextId.Text += this.StartsWith.Substring(0, this.StartsWith.Length);
}
TextId.SelectionStart = TextId.Text.Length;
TextId.Focus();
}
}
- public string StartsWith
- {
- get
- {
- return _StartsWith;
- }
- set
- {
- _StartsWith = value;
- }
- }
-
private void AtIdSupplement_FormClosed(object sender, FormClosedEventArgs e) /*Handles MyBase.FormClosed*/
{
- _StartsWith = "";
+ this.StartsWith = "";
if (isBack)
{
this.DialogResult = DialogResult.Cancel;
/// <summary>
/// 通信に使用するプロキシの種類
/// </summary>
- public static ProxyType ProxyType
- {
- get { return proxyType; }
- }
+ public static ProxyType ProxyType { get; private set; } = ProxyType.IE;
/// <summary>
/// 通信に使用するプロキシ
/// </summary>
- public static IWebProxy Proxy
- {
- get { return proxy; }
- }
+ public static IWebProxy Proxy { get; private set; } = null;
/// <summary>
/// OpenTween 内で共通して使用する HttpClient インスタンス
private static bool initialized = false;
private static HttpClient globalHttpClient;
- private static ProxyType proxyType = ProxyType.IE;
- private static IWebProxy proxy = null;
private static bool forceIPv4 = false;
[SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")]
break;
}
- Networking.proxyType = proxyType;
- Networking.proxy = proxy;
+ Networking.ProxyType = proxyType;
+ Networking.Proxy = proxy;
NativeMethods.SetProxy(proxyType, proxyAddress, proxyPort, proxyUser, proxyPassword);
private object _growlApp;
private object _targetConnector;
-
- private string _appName = "";
bool _initialized = false;
public class NotifyCallbackEventArgs : EventArgs
public event EventHandler<NotifyCallbackEventArgs> NotifyClicked;
- public string AppName
- {
- get { return _appName; }
- }
+ public string AppName { get; }
public enum NotifyType
{
}
public GrowlHelper(string appName)
- {
- _appName = appName;
- }
+ => this.AppName = appName;
public bool IsAvailable
{
_targetConnector.GetType().InvokeMember("EncryptionAlgorithm", BindingFlags.SetProperty, null, _targetConnector, new object[] { encryptType }, CultureInfo.InvariantCulture);
_growlApp = _connector.CreateInstance(
- "Growl.Connector.Application", false, BindingFlags.Default, null, new object[] { _appName }, null, null);
+ "Growl.Connector.Application", false, BindingFlags.Default, null, new object[] { AppName }, null, null);
if (File.Exists(Path.Combine(Application.StartupPath, "Icons\\Tween.png")))
BindingFlags.CreateInstance,
null,
_connector,
- new object[] {_appName,
+ new object[] {AppName,
notificationName,
id,
title,
BindingFlags.CreateInstance,
null,
_connector,
- new object[] {_appName,
+ new object[] {AppName,
notificationName,
id,
title,
{
public partial class HashtagManage : OTBaseForm
{
+ public string UseHash { get; private set; } = "";
+ public bool IsPermanent { get; private set; } = false;
+ public bool IsHead { get; private set; } = false;
+ public bool IsNotAddToAtReply { get; private set; } = true;
+
/// <summary>
/// エラー時にダイアログを表示させない (ユニットテストなどで使用)
/// </summary>
//入力補助画面
private AtIdSupplement _hashSupl;
- //I/F用
- private string _useHash = "";
- private bool _isPermanent = false;
- private bool _isHead = false;
- private bool _isNotAddToAtReply = true;
+
//編集モード
private bool _isAdd = false;
hash = hash.Trim();
if (!string.IsNullOrEmpty(hash))
{
- if (isIgnorePermanent || !_isPermanent)
+ if (isIgnorePermanent || !this.IsPermanent)
{
//無条件に先頭に挿入
int idx = GetIndexOf(HistoryHashList.Items, hash);
{
//固定されていたら2行目に挿入
int idx = GetIndexOf(HistoryHashList.Items, hash);
- if (_isPermanent)
+ if (this.IsPermanent)
{
if (idx > 0)
{
private void HashtagManage_Shown(object sender, EventArgs e)
{
//オプション
- this.CheckPermanent.Checked = this._isPermanent;
- this.RadioHead.Checked = this._isHead;
- this.RadioLast.Checked = !this._isHead;
+ this.CheckPermanent.Checked = this.IsPermanent;
+ this.RadioHead.Checked = this.IsHead;
+ this.RadioLast.Checked = !this.IsHead;
//リスト選択
- if (this.HistoryHashList.Items.Contains(this._useHash))
+ if (this.HistoryHashList.Items.Contains(this.UseHash))
{
- this.HistoryHashList.SelectedItem = this._useHash;
+ this.HistoryHashList.SelectedItem = this.UseHash;
}
else
{
_hashSupl = hashSuplForm;
HistoryHashList.Items.AddRange(history);
- _useHash = permanentHash;
- _isPermanent = IsPermanent;
- _isHead = IsHead;
- _isNotAddToAtReply = IsNotAddToAtReply;
+ this.UseHash = permanentHash;
+ this.IsPermanent = IsPermanent;
+ this.IsHead = IsHead;
+ this.IsNotAddToAtReply = IsNotAddToAtReply;
}
private void UseHashText_KeyPress(object sender, KeyPressEventArgs e)
public void ToggleHash()
{
- if (string.IsNullOrEmpty(this._useHash))
+ if (string.IsNullOrEmpty(this.UseHash))
{
if (this.HistoryHashList.Items.Count > 0)
- this._useHash = this.HistoryHashList.Items[0].ToString();
+ this.UseHash = this.HistoryHashList.Items[0].ToString();
}
else
{
- this._useHash = "";
+ this.UseHash = "";
}
}
}
}
- public string UseHash
- {
- get { return _useHash; }
- }
-
public void ClearHashtag()
{
- this._useHash = "";
+ this.UseHash = "";
}
public void SetPermanentHash(string hash)
{
//固定ハッシュタグの変更
- _useHash = hash.Trim();
- this.AddHashToHistory(_useHash, false);
- this._isPermanent = true;
- }
-
- public bool IsPermanent
- {
- get { return _isPermanent; }
- }
-
- public bool IsHead
- {
- get { return _isHead; }
- }
-
- public bool IsNotAddToAtReply
- {
- get { return _isNotAddToAtReply; }
+ this.UseHash = hash.Trim();
+ this.AddHashToHistory(UseHash, false);
+ this.IsPermanent = true;
}
private void PermOK_Button_Click(object sender, EventArgs e)
if (!string.IsNullOrEmpty(hash))
{
this.AddHashToHistory(hash, true);
- this._isPermanent = this.CheckPermanent.Checked;
+ this.IsPermanent = this.CheckPermanent.Checked;
}
else
{
//使用ハッシュが未選択ならば、固定オプション外す
- this._isPermanent = false;
+ this.IsPermanent = false;
}
- this._isHead = this.RadioHead.Checked;
- this._useHash = hash;
+ this.IsHead = this.RadioHead.Checked;
+ this.UseHash = hash;
this.DialogResult = DialogResult.OK;
this.Close();
private void CheckNotAddToAtReply_CheckedChanged(object sender, EventArgs e)
{
- _isNotAddToAtReply = CheckNotAddToAtReply.Checked;
+ this.IsNotAddToAtReply = CheckNotAddToAtReply.Checked;
}
}
}
private Form _targetForm;
private class KeyEventValue
{
- KeyEventArgs _keyEvent;
- int _value;
+ public KeyEventArgs KeyEvent { get; }
+ public int Value { get; }
public KeyEventValue(KeyEventArgs keyEvent, int Value)
{
- _keyEvent = keyEvent;
- _value = Value;
- }
-
- public KeyEventArgs KeyEvent
- {
- get
- {
- return _keyEvent;
- }
- }
- public int Value
- {
- get
- {
- return _value;
- }
+ this.KeyEvent = keyEvent;
+ this.Value = Value;
}
}
{
public partial class ListAvailable : OTBaseForm
{
- private ListElement _selectedList = null;
- public ListElement SelectedList
- {
- get
- {
- return _selectedList;
- }
- }
+ public ListElement SelectedList { get; private set; }
public ListAvailable()
{
private void OK_Button_Click(object sender, EventArgs e)
{
if (this.ListsList.SelectedIndex > -1) {
- _selectedList = (ListElement)this.ListsList.SelectedItem;
+ this.SelectedList = (ListElement)this.ListsList.SelectedItem;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.Close();
}
private void Cancel_Button_Click(object sender, EventArgs e)
{
- _selectedList = null;
+ this.SelectedList = null;
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
}
protected Twitter _tw;
private List<UserInfo> _members = null;
- private long _cursor = -1;
+
+ [XmlIgnore]
+ public long Cursor { get; private set; } = -1;
public ListElement()
{
}
}
- [XmlIgnore]
- public long Cursor
- {
- get
- {
- return _cursor;
- }
- }
-
public async Task RefreshMembers()
{
var users = new List<UserInfo>();
- this._cursor = await this._tw.GetListMembers(this.Id, users, cursor: -1)
+ this.Cursor = await this._tw.GetListMembers(this.Id, users, cursor: -1)
.ConfigureAwait(false);
this._members = users;
}
public async Task GetMoreMembers()
{
- this._cursor = await this._tw.GetListMembers(this.Id, this._members, this._cursor)
+ this.Cursor = await this._tw.GetListMembers(this.Id, this._members, this.Cursor)
.ConfigureAwait(false);
}
private class NewListElement : ListElement
{
- private bool _isCreated = false;
+ public bool IsCreated { get; private set; } = false;
public NewListElement(Twitter tw)
{
await this._tw.CreateListApi(this.Name, !this.IsPublic, this.Description)
.ConfigureAwait(false);
- this._isCreated = true;
+ this.IsCreated = true;
}
}
- public bool IsCreated
- {
- get { return this._isCreated; }
- }
-
public override string ToString()
{
if (IsCreated)
{
public const string PathPrefix = "<>MemoryImage://";
private static int _fileNumber = 0;
-
- private bool _disposed = false;
-
private readonly MemoryImage _image;
+ public bool IsDisposed { get; private set; } = false;
+
public MemoryImageMediaItem(MemoryImage image)
{
this._image = image ?? throw new ArgumentNullException(nameof(image));
get { return true; }
}
- public bool IsDisposed
- {
- get { return this._disposed; }
- }
-
public MemoryImage CreateImage()
{
return this._image.Clone();
protected virtual void Dispose(bool disposing)
{
- if (this._disposed) return;
+ if (this.IsDisposed) return;
if (disposing)
{
this._image.Dispose();
}
- this._disposed = true;
+ this.IsDisposed = true;
}
public void Dispose()
/// </remarks>
public class MemoryImage : ICloneable, IDisposable, IEquatable<MemoryImage>
{
- private readonly MemoryStream stream;
private readonly Image image;
- protected bool disposed = false;
-
/// <exception cref="InvalidImageException">
/// ストリームから読みだされる画像データが不正な場合にスローされる
/// </exception>
throw;
}
- this.stream = stream;
+ this.Stream = stream;
}
/// <summary>
/// <summary>
/// MemoryImage が保持している画像のストリーム
/// </summary>
- public MemoryStream Stream
- {
- // MemoryStream は破棄されていても一部のメソッドが使用可能なためここでは例外を投げない
- get { return this.stream; }
- }
+ public MemoryStream Stream { get; }
/// <summary>
/// MemoryImage が破棄されているか否か
/// </summary>
- public bool IsDisposed
- {
- get { return this.disposed; }
- }
+ public bool IsDisposed { get; private set; } = false;
/// <summary>
/// MemoryImage が保持している画像のフォーマット
protected virtual void Dispose(bool disposing)
{
- if (this.disposed) return;
+ if (this.IsDisposed) return;
if (disposing)
{
this.Stream.Dispose();
}
- this.disposed = true;
+ this.IsDisposed = true;
}
public void Dispose()
public sealed class TabInformations
{
//個別タブの情報をDictionaryで保持
- private Dictionary<string, TabModel> _tabs = new Dictionary<string, TabModel>();
- private ConcurrentDictionary<long, PostClass> _statuses = new ConcurrentDictionary<long, PostClass>();
+ public Dictionary<string, TabModel> Tabs { get; } = new Dictionary<string, TabModel>();
+ public ConcurrentDictionary<long, PostClass> Posts { get; } = new ConcurrentDictionary<long, PostClass>();
+
private Dictionary<long, PostClass> _quotes = new Dictionary<long, PostClass>();
- private Stack<TabModel> _removedTab = new Stack<TabModel>();
private ConcurrentDictionary<long, int> retweetsCount = new ConcurrentDictionary<long, int>();
- public ISet<long> BlockIds = new HashSet<long>();
- public ISet<long> MuteUserIds = new HashSet<long>();
+ public Stack<TabModel> RemovedTab { get; } = new Stack<TabModel>();
+
+ public ISet<long> BlockIds { get; set; } = new HashSet<long>();
+ public ISet<long> MuteUserIds { get; set; } = new HashSet<long>();
//発言の追加
//AddPost(複数回) -> DistributePosts -> SubmitUpdate
{
lock (this.LockObj)
{
- if (this._tabs.ContainsKey(tab.TabName))
+ if (this.Tabs.ContainsKey(tab.TabName))
return false;
- this._tabs.Add(tab.TabName, tab);
+ this.Tabs.Add(tab.TabName, tab);
tab.SetSortMode(this.SortMode, this.SortOrder);
return true;
var exist = false;
var Id = tb.GetStatusIdAt(idx);
if (Id < 0) continue;
- foreach (var tab in _tabs.Values)
+ foreach (var tab in this.Tabs.Values)
{
if (tab != tb && tab != dmTab)
{
}
}
}
- if (!exist) homeTab.AddPostImmediately(Id, _statuses[Id].IsRead);
+ if (!exist) homeTab.AddPostImmediately(Id, this.Posts[Id].IsRead);
}
}
- _removedTab.Push(tb);
- _tabs.Remove(TabName);
+ this.RemovedTab.Push(tb);
+ this.Tabs.Remove(TabName);
}
}
- public Stack<TabModel> RemovedTab
- {
- get { return _removedTab; }
- }
-
public bool ContainsTab(string TabText)
{
- return _tabs.ContainsKey(TabText);
+ return this.Tabs.ContainsKey(TabText);
}
public bool ContainsTab(TabModel ts)
{
- return _tabs.ContainsValue(ts);
+ return this.Tabs.ContainsValue(ts);
}
/// <summary>
throw new TabException(message);
}
- public Dictionary<string, TabModel> Tabs
- {
- get
- {
- return _tabs;
- }
- set
- {
- _tabs = value;
- }
- }
-
public Dictionary<string, TabModel>.KeyCollection KeysTab
{
get
{
- return _tabs.Keys;
+ return this.Tabs.Keys;
}
}
this.SortMode = mode;
this.SortOrder = sortOrder;
- foreach (var tab in this._tabs.Values)
+ foreach (var tab in this.Tabs.Values)
tab.SetSortMode(mode, sortOrder);
}
// }
public PostClass RetweetSource(long Id)
{
- return this._statuses.TryGetValue(Id, out var status)
+ return this.Posts.TryGetValue(Id, out var status)
? status
: null;
}
{
lock (LockObj)
{
- var userPosts = from post in this._statuses.Values
+ var userPosts = from post in this.Posts.Values
where post.UserId == userId && post.UserId <= upToStatusId
select post;
if (setIsDeleted)
{
- if (this._statuses.TryGetValue(statusId, out var post))
+ if (this.Posts.TryGetValue(statusId, out var post))
post.IsDeleted = true;
}
}
var currentNotifyPriority = -1;
- foreach (var tab in this._tabs.Values)
+ foreach (var tab in this.Tabs.Values)
{
// 振分確定 (各タブに反映)
var addedIds = tab.AddSubmit();
// 全てのタブから表示されなくなった発言は this._statuses からも削除する
if (orphaned)
- this._statuses.TryRemove(removedId, out var removedPost);
+ this.Posts.TryRemove(removedId, out var removedPost);
}
return addedCountTotal;
while (this.addQueue.TryDequeue(out var statusId))
{
- if (!this._statuses.TryGetValue(statusId, out var post))
+ if (!this.Posts.TryGetValue(statusId, out var post))
continue;
var filterHit = false; // フィルタにヒットしたタブがあるか
if (this.IsMuted(Item, isHomeTimeline: true))
return;
- if (_statuses.TryGetValue(Item.StatusId, out var status))
+ if (Posts.TryGetValue(Item.StatusId, out var status))
{
if (Item.IsFav)
{
if (BlockIds.Contains(Item.UserId))
return;
- _statuses.TryAdd(Item.StatusId, Item);
+ Posts.TryAdd(Item.StatusId, Item);
}
if (Item.IsFav && this.retweetsCount.ContainsKey(Item.StatusId))
{
{
lock (LockObj)
{
- foreach (var tab in this._tabs.Values)
+ foreach (var tab in this.Tabs.Values)
{
if (!tab.Contains(statusId))
continue;
{
get
{
- if (this._statuses.TryGetValue(ID, out var status))
+ if (this.Posts.TryGetValue(ID, out var status))
return status;
if (this._quotes.TryGetValue(ID, out status))
//DM,公式検索は非対応
lock (LockObj)
{
- return _statuses.ContainsKey(Id);
+ return Posts.ContainsKey(Id);
}
}
{
lock (this.LockObj)
{
- var tb = _tabs[Original];
- _tabs.Remove(Original);
+ var tb = this.Tabs[Original];
+ this.Tabs.Remove(Original);
tb.TabName = NewName;
- _tabs.Add(NewName, tb);
+ this.Tabs.Add(NewName, tb);
}
}
var homeTab = GetTabByType(MyCommon.TabUsageType.Home);
var detachedIdsAll = Enumerable.Empty<long>();
- foreach (var tab in _tabs.Values.OfType<FilterTabModel>().ToArray())
+ foreach (var tab in this.Tabs.Values.OfType<FilterTabModel>().ToArray())
{
if (tab.TabType == MyCommon.TabUsageType.Mute)
continue;
var orgIds = tab.StatusIds;
tab.ClearIDs();
- foreach (var post in _statuses.Values)
+ foreach (var post in Posts.Values)
{
var filterHit = false; // フィルタにヒットしたタブがあるか
var mark = false; // フィルタによってマーク付けされたか
foreach (var id in detachedIdsAll)
{
var hit = false;
- foreach (var tbTemp in _tabs.Values.ToArray())
+ foreach (var tbTemp in this.Tabs.Values.ToArray())
{
if (!tbTemp.IsDistributableTabType)
continue;
if (!hit)
{
- if (this._statuses.TryGetValue(id, out var post))
+ if (this.Posts.TryGetValue(id, out var post))
homeTab.AddPostImmediately(post.StatusId, post.IsRead);
}
}
//不要なPostを削除
lock (LockObj)
{
- var tb = _tabs[TabName];
+ var tb = this.Tabs[TabName];
if (!tb.IsInnerStorageTabType)
{
foreach (var Id in tb.StatusIds)
{
var Hit = false;
- foreach (var tab in _tabs.Values)
+ foreach (var tab in this.Tabs.Values)
{
if (tab.Contains(Id))
{
}
}
if (!Hit)
- _statuses.TryRemove(Id, out var removedPost);
+ Posts.TryRemove(Id, out var removedPost);
}
}
{
if (follower.Count > 0)
{
- foreach (var post in _statuses.Values)
+ foreach (var post in Posts.Values)
{
//if (post.UserId = 0 || post.IsDm) Continue For
if (post.IsMe)
}
else
{
- foreach (var post in _statuses.Values)
+ foreach (var post in Posts.Values)
{
post.IsOwl = false;
}
//合致しなければnullを返す
lock (LockObj)
{
- return this._tabs.Values
+ return this.Tabs.Values
.FirstOrDefault(x => x.TabType.HasFlag(tabType));
}
}
public T GetTabByType<T>() where T : TabModel
{
lock (this.LockObj)
- return this._tabs.Values.OfType<T>().FirstOrDefault();
+ return this.Tabs.Values.OfType<T>().FirstOrDefault();
}
public TabModel[] GetTabsByType(MyCommon.TabUsageType tabType)
{
lock (LockObj)
{
- return this._tabs.Values
+ return this.Tabs.Values
.Where(x => x.TabType.HasFlag(tabType))
.ToArray();
}
public T[] GetTabsByType<T>() where T : TabModel
{
lock (this.LockObj)
- return this._tabs.Values.OfType<T>().ToArray();
+ return this.Tabs.Values.OfType<T>().ToArray();
}
public TabModel[] GetTabsInnerStorageType()
{
lock (LockObj)
{
- return this._tabs.Values
+ return this.Tabs.Values
.Where(x => x.IsInnerStorageTabType)
.ToArray();
}
{
lock (LockObj)
{
- return _tabs.TryGetValue(tabName, out var tab)
+ return this.Tabs.TryGetValue(tabName, out var tab)
? tab
: null;
}
}
-
- public ConcurrentDictionary<long, PostClass> Posts
- => this._statuses;
}
}
/// </summary>
public class ShortcutCommand
{
- private Keys[] shortcuts;
- private FocusedControl focusedOn;
- private FocusedControl notFocusedOn;
private Func<bool> onlyWhen;
private Func<Task> command;
- private bool preventDefault;
/// <summary>
/// ショートカットキーが動作する条件となるキー入力
/// </summary>
- public Keys[] Shortcuts
- {
- get { return this.shortcuts; }
- }
+ public Keys[] Shortcuts { get; private set; }
/// <summary>
/// ショートカットキーが動作する条件となるフォーカス状態
/// </summary>
- public FocusedControl FocusedOn
- {
- get { return this.focusedOn; }
- }
+ public FocusedControl FocusedOn { get; private set; }
/// <summary>
/// ショートカットキーが動作する否定条件となるフォーカス状態
/// </summary>
- public FocusedControl NotFocusedOn
- {
- get { return this.notFocusedOn; }
- }
+ public FocusedControl NotFocusedOn { get; private set; }
/// <summary>
/// コマンドを実行した後、コントロール既定の動作を無効化するか否か (デフォルトは true)
/// </summary>
- public bool PreventDefault
- {
- get { return this.preventDefault; }
- }
+ public bool PreventDefault { get; private set; }
private ShortcutCommand()
{
- this.shortcuts = new Keys[0];
+ this.Shortcuts = new Keys[0];
this.command = () => Task.FromResult(0);
this.onlyWhen = () => true;
- this.focusedOn = FocusedControl.None;
- this.notFocusedOn = FocusedControl.None;
- this.preventDefault = true;
+ this.FocusedOn = FocusedControl.None;
+ this.NotFocusedOn = FocusedControl.None;
+ this.PreventDefault = true;
}
/// <summary>
/// </summary>
public Builder Keys(params Keys[] shortcuts)
{
- this.instance.shortcuts = shortcuts;
+ this.instance.Shortcuts = shortcuts;
return this;
}
/// </summary>
public Builder FocusedOn(FocusedControl focusedOn)
{
- this.instance.focusedOn = focusedOn;
+ this.instance.FocusedOn = focusedOn;
return this;
}
/// </summary>
public Builder NotFocusedOn(FocusedControl notFocusedOn)
{
- this.instance.notFocusedOn = notFocusedOn;
+ this.instance.NotFocusedOn = notFocusedOn;
return this;
}
public ShortcutCommand Do(Func<Task> action, bool preventDefault = true)
{
this.instance.command = action;
- this.instance.preventDefault = preventDefault;
+ this.instance.PreventDefault = preventDefault;
return this.instance;
}
public TwitterConfiguration Configuration { get; private set; }
public TwitterTextConfiguration TextConfiguration { get; private set; }
+ public bool GetFollowersSuccess { get; private set; } = false;
+ public bool GetNoRetweetSuccess { get; private set; } = false;
+
delegate void GetIconImageDelegate(PostClass post);
private readonly object LockObj = new object();
private ISet<long> followerId = new HashSet<long>();
- private bool _GetFollowerResult = false;
private long[] noRTId = new long[0];
- private bool _GetNoRetweetResult = false;
//プロパティからアクセスされる共通情報
private string _uname;
-
- private bool _readOwnPost;
private List<string> _hashList = new List<string>();
//max_idで古い発言を取得するために保持(lists分は個別タブで管理)
post.IsRead = read;
post.IsOwl = false;
- if (_readOwnPost) post.IsRead = true;
+ if (this.ReadOwnPost) post.IsRead = true;
post.IsDm = false;
TabInformations.GetInstance().AddPost(post);
public long UserId
=> this.Api.CurrentUserId;
- private static MyCommon.ACCOUNT_STATE _accountState = MyCommon.ACCOUNT_STATE.Valid;
- public static MyCommon.ACCOUNT_STATE AccountState
- {
- get
- {
- return _accountState;
- }
- set
- {
- _accountState = value;
- }
- }
-
+ public static MyCommon.ACCOUNT_STATE AccountState { get; set; } = MyCommon.ACCOUNT_STATE.Valid;
public bool RestrictFavCheck { get; set; }
-
- public bool ReadOwnPost
- {
- get
- {
- return _readOwnPost;
- }
- set
- {
- _readOwnPost = value;
- }
- }
+ public bool ReadOwnPost { get; set; }
public int FollowersCount { get; private set; }
public int FriendsCount { get; private set; }
var item = CreatePostsFromStatusData(status);
item.IsRead = read;
- if (item.IsMe && !read && _readOwnPost) item.IsRead = true;
+ if (item.IsMe && !read && this.ReadOwnPost) item.IsRead = true;
return item;
}
var post = CreatePostsFromStatusData(status);
post.IsRead = read;
- if (post.IsMe && !read && _readOwnPost) post.IsRead = true;
+ if (post.IsMe && !read && this.ReadOwnPost) post.IsRead = true;
if (tab != null && tab.IsInnerStorageTabType)
tab.AddPostQueue(post);
var post = CreatePostsFromStatusData(status);
post.IsRead = read;
- if ((post.IsMe && !read) && this._readOwnPost) post.IsRead = true;
+ if ((post.IsMe && !read) && this.ReadOwnPost) post.IsRead = true;
tab.AddPostQueue(post);
}
relPosts.Values.ToList().ForEach(p =>
{
- if (p.IsMe && !read && this._readOwnPost)
+ if (p.IsMe && !read && this.ReadOwnPost)
p.IsRead = true;
else
p.IsRead = read;
}
post.IsRead = read;
- if (post.IsMe && !read && _readOwnPost) post.IsRead = true;
+ if (post.IsMe && !read && this.ReadOwnPost) post.IsRead = true;
post.IsReply = false;
post.IsExcludeReply = false;
post.IsDm = true;
this.followerId = newFollowerIds;
TabInformations.GetInstance().RefreshOwl(this.followerId);
- this._GetFollowerResult = true;
- }
-
- public bool GetFollowersSuccess
- {
- get
- {
- return _GetFollowerResult;
- }
+ this.GetFollowersSuccess = true;
}
/// <summary>
this.noRTId = await this.Api.NoRetweetIds()
.ConfigureAwait(false);
- this._GetNoRetweetResult = true;
- }
-
- public bool GetNoRetweetSuccess
- {
- get
- {
- return _GetNoRetweetResult;
- }
+ this.GetNoRetweetSuccess = true;
}
/// <summary>
#region "UserStream"
- private string trackWord_ = "";
- public string TrackWord
- {
- get
- {
- return trackWord_;
- }
- set
- {
- trackWord_ = value;
- }
- }
- private bool allAtReply_ = false;
- public bool AllAtReply
- {
- get
- {
- return allAtReply_;
- }
- set
- {
- allAtReply_ = value;
- }
- }
+ public string TrackWord { get; set; } = "";
+ public bool AllAtReply { get; set; } = false;
public event EventHandler NewPostFromStream;
public event EventHandler UserStreamStarted;
public bool IsMe { get; set; }
}
- public List<FormattedEvent> storedEvent_ = new List<FormattedEvent>();
- public List<FormattedEvent> StoredEvent
- {
- get
- {
- return storedEvent_;
- }
- set
- {
- storedEvent_ = value;
- }
- }
+ public List<FormattedEvent> StoredEvent { get; } = new List<FormattedEvent>();
private readonly IReadOnlyDictionary<string, MyCommon.EVENTTYPE> eventTable = new Dictionary<string, MyCommon.EVENTTYPE>
{
private IntPtr profferServicePtr = new IntPtr();
private WebBrowserAPI.IProfferService profferService;
- private POLICY _Policy = 0; // DefaultですべてDisAllow
+ public POLICY SecurityPolicy { get; set; } = 0;
public InternetSecurityManager(WebBrowser _WebBrowser)
{
dwAction <= WebBrowserAPI.URLACTION_SCRIPT_MAX)
{
// スクリプト実行状態
- if ((_Policy & POLICY.ALLOW_SCRIPT) == POLICY.ALLOW_SCRIPT)
+ if ((this.SecurityPolicy & POLICY.ALLOW_SCRIPT) == POLICY.ALLOW_SCRIPT)
{
pPolicy = WebBrowserAPI.URLPOLICY_ALLOW;
}
dwAction <= WebBrowserAPI.URLACTION_ACTIVEX_MAX)
{
// ActiveX実行状態
- if ((_Policy & POLICY.ALLOW_ACTIVEX) == POLICY.ALLOW_ACTIVEX)
+ if ((this.SecurityPolicy & POLICY.ALLOW_ACTIVEX) == POLICY.ALLOW_ACTIVEX)
{
pPolicy = WebBrowserAPI.URLPOLICY_ALLOW;
}
{
return WebBrowserAPI.INET_E_DEFAULT_ACTION;
}
-
-
- public POLICY SecurityPolicy
- {
- get
- {
- return _Policy;
- }
- set
- {
- _Policy = value;
- }
- }
}
}