Changeset 29331

Show
Ignore:
Timestamp:
01/31/09 11:54:43 (4 years ago)
Author:
syo68k
Message:

同じ書き込みの別タブへの横断ジャンプ実装。(Alt+←→) ただし現在以下の不具合あり タブ横断ジャンプを行ったあとタブをD&Dで並べ替える、あるいはその逆を行うとDetailsListViewの表示と内部状態が矛盾する

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

Legend:

Unmodified
Added
Removed
  • lang/vb2005/Tween/Tween/My Project/AssemblyInfo.vb

    r29153 r29331  
    5555' <Assembly: AssemblyVersion("1.0.*")>  
    5656 
    57 <Assembly: AssemblyVersion("0.2.3.3")>  
    58 <Assembly: AssemblyFileVersion("0.2.3.3")>  
     57<Assembly: AssemblyVersion("0.2.3.4")>  
     58<Assembly: AssemblyFileVersion("0.2.3.4")>  
    5959 
  • lang/vb2005/Tween/Tween/Resources/ChangeLog.txt

    r29313 r29331  
    44-未読管理しないタブでもフォントが未読になるバグ修正 
    55-CTRL+B/CTRL+SHIFT+Bでフォントを即時切り替えるようにした 
     6-描画周り微調整 
    67***Ver0.2.3.3(2009/1/30 trunk) 
    78-タブの全発言を保存しようとするとエラーを起こすバグ修正 
  • lang/vb2005/Tween/Tween/Tween.vb

    r29315 r29331  
    28602860            End If 
    28612861        End If 
     2862        If Not e.Control AndAlso e.Alt AndAlso Not e.Shift Then 
     2863            ' ALTキーが押されている場合 
     2864            ' 別タブの同じ書き込みへ(ALT+←/→) 
     2865            If e.KeyCode = Keys.Right Then 
     2866                e.Handled = True 
     2867                e.SuppressKeyPress = True 
     2868                GoSamePostToAnotherTab(False) 
     2869            End If 
     2870            If e.KeyCode = Keys.Left Then 
     2871                e.Handled = True 
     2872                e.SuppressKeyPress = True 
     2873                GoSamePostToAnotherTab(True) 
     2874            End If 
     2875        End If 
    28622876        If e.Shift AndAlso Not e.Control AndAlso Not e.Alt Then 
    28632877            ' SHIFTキーが押されている場合 
     
    29893003        Next 
    29903004        _curList.EndUpdate() 
     3005    End Sub 
     3006 
     3007    Private Sub GoSamePostToAnotherTab(ByVal left As Boolean) 
     3008        If _curList.VirtualListSize = 0 Then Exit Sub 
     3009        Dim fIdx As Integer = 0 
     3010        Dim toIdx As Integer = 0 
     3011        Dim stp As Integer = 1 
     3012        Dim targetId As Long = 0 
     3013 
     3014        targetId = GetCurTabPost(_curList.SelectedIndices(0)).Id 
     3015 
     3016        If left Then 
     3017            ' 左のタブへ 
     3018            If ListTab.SelectedIndex > 0 Then 
     3019                fIdx = ListTab.SelectedIndex - 1 
     3020            Else 
     3021                Exit Sub 
     3022            End If 
     3023            toIdx = 0 
     3024            stp = -1 
     3025        Else 
     3026            ' 右のタブへ 
     3027            If ListTab.SelectedIndex < ListTab.TabCount - 1 Then 
     3028                fIdx = ListTab.SelectedIndex + 1 
     3029            Else 
     3030                Exit Sub 
     3031            End If 
     3032            toIdx = ListTab.TabCount - 1 
     3033            stp = 1 
     3034        End If 
     3035 
     3036            _curList.BeginUpdate() 
     3037            Dim found As Boolean = False 
     3038            For tabidx As Integer = fIdx To toIdx Step stp 
     3039                For idx As Integer = 0 To DirectCast(ListTab.TabPages(tabidx).Controls(0), DetailsListView).VirtualListSize - 1 
     3040                    If _statuses.Item(ListTab.TabPages(tabidx).Text, idx).Id = targetId Then 
     3041                        ListTab.SelectTab(tabidx) 
     3042                        SelectListItem(_curList, idx) 
     3043                        _curList.EnsureVisible(idx) 
     3044                        found = True 
     3045                        Exit For 
     3046                    End If 
     3047                Next 
     3048                If found Then Exit For 
     3049            Next 
     3050            _curList.EndUpdate() 
    29913051    End Sub 
    29923052