This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mentola
authored and
mentola
committed
Oct 4, 2023
1 parent
2a58a4a
commit a7dd460
Showing
27 changed files
with
1,839 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34031.279 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easyyyyy", "Easyyyyy\Easyyyyy.csproj", "{695F4CB7-BAEE-48FB-A0EC-67FEC4A8B67B}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{695F4CB7-BAEE-48FB-A0EC-67FEC4A8B67B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{695F4CB7-BAEE-48FB-A0EC-67FEC4A8B67B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{695F4CB7-BAEE-48FB-A0EC-67FEC4A8B67B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{695F4CB7-BAEE-48FB-A0EC-67FEC4A8B67B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {8B9D5F32-8EC3-43C2-8B41-A783B9C8078B} | ||
EndGlobalSection | ||
EndGlobal |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
</startup> | ||
</configuration> |
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,9 @@ | ||
<Application | ||
x:Class="Easyyyyy.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:Easyyyyy" | ||
x:Name="Application" | ||
Startup="Application_Startup"> | ||
<Application.Resources /> | ||
</Application> |
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,14 @@ | ||
using Easyyyyy.Views; | ||
using System.Windows; | ||
|
||
namespace Easyyyyy | ||
{ | ||
public partial class App : Application | ||
{ | ||
private void Application_Startup(object sender, StartupEventArgs e) | ||
{ | ||
var MainWindow = new MainWindow(); | ||
MainWindow.Show(); | ||
} | ||
} | ||
} |
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,17 @@ | ||
using System.Windows.Input; | ||
|
||
namespace Easyyyyy.Core | ||
{ | ||
class Binding | ||
{ | ||
public int GetIntVirtualKey(Key key) | ||
{ | ||
return KeyInterop.VirtualKeyFromKey(key); | ||
} | ||
|
||
public string GetStringVirtualKey(Key key) | ||
{ | ||
return key.ToString(); | ||
} | ||
} | ||
} |
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.Runtime.InteropServices; | ||
using System.Windows; | ||
|
||
namespace Easyyyyy.Core | ||
{ | ||
public class Mouse | ||
{ | ||
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] | ||
private static extern void mouse_event(MouseEvent dwFlags, long dx, long dy, long cButtons, long dwExtraInfo); | ||
|
||
private enum MouseEvent | ||
{ | ||
MOUSEEVENTF_LEFTDOWN = 0x02, | ||
MOUSEEVENTF_LEFTUP = 0x04, | ||
MOUSEEVENTF_RIGHTDOWN = 0x08, | ||
MOUSEEVENTF_RIGHTUP = 0x10, | ||
} | ||
|
||
[StructLayout(LayoutKind.Sequential)] | ||
public struct POINT | ||
{ | ||
public int X; | ||
public int Y; | ||
|
||
public static implicit operator Point(POINT point) | ||
{ | ||
return new Point(point.X, point.Y); | ||
} | ||
} | ||
|
||
[DllImport("user32.dll")] | ||
public static extern bool GetCursorPos(out POINT lpPoint); | ||
|
||
public static Point GetCursorPosition() | ||
{ | ||
POINT lpPoint; | ||
GetCursorPos(out lpPoint); | ||
|
||
return lpPoint; | ||
} | ||
|
||
public void oneLeftClick() | ||
{ | ||
var cursorPosition = GetCursorPosition(); | ||
mouse_event(MouseEvent.MOUSEEVENTF_LEFTDOWN, Convert.ToInt32(cursorPosition.X), Convert.ToInt32(cursorPosition.Y), 0, 0); | ||
mouse_event(MouseEvent.MOUSEEVENTF_LEFTUP, Convert.ToInt32(cursorPosition.X), Convert.ToInt32(cursorPosition.Y), 0, 0); | ||
} | ||
|
||
public void doubleLeftClick() | ||
{ | ||
for (int x = 0; x != 2; x++) | ||
{ | ||
var cursorPosition = GetCursorPosition(); | ||
mouse_event(MouseEvent.MOUSEEVENTF_LEFTDOWN, Convert.ToInt32(cursorPosition.X), Convert.ToInt32(cursorPosition.Y), 0, 0); | ||
mouse_event(MouseEvent.MOUSEEVENTF_LEFTUP, Convert.ToInt32(cursorPosition.X), Convert.ToInt32(cursorPosition.Y), 0, 0); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.