@@ -216,9 +216,9 @@ void InitializeGraphics()
216
216
using ( var imageList = new ImageList ( ) )
217
217
{
218
218
imageList . ColorDepth = ColorDepth . Depth32Bit ;
219
- imageList . ImageSize = new Size ( 16 , 16 ) ;
220
- imageList . Images . Add ( ScaleHelper . Scale ( ( Bitmap ) Globals . MainForm . FindImage ( "229" , false ) ) ) ;
221
- imageList . Images . Add ( ScaleHelper . Scale ( ( Bitmap ) Globals . MainForm . FindImage ( "153" , false ) ) ) ;
219
+ imageList . ImageSize = ScaleHelper . Scale ( new Size ( 16 , 16 ) ) ;
220
+ imageList . Images . Add ( Globals . MainForm . FindImage ( "229" , false ) ) ;
221
+ imageList . Images . Add ( Globals . MainForm . FindImage ( "153" , false ) ) ;
222
222
this . pictureBox . Image = imageList . Images [ 0 ] ;
223
223
this . clearButton . Image = imageList . Images [ 1 ] ;
224
224
}
@@ -432,6 +432,7 @@ void AssignNewShortcut(ShortcutListItem item, Keys shortcut)
432
432
433
433
if ( item . Custom == shortcut ) return ;
434
434
this . listView . BeginUpdate ( ) ;
435
+ var oldShortcut = item . Custom ;
435
436
item . Custom = shortcut ;
436
437
item . Selected = true ;
437
438
this . GetConflictItems ( item ) ;
@@ -440,12 +441,20 @@ void AssignNewShortcut(ShortcutListItem item, Keys shortcut)
440
441
{
441
442
string text = TextHelper . GetString ( "Info.ShortcutIsAlreadyUsed" ) ;
442
443
string caption = TextHelper . GetString ( "Title.WarningDialog" ) ;
443
- if ( MessageBox . Show ( Globals . MainForm , text , " " + caption , MessageBoxButtons . RetryCancel , MessageBoxIcon . Warning ) == DialogResult . Yes )
444
+ switch ( MessageBox . Show ( Globals . MainForm , text , " " + caption , MessageBoxButtons . AbortRetryIgnore , MessageBoxIcon . Warning ) )
444
445
{
445
- this . filterTextBox . Text = ViewConflictsKey + item . KeysString ;
446
- this . filterTextBox . SelectAll ( ) ;
446
+ case DialogResult . Abort :
447
+ this . listView . BeginUpdate ( ) ;
448
+ item . Custom = oldShortcut ;
449
+ this . GetConflictItems ( item ) ;
450
+ this . listView . EndUpdate ( ) ;
451
+ break ;
452
+ case DialogResult . Retry :
453
+ this . filterTextBox . Text = ViewConflictsKey + item . KeysString ;
454
+ this . filterTextBox . SelectAll ( ) ;
455
+ this . filterTextBox . Focus ( ) ; // Set focus to filter...
456
+ break ;
447
457
}
448
- this . filterTextBox . Focus ( ) ; // Set focus to filter...
449
458
}
450
459
}
451
460
0 commit comments