Changeset 24542

Show
Ignore:
Timestamp:
11/21/08 09:14:29 (7 weeks ago)
Author:
kiri_feather
Message:

DMが取得できない場合がある問題を修正
DMでスクリーンネーム、プロテクト状態を取得する処理追加

Location:
lang/vb2005/Tween/Tween
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lang/vb2005/Tween/Tween/AnalyzeKey.vb

    r23634 r24542  
    1616    Public _parseDM1 As String = "<span class=""entry-content"">" 
    1717    Public _parseDM2 As String = "</span>" 
     18    Public _parseDM11 As String = "<span class=""protected"">" 
    1819    Public _parseDate As String = "<span class=""published"" title=""" 
    1920    Public _parseDateTo As String = """" 
  • lang/vb2005/Tween/Tween/My Project/AssemblyInfo.vb

    r24358 r24542  
    5555' <Assembly: AssemblyVersion("1.0.*")>  
    5656 
    57 <Assembly: AssemblyVersion("0.1.3.0")>  
    58 <Assembly: AssemblyFileVersion("0.1.3.0")>  
     57<Assembly: AssemblyVersion("0.1.3.1")>  
     58<Assembly: AssemblyFileVersion("0.1.3.1")>  
    5959 
  • lang/vb2005/Tween/Tween/Resources/ChangeLog.txt

    r24358 r24542  
    11更新履歴 
    22 
     3***Ver0.1.3.1(Trunk) 
     4-DMが取れないケースに対応 
     5-DMで、プロテクト状態取得、スクリーンネーム取得に対応 
    36***Ver0.1.3.0(2008/11/20) 
    47-詳細欄のID/日時部で、余白があるにもかかわらず、ID表示が折り返されてしまう問題を改善 
  • lang/vb2005/Tween/Tween/Tween.vb

    r24226 r24542  
    24722472        Dim _onewaylove As Boolean 
    24732473        Dim nm As String = "" 
     2474        Dim Protect As String 
    24742475 
    24752476        Dim _item As ListViewItem 
     
    25162517            _onewaylove = Not IsReceive 
    25172518            lItem = tlList(cnt) 
    2518             Dim sItem() As String = {"", lItem.Nick, lItem.Data, lItem.PDate.ToString("yy-MM-dd HH:mm:ss"), lItem.Name, lItem.Id, lItem.ImageUrl, lItem.OrgData, _readed.ToString, _fav.ToString, _onewaylove.ToString, "False"} 
     2519            If lItem.Protect = True Then 
     2520                Protect = "Ю" 
     2521            Else 
     2522                Protect = "" 
     2523            End If 
     2524            Dim sItem() As String = {Protect, lItem.Nick, lItem.Data, lItem.PDate.ToString("yy-MM-dd HH:mm:ss"), lItem.Name, lItem.Id, lItem.ImageUrl, lItem.OrgData, _readed.ToString, _fav.ToString, _onewaylove.ToString, "False"} 
    25192525            Dim lvItem As New ListViewItem(sItem) 
    25202526            lvItem.Font = _fntReaded 
     
    47034709        NameLabel.Text = _item.SubItems(1).Text + "/" + _item.SubItems(4).Text 
    47044710        UserPicture.Image = TIconList.Images(_item.SubItems(6).Text) 
    4705         If ListTab.SelectedTab.Text = "Direct" Then 
    4706             NameLabel.Text = _item.SubItems(1).Text 
    4707         Else 
    4708             NameLabel.Text = _item.SubItems(1).Text + "/" + _item.SubItems(4).Text 
    4709         End If 
     4711        NameLabel.Text = _item.SubItems(1).Text + "/" + _item.SubItems(4).Text 
    47104712 
    47114713        NameLabel.ForeColor = System.Drawing.SystemColors.ControlText 
  • lang/vb2005/Tween/Tween/Twitter.vb

    r24358 r24542  
    834834 
    835835                'Get Nick 
    836                 'pos1 = strPost.IndexOf(_parseNick, pos2) 
    837                 'pos2 = strPost.IndexOf("""", pos1 + _parseNick.Length) 
    838                 'lItem.Nick = HttpUtility.HtmlDecode(strPost.Substring(pos1 + _parseNick.Length, pos2 - pos1 - _parseNick.Length)) 
    839                 lItem.Nick = lItem.Name 
     836                Try 
     837                    pos1 = strPost.IndexOf(_parseNick, pos2) 
     838                    pos2 = strPost.IndexOf(_parseNickTo, pos1 + _parseNick.Length) 
     839                    lItem.Nick = HttpUtility.HtmlDecode(strPost.Substring(pos1 + _parseNick.Length, pos2 - pos1 - _parseNick.Length)) 
     840                Catch ex As Exception 
     841                    _signed = False 
     842                    Return "GetDirectMessage -> Err: Can't get Nick." 
     843                End Try 
    840844 
    841845                If links.Contains(lItem.Id) Then 
     
    854858                    End Try 
    855859 
     860                    'Get Protect 
     861                    Try 
     862                        pos1 = strPost.IndexOf(_isProtect, pos2) 
     863                        If pos1 > -1 Then lItem.Protect = True 
     864                    Catch ex As Exception 
     865                        _signed = False 
     866                        Return "GetDirectMessage -> Err: Can't get Protect" 
     867                    End Try 
     868 
    856869                    'Get Message 
    857870                    Try 
    858871                        pos1 = strPost.IndexOf(_parseDM1, pos2) 
    859                         pos2 = strPost.IndexOf(_parseDM2, pos1) 
    860                         orgData = strPost.Substring(pos1 + _parseDM1.Length, pos2 - pos1 - _parseDM1.Length).Trim() 
     872                        If pos1 > -1 Then 
     873                            pos2 = strPost.IndexOf(_parseDM2, pos1) 
     874                            orgData = strPost.Substring(pos1 + _parseDM1.Length, pos2 - pos1 - _parseDM1.Length).Trim() 
     875                        Else 
     876                            pos1 = strPost.IndexOf(_parseDM11, pos2) 
     877                            orgData = strPost.Substring(pos1 + _parseDM11.Length, pos2 - pos1 - _parseDM11.Length).Trim() 
     878                        End If 
    861879                        orgData = orgData.Replace("&lt;3", "♡") 
    862880                    Catch ex As Exception 
     
    16621680                                    _parseDM1 = ln.Substring(18, ln.Length - 1 - 18).Replace("\", "") 
    16631681                                End If 
     1682                                If ln.StartsWith("      ""tagfrom2"": """) Then 
     1683                                    _parseDM11 = ln.Substring(19, ln.Length - 1 - 19).Replace("\", "") 
     1684                                End If 
    16641685                                If ln.StartsWith("      ""tagto"": """) Then 
    16651686                                    _parseDM2 = ln.Substring(16, ln.Length - 1 - 16).Replace("\", "") 
     
    19001921        sw.WriteLine("    Public _parseMsg2 As String = " + Chr(34) + _parseMsg2.Replace(Chr(34), Chr(34) + Chr(34)) + Chr(34)) 
    19011922        sw.WriteLine("    Public _parseDM1 As String = " + Chr(34) + _parseDM1.Replace(Chr(34), Chr(34) + Chr(34)) + Chr(34)) 
     1923        sw.WriteLine("    Public _parseDM11 As String = " + Chr(34) + _parseDM11.Replace(Chr(34), Chr(34) + Chr(34)) + Chr(34)) 
    19021924        sw.WriteLine("    Public _parseDM2 As String = " + Chr(34) + _parseDM2.Replace(Chr(34), Chr(34) + Chr(34)) + Chr(34)) 
    19031925        sw.WriteLine("    Public _parseDate As String = " + Chr(34) + _parseDate.Replace(Chr(34), Chr(34) + Chr(34)) + Chr(34))