mirror of
https://github.com/claunia/libexeinfo.git
synced 2025-12-16 19:14:24 +00:00
Correct GUI visualization of NE accelerators when they refer to a character instead of a virtual key.
This commit is contained in:
@@ -48,7 +48,8 @@ namespace exeinfogui.NE
|
|||||||
accelerators.AddRange(table.Accelerators.Select(accel => new Accelerator
|
accelerators.AddRange(table.Accelerators.Select(accel => new Accelerator
|
||||||
{
|
{
|
||||||
Type = $"{accel.Type}",
|
Type = $"{accel.Type}",
|
||||||
Key = $"{accel.Key}",
|
Key = accel.Type.HasFlag(libexeinfo.NE.Os2AcceleratorFlags.AF_VIRTUALKEY) ? $"{accel.Key}" :
|
||||||
|
$"'{(char)(byte)accel.Key}'",
|
||||||
Command = accel.Command
|
Command = accel.Command
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -60,12 +61,13 @@ namespace exeinfogui.NE
|
|||||||
.Select(accel => new Accelerator
|
.Select(accel => new Accelerator
|
||||||
{
|
{
|
||||||
Type = $"{accel.Flags}",
|
Type = $"{accel.Flags}",
|
||||||
Key = $"{accel.Key}",
|
Key = accel.Flags.HasFlag(libexeinfo.NE.WinAcceleratorFlags.VirtualKey) ? $"{accel.Key}" :
|
||||||
|
$"'{(char)(byte)accel.Key}'",
|
||||||
Command = accel.Command
|
Command = accel.Command
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accelerators.Count > 0) grdAccelerators.DataStore = accelerators;
|
if(accelerators.Count > 0) grdAccelerators.DataStore = accelerators.OrderBy(r => r.Command).ThenBy(r=>r.Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Accelerator
|
class Accelerator
|
||||||
|
|||||||
Reference in New Issue
Block a user