本文整理汇总了C#中OpenTween.OpenTweenCustomControl.DetailsListView.Update方法的典型用法代码示例。如果您正苦于以下问题:C# DetailsListView.Update方法的具体用法?C# DetailsListView.Update怎么用?C# DetailsListView.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenTween.OpenTweenCustomControl.DetailsListView
的用法示例。
在下文中一共展示了DetailsListView.Update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeItemStyleRead
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 > 0)
cl = _clRetweet;
else if (Post.IsOwl && (Post.IsDm || SettingDialog.OneWayLove))
cl = _clOWL;
else if (Read || !SettingDialog.UseUnreadStyle)
cl = _clReaded;
else
cl = _clUnread;
if (DList == null || Item.Index == -1)
{
Item.ForeColor = cl;
if (SettingDialog.UseUnreadStyle)
Item.Font = fnt;
}
else
{
DList.Update();
if (SettingDialog.UseUnreadStyle)
DList.ChangeItemFontAndColor(Item.Index, cl, fnt);
else
DList.ChangeItemForeColor(Item.Index, cl);
//if (_itemCache != null) DList.RedrawItems(_itemCacheIndex, _itemCacheIndex + _itemCache.Length - 1, false);
}
}
示例2: ChangeItemStyleRead
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 > 0)
cl = _clRetweet;
else if (Post.IsOwl && (Post.IsDm || SettingDialog.OneWayLove))
cl = _clOWL;
else if (Read || !SettingDialog.UseUnreadStyle)
cl = _clReaded;
else
cl = _clUnread;
var conv = new Func<string, string>(str => Regex.Replace(str, @"[ \r\n\t]", ""));
var newp = conv(Post.TextFromApi);
if (_cfgCommon.ShowStolenTweetWithColor && !(Post.RetweetedId > 0) && _statuses._statuses.Any(_ => conv(_.Value.TextFromApi) == newp && _.Value.CreatedAt.CompareTo(Post.CreatedAt) < 0))
{
cl = _clStolen;
}
if (DList == null || Item.Index == -1)
{
Item.ForeColor = cl;
if (SettingDialog.UseUnreadStyle)
Item.Font = fnt;
}
else
{
DList.Update();
if (SettingDialog.UseUnreadStyle)
DList.ChangeItemFontAndColor(Item.Index, cl, fnt);
else
DList.ChangeItemForeColor(Item.Index, cl);
//if (_itemCache != null) DList.RedrawItems(_itemCacheIndex, _itemCacheIndex + _itemCache.Length - 1, false);
}
}