From 4e8f4ba82b1447caf5b7af3e485586676c15035e Mon Sep 17 00:00:00 2001 From: kiri_feather Date: Fri, 6 May 2011 18:40:21 +0900 Subject: [PATCH] =?utf8?q?IDN=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E8=B8=8F?= =?utf8?q?=E3=82=80=E3=81=A8=E4=BE=8B=E5=A4=96=E3=81=8C=E7=99=BA=E7=94=9F?= =?utf8?q?=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AB=E5=AF=BE=E5=87=A6?= =?utf8?q?=EF=BC=88WebBrowser=E3=82=B3=E3=83=B3=E3=83=88=E3=83=AD=E3=83=BC?= =?utf8?q?=E3=83=AB=E3=81=A7=E8=A9=B2=E5=BD=93=E3=83=9A=E3=83=BC=E3=82=B8?= =?utf8?q?=E3=82=92=E9=96=8B=E3=81=84=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86?= =?utf8?q?=E5=95=8F=E9=A1=8C=E3=81=AF=E6=9C=AA=E5=AF=BE=E5=87=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Tween/StatusDictionary.vb | 24 ++++++++++++------------ Tween/Tween.vb | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Tween/StatusDictionary.vb b/Tween/StatusDictionary.vb index f880f528..e20e3b19 100644 --- a/Tween/StatusDictionary.vb +++ b/Tween/StatusDictionary.vb @@ -845,21 +845,21 @@ Public NotInheritable Class TabInformations toIdx = 0 stp = -1 End If + + Dim posts As Dictionary(Of Long, PostClass) If Not Tab.IsInnerStorageTabType Then - For i As Integer = StartIdx To toIdx Step stp - If Not _statuses(Tab.GetId(i)).IsRead Then - Tab.OldestUnreadId = Tab.GetId(i) - Exit For - End If - Next + posts = _statuses Else - For i As Integer = StartIdx To toIdx Step stp - If Not Tab.Posts(Tab.GetId(i)).IsRead Then - Tab.OldestUnreadId = Tab.GetId(i) - Exit For - End If - Next + posts = Tab.Posts End If + + For i As Integer = StartIdx To toIdx Step stp + Dim id As Long = Tab.GetId(i) + If id > -1 AndAlso Not posts(id).IsRead Then + Tab.OldestUnreadId = id + Exit For + End If + Next End Sub Public Function DistributePosts() As Integer diff --git a/Tween/Tween.vb b/Tween/Tween.vb index 82ed73d1..06f421a1 100644 --- a/Tween/Tween.vb +++ b/Tween/Tween.vb @@ -3891,13 +3891,16 @@ Public Class TweenMain End Sub Private Sub PostBrowser_StatusTextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles PostBrowser.StatusTextChanged - If PostBrowser.StatusText.StartsWith("http") OrElse PostBrowser.StatusText.StartsWith("ftp") _ - OrElse PostBrowser.StatusText.StartsWith("data") Then - StatusLabelUrl.Text = PostBrowser.StatusText.Replace("&", "&&") - End If - If PostBrowser.StatusText = "" Then - SetStatusLabelUrl() - End If + Try + If PostBrowser.StatusText.StartsWith("http") OrElse PostBrowser.StatusText.StartsWith("ftp") _ + OrElse PostBrowser.StatusText.StartsWith("data") Then + StatusLabelUrl.Text = PostBrowser.StatusText.Replace("&", "&&") + End If + If PostBrowser.StatusText = "" Then + SetStatusLabelUrl() + End If + Catch ex As Exception + End Try End Sub Private Sub StatusText_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles StatusText.KeyPress @@ -4893,6 +4896,8 @@ RETRY: End If Catch ex As System.Runtime.InteropServices.COMException '原因不明 + Catch ex As UriFormatException + PostBrowser.DocumentText = dTxt Finally PostBrowser.Visible = True End Try -- 2.11.0