@@ -34,4 +34,69 @@ private void TbxDescription_OnLostKeyboardFocus(object sender, KeyboardFocusChan
3434 }
3535 viewModel . MAddinManagerBase . AddinManager . SaveToAimIni ( ) ;
3636 }
37+ private void HandleTextboxKeyPress ( object sender , KeyEventArgs e )
38+ {
39+ if ( e . Key == Key . Down )
40+ {
41+ if ( viewModel . IsTabCmdSelected )
42+ {
43+ TreeViewCommand . Focus ( ) ;
44+ }
45+ if ( viewModel . IsTabLispSelected )
46+ {
47+ TreeViewLispFunction . Focus ( ) ;
48+ }
49+ else
50+ {
51+ LogControl . Focus ( ) ;
52+ }
53+ }
54+
55+ }
56+ private void HandleTreeViewCommandKeyPress ( object sender , KeyEventArgs e )
57+ {
58+ int indexCmd = TreeViewCommand . Items . IndexOf ( TreeViewCommand . SelectedItem ) ;
59+ if ( e . Key == Key . Up && TabCommand . IsFocused )
60+ {
61+ tbxSearch . Focus ( ) ;
62+ }
63+ else if ( e . Key == Key . Up && indexCmd == 0 && TabCommand . IsSelected )
64+ {
65+ TabCommand . Focus ( ) ;
66+ }
67+ if ( e . Key == Key . Down && TabCommand . IsSelected )
68+ {
69+ TreeViewCommand . Focus ( ) ;
70+ }
71+ if ( e . Key == Key . Enter )
72+ {
73+ viewModel . ExecuteAddinCommandClick ( ) ;
74+ }
75+
76+ }
77+ private void HandleTreeViewLispKeyPress ( object sender , KeyEventArgs e )
78+ {
79+ int indexCmd = TreeViewLispFunction . Items . IndexOf ( TreeViewLispFunction . SelectedItem ) ;
80+ if ( e . Key == Key . Up && TabLispFunction . IsFocused )
81+ {
82+ tbxSearch . Focus ( ) ;
83+ }
84+ else if ( e . Key == Key . Up && indexCmd == 0 && TabLispFunction . IsSelected )
85+ {
86+ TabLispFunction . Focus ( ) ;
87+ }
88+ if ( e . Key == Key . Down && TabLispFunction . IsSelected )
89+ {
90+ TreeViewLispFunction . Focus ( ) ;
91+ }
92+ if ( e . Key == Key . Enter )
93+ {
94+ viewModel . ExecuteAddinCommandClick ( ) ;
95+ }
96+
97+ }
98+ private void CloseFormEvent ( object sender , KeyEventArgs e )
99+ {
100+ if ( e . Key == Key . Escape ) Close ( ) ;
101+ }
37102}
0 commit comments