-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started porting actual resource type support.
- Loading branch information
Lloyd Kinsella
committed
Aug 10, 2018
1 parent
d3ad642
commit 3839e55
Showing
36 changed files
with
1,726 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/Workshell.PE.Resources/Accelerators/AcceleratorEntry.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Workshell.PE.Annotations; | ||
|
||
namespace Workshell.PE.Resources.Accelerators | ||
{ | ||
[Flags] | ||
public enum AcceleratorFlags : ushort | ||
{ | ||
[EnumAnnotation("FVIRTKEY")] | ||
VirtualKey = 0x0001, | ||
[EnumAnnotation("FNOINVERT")] | ||
NoInvert = 0x0002, | ||
[EnumAnnotation("FSHIFT")] | ||
Shift = 0x0004, | ||
[EnumAnnotation("FCONTROL")] | ||
Control = 0x0008, | ||
[EnumAnnotation("FALT")] | ||
Alt = 0x0010, | ||
End = 0x0080 | ||
} | ||
|
||
public sealed class AcceleratorEntry | ||
{ | ||
internal AcceleratorEntry(ushort flags, ushort key, ushort id) | ||
{ | ||
Flags = flags; | ||
Key = key; | ||
Id = id; | ||
} | ||
|
||
#region Methods | ||
|
||
public override string ToString() | ||
{ | ||
return $"Id: {Id}; Key: {GetKey()}; Flags: {GetFlags()}"; | ||
} | ||
|
||
public AcceleratorFlags GetFlags() | ||
{ | ||
return (AcceleratorFlags)Flags; | ||
} | ||
|
||
public AcceleratorKeys GetKey() | ||
{ | ||
return (AcceleratorKeys)Key; | ||
} | ||
|
||
#endregion | ||
|
||
#region Properties | ||
|
||
public ushort Flags { get; } | ||
public ushort Key { get; } | ||
public ushort Id {get;} | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.