@@ -92,18 +92,19 @@ public NumericUpDown ()
92
92
Add ( _down , _number , _up ) ;
93
93
94
94
AddCommand (
95
- Command . ScrollUp ,
95
+ Command . Up ,
96
96
( ctx ) =>
97
97
{
98
98
if ( type == typeof ( object ) )
99
99
{
100
100
return false ;
101
101
}
102
102
103
- if ( RaiseSelecting ( ctx ) is true )
104
- {
105
- return true ;
106
- }
103
+ // BUGBUG: If this is uncommented, the numericupdown in a shortcut will not work
104
+ //if (RaiseSelecting (ctx) is true)
105
+ //{
106
+ // return true;
107
+ //}
107
108
108
109
if ( Value is { } && Increment is { } )
109
110
{
@@ -114,18 +115,19 @@ public NumericUpDown ()
114
115
} ) ;
115
116
116
117
AddCommand (
117
- Command . ScrollDown ,
118
+ Command . Down ,
118
119
( ctx ) =>
119
120
{
120
121
if ( type == typeof ( object ) )
121
122
{
122
123
return false ;
123
124
}
124
125
125
- if ( RaiseSelecting ( ctx ) is true )
126
- {
127
- return true ;
128
- }
126
+ // BUGBUG: If this is uncommented, the numericupdown in a shortcut will not work
127
+ //if (RaiseSelecting (ctx) is true)
128
+ //{
129
+ // return true;
130
+ //}
129
131
130
132
if ( Value is { } && Increment is { } )
131
133
{
@@ -136,22 +138,22 @@ public NumericUpDown ()
136
138
return true ;
137
139
} ) ;
138
140
139
- KeyBindings . Add ( Key . CursorUp , Command . ScrollUp ) ;
140
- KeyBindings . Add ( Key . CursorDown , Command . ScrollDown ) ;
141
+ KeyBindings . Add ( Key . CursorUp , Command . Up ) ;
142
+ KeyBindings . Add ( Key . CursorDown , Command . Down ) ;
141
143
142
144
SetText ( ) ;
143
145
144
146
return ;
145
147
146
148
void OnDownButtonOnAccept ( object ? s , CommandEventArgs e )
147
149
{
148
- InvokeCommand ( Command . ScrollDown ) ;
150
+ InvokeCommand ( Command . Down ) ;
149
151
e . Cancel = true ;
150
152
}
151
153
152
154
void OnUpButtonOnAccept ( object ? s , CommandEventArgs e )
153
155
{
154
- InvokeCommand ( Command . ScrollUp ) ;
156
+ InvokeCommand ( Command . Up ) ;
155
157
e . Cancel = true ;
156
158
}
157
159
}
0 commit comments