Worked around a method binding problem on Windows.

master
Pacman Ghost 5 years ago
parent 9c832efc54
commit 56ed7f3a08
  1. 5
      src/ChartImage.cs

@ -39,7 +39,7 @@ public class ChartImage
else { else {
if ( ! mShortcuts.ContainsKey( shortcut ) ) if ( ! mShortcuts.ContainsKey( shortcut ) )
mShortcuts[ shortcut ] = new List<ChartImage>() ; mShortcuts[ shortcut ] = new List<ChartImage>() ;
logger.Info( $"Registering shortcut: {shortcutString(shortcut.Item1,shortcut.Item2)} => ${caption()}" ) ; logger.Info( $"Registering shortcut: {shortcutString(shortcut.Item1,shortcut.Item2)} => {caption()}" ) ;
mShortcuts[ shortcut ].Add( this ) ; mShortcuts[ shortcut ].Add( this ) ;
} }
} }
@ -144,7 +144,8 @@ public class ChartImage
private Tuple<Keys,Keys> parseShortcut( string val ) private Tuple<Keys,Keys> parseShortcut( string val )
{ {
// parse the shortcut // parse the shortcut
string[] parts = val.ToLower().Split( "-" ) ; // FUDGE! Can't just pass in '-' since a Mono-compiled EXE has trouble running on Windows :-/
string[] parts = val.ToLower().Split( new char[]{'-'} ) ;
Keys modifiers = 0 ; Keys modifiers = 0 ;
for ( int i=0 ; i < parts.Length-1 ; ++i ) { for ( int i=0 ; i < parts.Length-1 ; ++i ) {
if ( parts[i] == "ctrl" ) if ( parts[i] == "ctrl" )

Loading…
Cancel
Save