@@ -204,9 +204,9 @@ void InitializeGraphics()
204
204
using ( var imageList = new ImageList ( ) )
205
205
{
206
206
imageList . ColorDepth = ColorDepth . Depth32Bit ;
207
- imageList . ImageSize = new Size ( 16 , 16 ) ;
208
- imageList . Images . Add ( ScaleHelper . Scale ( ( Bitmap ) Globals . MainForm . FindImage ( "229" , false ) ) ) ;
209
- imageList . Images . Add ( ScaleHelper . Scale ( ( Bitmap ) Globals . MainForm . FindImage ( "153" , false ) ) ) ;
207
+ imageList . ImageSize = ScaleHelper . Scale ( new Size ( 16 , 16 ) ) ;
208
+ imageList . Images . Add ( Globals . MainForm . FindImage ( "229" , false ) ) ;
209
+ imageList . Images . Add ( Globals . MainForm . FindImage ( "153" , false ) ) ;
210
210
this . pictureBox . Image = imageList . Images [ 0 ] ;
211
211
this . clearButton . Image = imageList . Images [ 1 ] ;
212
212
}
@@ -408,19 +408,26 @@ void AssignNewShortcut(ShortcutListItem item, Keys shortcut)
408
408
else if ( ! ToolStripManager . IsValidShortcut ( shortcut ) ) return ;
409
409
410
410
if ( item . Custom == shortcut ) return ;
411
+ var oldShortcut = item . Custom ;
411
412
item . Custom = shortcut ;
412
413
item . Selected = true ;
413
414
this . GetConflictItems ( item ) ;
414
415
if ( item . HasConflicts )
415
416
{
416
417
string text = TextHelper . GetString ( "Info.ShortcutIsAlreadyUsed" ) ;
417
418
string caption = TextHelper . GetString ( "Title.WarningDialog" ) ;
418
- if ( MessageBox . Show ( Globals . MainForm , text , " " + caption , MessageBoxButtons . RetryCancel , MessageBoxIcon . Warning ) == DialogResult . Yes )
419
+ switch ( MessageBox . Show ( Globals . MainForm , text , " " + caption , MessageBoxButtons . AbortRetryIgnore , MessageBoxIcon . Warning ) )
419
420
{
420
- this . filterTextBox . Text = ViewConflictsKey + item . KeysString ;
421
- this . filterTextBox . SelectAll ( ) ;
421
+ case DialogResult . Abort :
422
+ item . Custom = oldShortcut ;
423
+ this . GetConflictItems ( item ) ;
424
+ break ;
425
+ case DialogResult . Retry :
426
+ this . filterTextBox . Text = ViewConflictsKey + item . KeysString ;
427
+ this . filterTextBox . SelectAll ( ) ;
428
+ this . filterTextBox . Focus ( ) ; // Set focus to filter...
429
+ break ;
422
430
}
423
- this . filterTextBox . Focus ( ) ; // Set focus to filter...
424
431
}
425
432
}
426
433
0 commit comments