Skip to content

Commit

Permalink
Started porting actual resource type support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lloyd Kinsella committed Aug 10, 2018
1 parent d3ad642 commit 3839e55
Show file tree
Hide file tree
Showing 36 changed files with 1,726 additions and 26 deletions.
1 change: 1 addition & 0 deletions Src/Workshell.PE/DataDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

using Workshell.PE.Content;
using Workshell.PE.Native;
using Workshell.PE.Resources;

namespace Workshell.PE
{
Expand Down
2 changes: 1 addition & 1 deletion Src/Workshell.PE/Workshell.PE.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion dotNET PE.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ VisualStudioVersion = 15.0.27703.2042
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Workshell.PE", "src\Workshell.PE\Workshell.PE.csproj", "{2DF6E85A-7269-46C6-9032-1C3A8F029AE3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Workshell.PE.Testbed", "src\Workshell.PE.Testbed\Workshell.PE.Testbed.csproj", "{D73F5FEA-7576-4EF4-9DED-07D3F8607598}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Workshell.PE.Testbed", "src\Workshell.PE.Testbed\Workshell.PE.Testbed.csproj", "{D73F5FEA-7576-4EF4-9DED-07D3F8607598}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Workshell.PE.Resources", "src\Workshell.PE.Resources\Workshell.PE.Resources.csproj", "{DBED9C9E-0B8C-46B5-AE1D-865722B68E44}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,6 +23,10 @@ Global
{D73F5FEA-7576-4EF4-9DED-07D3F8607598}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D73F5FEA-7576-4EF4-9DED-07D3F8607598}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D73F5FEA-7576-4EF4-9DED-07D3F8607598}.Release|Any CPU.Build.0 = Release|Any CPU
{DBED9C9E-0B8C-46B5-AE1D-865722B68E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DBED9C9E-0B8C-46B5-AE1D-865722B68E44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBED9C9E-0B8C-46B5-AE1D-865722B68E44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBED9C9E-0B8C-46B5-AE1D-865722B68E44}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
60 changes: 60 additions & 0 deletions src/Workshell.PE.Resources/Accelerators/AcceleratorEntry.cs
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
}
}
Loading

0 comments on commit 3839e55

Please sign in to comment.