private void ChangeItemStyleRead(bool Read, ListViewItem Item, PostClass Post, DetailsListView DList)
{
Font fnt;
//フォント
if (Read)
{
fnt = _fntReaded;
Item.SubItems[5].Text = "";
}
else
{
fnt = _fntUnread;
Item.SubItems[5].Text = "★";
}
//文字色
Color cl;
if (Post.IsFav)
cl = _clFav;
else if (Post.RetweetedId != null)
cl = _clRetweet;
else if (Post.IsOwl && (Post.IsDm || this._cfgCommon.OneWayLove))
cl = _clOWL;
else if (Read || !this._cfgCommon.UseUnreadStyle)
cl = _clReaded;
else
cl = _clUnread;
if (DList == null || Item.Index == -1)
{
Item.ForeColor = cl;
if (this._cfgCommon.UseUnreadStyle)
Item.Font = fnt;
}
else
{
DList.Update();
if (this._cfgCommon.UseUnreadStyle)
DList.ChangeItemFontAndColor(Item.Index, cl, fnt);
else
DList.ChangeItemForeColor(Item.Index, cl);
//if (_itemCache != null) DList.RedrawItems(_itemCacheIndex, _itemCacheIndex + _itemCache.Length - 1, false);
}
}