-
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.
Added Focus check, Loaded Check and cleaned code
- Checks for Game to be focused - Checks for Save to be Loaded - Cleaned the code a bit
- Loading branch information
1 parent
16b1da2
commit b58fe79
Showing
8 changed files
with
74 additions
and
31 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace WPF.Gadgetlemage | ||
{ | ||
internal static class User32 | ||
{ | ||
[DllImport("user32.dll")] | ||
private static extern IntPtr GetWindowThreadProcessId(IntPtr hWnd, out uint ProcessId); | ||
|
||
[DllImport("user32.dll")] | ||
private static extern IntPtr GetForegroundWindow(); | ||
|
||
public static uint GetForegroundProcessID() | ||
{ | ||
IntPtr hWnd = GetForegroundWindow(); | ||
GetWindowThreadProcessId(hWnd, out uint pid); | ||
return pid; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="LowLevelHooking" version="1.0.1" targetFramework="net461" /> | ||
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" /> | ||
<package id="MaterialDesignThemes" version="2.5.1" targetFramework="net461" /> | ||
</packages> |