OSDN Git Service

Webリンクでのツールチップ表示
authorsyo68k <syo68k@users.sourceforge.jp>
Mon, 10 May 2010 15:19:43 +0000 (15:19 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:12:13 +0000 (23:12 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@284 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Resources/ChangeLog.txt
Tween/ShowUserInfo.Designer.vb
Tween/ShowUserInfo.resx
Tween/ShowUserInfo.vb
Tween/Twitter.vb

index 41f35f3..070f008 100644 (file)
@@ -4,6 +4,7 @@
  * Alt+Shift+R,Ctrl+Qが効かない場合があったバグを修正
  * Replyタブの初期設定での更新間隔を180秒に。バージョンアップの方は手動で調整してください。
  * ユーザー情報ダイアログで自己紹介の部分をhtml化して表示するようにした。サムネイルと右クリックメニュー以外は、@IDやハッシュタグのリンク化など、詳細表示とほぼ同等の機能があります。
+ * ユーザー情報ダイアログでクリックしてジャンプできる場所はツールチップでジャンプ先URLを表示するようにした
 ==== Ver 0.8.9.2(2010/05/09)
  * 言及先の抽出ができていなかったバグを修正
  * ユーザー情報ダイアログで、アイコンの元画像サイズを考慮していなかったのを修正
index f15ce26..d7066a2 100644 (file)
@@ -203,6 +203,10 @@ Partial Class ShowUserInfo
         resources.ApplyResources(Me.LabelScreenName, "LabelScreenName")
         Me.LabelScreenName.Name = "LabelScreenName"
         '
+        'ToolTip1
+        '
+        Me.ToolTip1.ShowAlways = True
+        '
         'DescriptionBrowser
         '
         Me.DescriptionBrowser.AllowWebBrowserDrop = False
index 5c74a74..a0c6116 100644 (file)
   <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
     <value>425, 524</value>
   </data>
-  <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>NoControl</value>
-  </data>
   <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
     <value>CenterParent</value>
   </data>
index f71618a..6072595 100644 (file)
@@ -23,6 +23,7 @@
 
 Imports System.Xml
 Imports System.Web
+Imports System.Text.RegularExpressions
 
 Public Class ShowUserInfo
 
@@ -30,7 +31,8 @@ Public Class ShowUserInfo
     Private _info As UserInfo
     Private icondata As Image = Nothing
     Private atlist As New Generic.List(Of String)
-    Dim dTxt As String
+    Private dTxt As String
+    Private ToolTipWeb As String
 
     Private Const Mainpath As String = "http://twitter.com/"
     Private Const Followingpath As String = "/following"
@@ -105,6 +107,7 @@ Public Class ShowUserInfo
             Me.Close()
             Return
         Else
+            Dim webtext As String
             'アイコンロード
             BackgroundWorkerImageLoader.RunWorkerAsync()
 
@@ -115,6 +118,12 @@ Public Class ShowUserInfo
             LabelName.Text = _info.Name
 
             LabelLocation.Text = _info.Location
+
+
+            webtext = TweenMain.TwitterInstance.PreProcessUrl("<a href=""" + _info.Url + """>Dummy</a>")
+            webtext = TweenMain.TwitterInstance.ShortUrlResolve(webtext)
+            ToolTip1.SetToolTip(LinkLabelWeb, _
+                                Regex.Match(webtext, "<a href=""(?<url>.*?)""").Groups.Item("url").Value)
             LinkLabelWeb.Text = _info.Url
 
             DescriptionBrowser.Visible = False
index 9893635..8339389 100644 (file)
@@ -1493,7 +1493,7 @@ Public Class Twitter
     '        End Try
     '    End Function
 
-    Private Function PreProcessUrl(ByVal orgData As String) As String
+    Public Function PreProcessUrl(ByVal orgData As String) As String
         Dim posl1 As Integer
         Dim posl2 As Integer = 0
         Dim IDNConveter As IdnMapping = New IdnMapping()