[Tween-svn] [1625] ソート順変更のショートカットキーを追加 ( Ctrl+Shift+数字 )

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 10月 11日 (火) 00:55:26 JST


Revision: 1625
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1625
Author:   neta
Date:     2011-10-11 00:55:26 +0900 (Tue, 11 Oct 2011)

Log Message:
-----------
ソート順変更のショートカットキーを追加 (Ctrl+Shift+数字)

Modified Paths:
--------------
    trunk/Tween/Tween.vb


-------------- next part --------------
Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2011-10-10 11:55:15 UTC (rev 1624)
+++ trunk/Tween/Tween.vb	2011-10-10 15:55:26 UTC (rev 1625)
@@ -5644,6 +5644,23 @@
                                 Return pressed
                             End If
                     End Select
+                ElseIf Focused = FocusedControl.ListTab Then
+                    Select Case KeyCode
+                        Case Keys.D1, Keys.D2, Keys.D3, Keys.D4, Keys.D5, Keys.D6, Keys.D7, Keys.D8
+                            ' ソートダイレクト選択(Ctrl+Shift+1~8,Ctrl+Shift+9)
+                            Dim colNo As Integer = KeyCode - Keys.D1
+                            Dim lst As DetailsListView = DirectCast(ListTab.SelectedTab.Tag, DetailsListView)
+                            If lst.Columns.Count < colNo Then Exit Function
+                            Dim col = lst.Columns.Cast(Of ColumnHeader).Where(Function(x) x.DisplayIndex = colNo).FirstOrDefault()
+                            If col Is Nothing Then Exit Function
+                            MyList_ColumnClick(lst, New ColumnClickEventArgs(col.Index))
+                            Return True
+                        Case Keys.D9
+                            Dim lst As DetailsListView = DirectCast(ListTab.SelectedTab.Tag, DetailsListView)
+                            Dim col = lst.Columns.Cast(Of ColumnHeader).OrderByDescending(Function(x) x.DisplayIndex).First()
+                            MyList_ColumnClick(lst, New ColumnClickEventArgs(col.Index))
+                            Return True
+                    End Select
                 End If
             Case ModifierState.Ctrl Or ModifierState.Alt
                 If KeyCode = Keys.S Then



Tween-svn メーリングリストの案内
Back to archive index