svnno****@sourc*****
svnno****@sourc*****
2011年 1月 6日 (木) 09:43:03 JST
Revision: 1324 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1324 Author: f_swallow Date: 2011-01-06 09:43:03 +0900 (Thu, 06 Jan 2011) Log Message: ----------- KeyDownの処理を少し書き換え。IntegerをModifierStateにした Modified Paths: -------------- trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2011-01-05 23:32:02 UTC (rev 1323) +++ trunk/Tween/Tween.vb 2011-01-06 00:43:03 UTC (rev 1324) @@ -4800,7 +4800,7 @@ pnl.Controls("comboLang").Focused OrElse _ pnl.Controls("buttonSearch").Focused Then Exit Sub End If - Dim State As Integer = GetModifierState(e.Control, e.Shift, e.Alt) + Dim State As ModifierState = GetModifierState(e.Control, e.Shift, e.Alt) If State = ModifierState.NotFlags Then Exit Sub If State <> ModifierState.Non Then _anchorFlag = False If CommonKeyDown(e.KeyCode, ModifierState.ListTab, State) Then @@ -4811,7 +4811,7 @@ End Sub - Public Function GetModifierState(ByVal sControl As Boolean, ByVal sShift As Boolean, ByVal sAlt As Boolean) As Integer + Public Function GetModifierState(ByVal sControl As Boolean, ByVal sShift As Boolean, ByVal sAlt As Boolean) As ModifierState If Not sAlt AndAlso Not sControl AndAlso Not sShift Then Return ModifierState.Non If sControl Then If sShift AndAlso Not sAlt Then @@ -4848,7 +4848,7 @@ StatusText = 103 End Enum - Public Function CommonKeyDown(ByVal KeyCode As System.Windows.Forms.Keys, ByVal Focused As Integer, ByVal Modifier As Integer) As Boolean + Public Function CommonKeyDown(ByVal KeyCode As System.Windows.Forms.Keys, ByVal Focused As ModifierState, ByVal Modifier As ModifierState) As Boolean Dim Pressed As Boolean = False '修飾キーなし @@ -5874,7 +5874,7 @@ End Sub Private Sub StatusText_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles StatusText.KeyDown - Dim State As Integer = GetModifierState(e.Control, e.Shift, e.Alt) + Dim State As ModifierState = GetModifierState(e.Control, e.Shift, e.Alt) If State = ModifierState.NotFlags Then Exit Sub If CommonKeyDown(e.KeyCode, ModifierState.StatusText, State) Then e.Handled = True @@ -6128,7 +6128,7 @@ End Sub Private Sub PostBrowser_PreviewKeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles PostBrowser.PreviewKeyDown - Dim State As Integer = GetModifierState(e.Control, e.Shift, e.Alt) + Dim State As ModifierState = GetModifierState(e.Control, e.Shift, e.Alt) If State = ModifierState.NotFlags Then Exit Sub Dim KeyRes As Boolean = CommonKeyDown(e.KeyCode, ModifierState.PostBrowser, State) If KeyRes Then