Me.sortedKeyList.Add(key)
If Me.sortedKeyList.Count > Me.memoryCacheCount Then
Dim imgObj As CachedImage = Me.innerDictionary(Me.sortedKeyList(Me.sortedKeyList.Count - Me.memoryCacheCount - 1))
- Me.fileCacheProcList.Enqueue(Sub()
- If Me.innerDictionary.ContainsValue(imgObj) Then
- imgObj.Chache()
- End If
- End Sub)
+ If Not imgObj.Cached Then
+ Me.fileCacheProcList.Enqueue(Sub()
+ If Me.innerDictionary.ContainsValue(imgObj) Then
+ imgObj.Chache()
+ End If
+ End Sub)
+ End If
End If
Return Me.innerDictionary(key).Image
End SyncLock
End SyncLock
End Sub
+ Public ReadOnly Property Cached As Boolean
+ Get
+ SyncLock Me
+ Return Me.tmpFilePath IsNot Nothing
+ End SyncLock
+ End Get
+ End Property
+
Public Sub Dispose() Implements IDisposable.Dispose
SyncLock Me
If Me.img IsNot Nothing Then
If Post.IsMark Then mk += "♪"
If Post.IsProtect Then mk += "Ю"
If Post.InReplyToId > 0 Then mk += "⇒"
- Dim itm As ListViewItem
+ Dim itm As ImageListViewItem
If Post.RetweetedId = 0 Then
Dim sitem() As String = {"", Post.Nickname, Post.Data, Post.PDate.ToString(SettingDialog.DateTimeFormat), Post.Name, "", mk, Post.Source}
- itm = New ListViewItem(sitem, Post.ImageUrl)
+ itm = New ImageListViewItem(sitem, Post.ImageUrl)
Else
Dim sitem() As String = {"", Post.Nickname, Post.Data, Post.PDate.ToString(SettingDialog.DateTimeFormat), Post.Name + "(RT:" + Post.RetweetedBy + ")", "", mk, Post.Source}
- itm = New ListViewItem(sitem, Post.ImageUrl)
+ itm = New ImageListViewItem(sitem, Post.ImageUrl)
+ End If
+
+ If tw.DetailIcon.ContainsKey(Post.ImageUrl) Then
+ itm.Image = tw.DetailIcon(Post.ImageUrl)
End If
+
Dim read As Boolean = Post.IsRead
'未読管理していなかったら既読として扱う
If Not _statuses.Tabs(Tab.Text).UnreadManage OrElse _
End If
Next
- If TIconDic.ContainsKey(e.Item.ImageKey) Then
+ Dim item As ImageListViewItem = DirectCast(e.Item, ImageListViewItem)
+
+ If item.Image IsNot Nothing Then
e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.High
- e.Graphics.DrawImage(tw.DetailIcon(e.Item.ImageKey), New Rectangle(x, e.Bounds.Top, Math.Min(_iconSz, e.Item.ListView.Columns(0).Width), _iconSz))
+ e.Graphics.DrawImage(item.Image, New Rectangle(x, e.Bounds.Top, Math.Min(_iconSz, e.Item.ListView.Columns(0).Width), _iconSz))
End If
End Sub