diff --git a/Example/.vs/Example.csproj.dtbcache.json b/Example/.vs/Example.csproj.dtbcache.json new file mode 100644 index 0000000..96b3f08 --- /dev/null +++ b/Example/.vs/Example.csproj.dtbcache.json @@ -0,0 +1 @@ +{"RootPath":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example","ProjectFileName":"Example.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Connectors\\Apicall.cs"},{"SourceFile":"Connectors\\APIGetSquads.cs"},{"SourceFile":"Connectors\\CheckInfo.cs"},{"SourceFile":"Connectors\\GetLogedInServer.cs"},{"SourceFile":"Connectors\\GetPackData.cs"},{"SourceFile":"Connectors\\GetPlayerInfo.cs"},{"SourceFile":"Connectors\\GetSquadPlayerMember.cs"},{"SourceFile":"Connectors\\GetTaxis.cs"},{"SourceFile":"Connectors\\SendPackOrder.cs"},{"SourceFile":"Connectors\\SendTaxi.cs"},{"SourceFile":"Helpers\\CreateCategoryLists.cs"},{"SourceFile":"Helpers\\CreateSquad.cs"},{"SourceFile":"Helpers\\CreateTaxiList.cs"},{"SourceFile":"Helpers\\GetScreenSize.cs"},{"SourceFile":"Helpers\\GetVersion.cs"},{"SourceFile":"Models\\BattlemetricServerModule.cs"},{"SourceFile":"Models\\CurrentServerLoggedOn.cs"},{"SourceFile":"Models\\ItemModule.cs"},{"SourceFile":"Models\\PackOrderStatus.cs"},{"SourceFile":"Models\\PlayerInfoModule.cs"},{"SourceFile":"Models\\SendTaxiOrder.cs"},{"SourceFile":"Models\\ShopPackModule.cs"},{"SourceFile":"Models\\SquadsModel.cs"},{"SourceFile":"Models\\StaticData\\Form1Module.cs"},{"SourceFile":"Models\\StaticData\\UserPcSettings.cs"},{"SourceFile":"Models\\SteamLibrary.cs"},{"SourceFile":"Models\\TaxiDataModule.cs"},{"SourceFile":"ViewModels\\HomeViewModel.cs"},{"SourceFile":"ViewModels\\MainViewModel.cs"},{"SourceFile":"ViewModels\\ProfileViewModel.cs"},{"SourceFile":"ViewModels\\ViewModelBase.cs"},{"SourceFile":"ViewModels\\ViewModelCommand.cs"},{"SourceFile":"Views\\HomeView.xaml.cs"},{"SourceFile":"Views\\ProfileView.xaml.cs"},{"SourceFile":"App.xaml.cs"},{"SourceFile":"Ingame\\IngameControl.xaml.cs"},{"SourceFile":"MainWindow.xaml.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.8.AssemblyAttributes.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\Ingame\\IngameControl.g.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\MainWindow.g.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\Views\\HomeView.g.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\Views\\ProfileView.g.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\App.g.cs"},{"SourceFile":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\obj\\Debug\\GeneratedInternalTypeHelper.g.cs"}],"References":[{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\DamnOverSharp\\bin\\Debug\\net48\\DamnOverSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\Material.Icons.2.1.0\\lib\\netstandard2.0\\Material.Icons.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\Material.Icons.WPF.2.1.0\\lib\\net461\\Material.Icons.WPF.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\MaterialDesignColors.2.1.4\\lib\\net462\\MaterialDesignColors.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\MaterialDesignThemes.4.9.0\\lib\\net462\\MaterialDesignThemes.Wpf.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\Microsoft.Xaml.Behaviors.Wpf.1.1.39\\lib\\net45\\Microsoft.Xaml.Behaviors.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\packages\\Newtonsoft.Json.13.0.3\\lib\\net45\\Newtonsoft.Json.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\PresentationCore.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\PresentationFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xaml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\WindowsBase.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\bin\\Debug\\Example.exe","OutputItemRelativePath":"Example.exe"},{"OutputItemFullPath":"C:\\Users\\vitor\\source\\repos\\scumoverlay\\Example\\bin\\Debug\\Example.pdb","OutputItemRelativePath":"Example.pdb"}],"CopyToOutputEntries":[]} \ No newline at end of file diff --git a/Example/App.config b/Example/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Example/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Example/App.xaml b/Example/App.xaml new file mode 100644 index 0000000..ed733d3 --- /dev/null +++ b/Example/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/Example/App.xaml.cs b/Example/App.xaml.cs new file mode 100644 index 0000000..845426b --- /dev/null +++ b/Example/App.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace Example +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Example/Connectors/APIGetSquads.cs b/Example/Connectors/APIGetSquads.cs new file mode 100644 index 0000000..9c73922 --- /dev/null +++ b/Example/Connectors/APIGetSquads.cs @@ -0,0 +1,67 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Example.Models; + +namespace Example.Connectors +{ + internal class APIGetSquads + { + + public static List _SquadsList = new List(); + public static async Task> GetSquadsList(string serverPort) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/GetSquads"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + //var response = apicall.GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + + //_SquadsList = JsonConvert.DeserializeObject>(json); + + //return _SquadsList; + + Dictionary squads = JsonConvert.DeserializeObject>(json); + + if (response.ReasonPhrase == "Newtonsoft.JsonError") + { + return null; + + } + + return squads; + } + else + { + throw new Exception(response.ReasonPhrase + response.StatusCode); + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/Apicall.cs b/Example/Connectors/Apicall.cs new file mode 100644 index 0000000..153b66e --- /dev/null +++ b/Example/Connectors/Apicall.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + public static class Apicall + { + public static HttpClient ApiClient { get; set; } + public static HttpClient ApiHeader { get; set; } + + public static void InitializeClient() + { + ApiClient = new HttpClient(); + ApiClient.DefaultRequestHeaders.Accept.Clear(); + ApiClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + ApiHeader = new HttpClient(); + ApiHeader.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + ApiHeader.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + } + } +} diff --git a/Example/Connectors/CheckInfo.cs b/Example/Connectors/CheckInfo.cs new file mode 100644 index 0000000..f35e013 --- /dev/null +++ b/Example/Connectors/CheckInfo.cs @@ -0,0 +1,379 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Example.Models; +using Example.Models.StaticData; +using Example.Helpers; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Color = System.Drawing.Color; + +namespace Example.Connectors +{ + public class CheckInfo + { + public static ServerInfoModel BattlemetricsInfo { get; set; } + private static FileSystemWatcher fileWatcher; + private static string _scumLogsPath; + public static void ConfirmGameOpen() + { + switch (UserPCSettings.gameDetection) + { + case true: + { + } + break; + } + } + + public async static Task ConfirmServerWhaleyServerConnection() + { + if (UserPCSettings.gameDetection) + { + switch (UserPCSettings.serverConnection) + { + case false: + { + if (CreateCategoryLists.CreatedCategoryList.Count != 0) + { + CreateCategoryLists.CreatedCategoryList.Clear(); + CreateTaxiList._TaxiList.Clear(); + CreateSquad.SquadMembersInfo.Clear(); + } + } + break; + + case true: + { + if (GetLogedInServer._currentServerLoggedOn.status == false) + { + Form1Module.OverlayCanOpen = "Off"; + Form1Module.OverlayCanOpenForecolor = Color.Red; + Form1Module.OverlayCanOpenBackcolor = Color.DarkGray; + Thread.Sleep(1000); + await GetLogedInServer.LoadServerData(UserPCSettings.activeSteamID); + } + else + { + var serverChanged = await IfServerAsChanged(); + if (serverChanged == true) + { + await GetPlayerInfo.LoadPlayerData(UserPCSettings.activeSteamID, GetLogedInServer._currentServerLoggedOn.serverID); + await ConfirmPlayerIsLinked(); + + } + else + { + if (GetLogedInServer._currentServerLoggedOn != null) + { + if (GetLogedInServer._currentServerLoggedOn.serverID != null || GetLogedInServer._currentServerLoggedOn.serverID != string.Empty) + { + await GetPlayerInfo.LoadPlayerData(UserPCSettings.activeSteamID, GetLogedInServer._currentServerLoggedOn.serverID); + + await ConfirmPlayerIsLinked(); + } + } + else + { + Thread.Sleep(10000); + await IfServerAsChanged(); + } + } + } + } + break; + } + } + + + } + + public async static Task ConfirmPlayerIsLinked() + { + if (UserPCSettings.serverConnection) + { + switch (GetLogedInServer._currentServerLoggedOn.status) + { + case false: + { + Form1Module.WarningMsg = "Info: Unable to load Information please login into a WhalleyBot supported server!"; + Form1Module.OverlayCanOpen = "Off"; + Form1Module.OverlayCanOpenForecolor = Color.Red; + Form1Module.OverlayCanOpenBackcolor = Color.DarkGray; + Form1Module.OverlayCanOpenCheckBox = false; + Form1Module.CurrentServer = "0"; + Thread.Sleep(1000); + CreateCategoryLists.CreatedCategoryList.Clear(); + CreateTaxiList._TaxiList.Clear(); + CreateSquad.SquadMembersInfo.Clear(); + await GetLogedInServer.LoadServerData(UserPCSettings.activeSteamID); + } + break; + + case true: + { + if (GetPlayerInfo.PlayerDetails.isLinked) + { + + if (CreateCategoryLists.CreatedCategoryList.Count == 0) + { + + await CreateCategoryLists.GetPacksList(); + await CreateTaxiList.GetTaxiList(); + Thread.Sleep(100); + Form1Module.OverlayCanOpenCheckBox = true; + } + await CreateSquad.GetSquadmembers(); + + } + else + { + Form1Module.WarningMsg = "INFO - Please Visit Server's Discord to request your WelcomePack! Thank you."; + Form1Module.OverlayCanOpen = "Off"; + Form1Module.OverlayCanOpenBackcolor = Color.DarkGray; + Form1Module.OverlayCanOpenForecolor = Color.Red; + Form1Module.OverlayCanOpenCheckBox = false; + ConfirmServerWhaleyServerConnection(); + } + } + break; + } + } + } + public async static Task IfServerAsChanged() + { + switch (Form1Module.CurrentServer != GetLogedInServer._currentServerLoggedOn.serverID) + { + case false: + { + if (UserPCSettings.serverConnection) + { + Thread.Sleep(10000); + await GetLogedInServer.LoadServerData(UserPCSettings.activeSteamID); + } + return false; + } + + case true: + { + Form1Module.OverlayCanOpen = "Loading..."; + Form1Module.OverlayCanOpenBackcolor = Color.DarkGray; + Form1Module.OverlayCanOpenForecolor = Color.Yellow; + if (CreateCategoryLists.CreatedCategoryList.Count != 0) + { + CreateCategoryLists.CreatedCategoryList.Clear(); + CreateTaxiList._TaxiList.Clear(); + CreateSquad.SquadMembersInfo.Clear(); + } + Thread.Sleep(10000); + await GetLogedInServer.LoadServerData(UserPCSettings.activeSteamID); + Form1Module.CurrentServer = GetLogedInServer._currentServerLoggedOn.serverID; + return true; + } + } + return false; + } + + public async static Task GetBattlemetricData() + { + try + { + var CurrentLoggedServer = await GetLogedInServer.SearchServer(UserPCSettings.joinedGameIP + ":" + UserPCSettings.joinedGamePort); + List logged = CurrentLoggedServer.data.Where(x => x.attributes.ip == UserPCSettings.joinedGameIP && x.attributes.port == UserPCSettings.joinedGamePort).ToList(); + BattlemetricsInfo = logged.First(); + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + } + + } + + + + + // Initialize the FileSystemWatcher in your setup or initialization code + public static void InitializeReadingScumLogFile() + { + + //fileCreatedDate = File.GetCreationTime(UserPCSettings.gameLogsPath); + + //if (DateTime.Now.AddMinutes(1) > fileCreatedDate) + //{ + // Add your logic to read the newly added lines in the log file here + using (var file = File.Open(UserPCSettings.gameLogsPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + if (UserPCSettings._scumLogPathPosition == file.Length) + return; + if (UserPCSettings._scumLogPathPosition > file.Length) + { + UserPCSettings._scumLogPathPosition = 0; + return; + } + + + file.Position = UserPCSettings._scumLogPathPosition; + //using (var reader = new StreamReader(file)) + //{ + // string line; + // while ((line = reader.ReadLine()) != null) + // { + // if (!string.IsNullOrEmpty(line)) + // { + // if (line.Contains("[LogEOSAnalytics] Start Session")) + // { + // Form1Module.lbl_Main_GameOpen = "Game Loading"; + // UserPCSettings.serverConnection = false; + // Form1Module.lbl_Main_ServerConnection = "Waiting..."; + // } + // else if (line.Contains("LogEOS: [LogEOSMessaging] Succesfully connected to Stomp.")) + // { + // Form1Module.lbl_Main_GameOpen = "At main menu"; + // UserPCSettings._scumAtMainMenu = true; + // Form1Module.lbl_Main_ServerConnection = "Waiting..."; + // } + // else if (line.Contains("LogSCUM: Starting multiplayer game on ")) + // { + // try + // { + // var GetServerIp = line.Split("LogSCUM: ")[1].Replace("Starting multiplayer game on ", "").Replace(" with response port ", "|").Split(":"); + // UserPCSettings.joinedGameIP = GetServerIp[0]; + // UserPCSettings.joinedGamePort = GetServerIp[1].Split("|")[1]; + // UserPCSettings._scumAtMainMenu = false; + // Form1Module.lbl_Main_ServerConnection = "Connecting"; + + // Form1Module.lbl_Main_GameOpen = "Online"; + // } + // catch (Exception ex) + // { + // Console.WriteLine(ex.Message); + // } + + // } + // else if (line.Contains("LogSCUM: APrisoner::HandlePossessedBy:")) + // { + // UserPCSettings.serverConnection = true; + // SetThreadStatus.dochecks = 2; + // Form1Module.ShowInventoryOverlayButton = 2; + // Form1Module.lbl_Main_ServerConnection = "Connected"; + + // Form1Module.lbl_Main_GameOpen = "Online"; + // } + // else if (line.Contains("LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr:")) + // { + // UserPCSettings.serverConnection = false; + // Form1Module.lbl_Main_ServerConnection = "Waiting..."; + // Form1Module.lbl_Main_GameOpen = "At main menu"; + // } + // else if (line.Contains("LogViewport: Display: Viewport MouseLockMode Changed, LockOnCapture -> LockAlways")/*&& line.Contains("LogViewport: Display: Viewport MouseCaptureMode Changed, CapturePermanently->CaptureDuringMouseDown")*/) + // { + // try + // { + // var showoverlayButton = line.Split("][")[1].Replace("]LogViewport: Display: Viewport MouseCaptureMode Changed, CapturePermanently -> CaptureDuringMouseDown", ""); + // if (Form1Module.num != showoverlayButton) + // { + // Form1Module.ShowInventoryOverlayButton = 1; + // } + // Form1Module.num = showoverlayButton; + // } + // catch (Exception ex) + // { + // Debug.WriteLine(ex.Message); + // } + + // } + // else if (line.Contains("LogViewport: Display: Viewport MouseLockMode Changed, LockAlways -> LockOnCapture")/*&& line.Contains("LogViewport: Display: Viewport MouseCaptureMode Changed, NoCapture -> CapturePermanently")*/) + // { + // try + // { + // var showoverlayButton = line.Split("][")[1].Replace("]LogViewport: Display: Viewport MouseLockMode Changed, LockAlways -> LockOnCapture", ""); + // if (Form1Module.num != showoverlayButton) + // { + // Form1Module.ShowInventoryOverlayButton = 0; + // } + // Form1Module.num = showoverlayButton; + // } + // catch (Exception ex) + // { + // Debug.WriteLine(ex.Message); + + // } + // } + // else if (line.Contains("LogViewport: Display: Viewport MouseLockMode Changed, LockOnCapture -> DoNotLock")/*&& line.Contains("LogViewport: Display: Viewport MouseCaptureMode Changed, NoCapture -> CapturePermanently")*/) + // { + // try + // { + // var showoverlayButton = line.Split("][")[1].Replace("]LogViewport: Display: Viewport MouseLockMode Changed, LockOnCapture -> DoNotLock", ""); + // if (Form1Module.num != showoverlayButton) + // { + // Form1Module.ShowSquadMembers = true; + // } + // Form1Module.num = showoverlayButton; + // } + // catch (Exception ex) + // { + // Debug.WriteLine(ex.Message); + + // } + // } + // else if (line.Contains("LogViewport: Display: Player bShowMouseCursor Changed, False -> True")/*&& line.Contains("LogViewport: Display: Viewport MouseCaptureMode Changed, NoCapture -> CapturePermanently")*/) + // { + // try + // { + // var showoverlayButton = line.Split("][")[1].Replace("]LogViewport: Display: Player bShowMouseCursor Changed, False -> True", ""); + // if (Form1Module.num == showoverlayButton) + // { + // Form1Module.ShowSquadMembers = false; + // } + // Form1Module.num = showoverlayButton; + // } + // catch (Exception ex) + // { + // Debug.WriteLine(ex.Message); + + // } + // } + // else if (line.Contains("LogViewport: Display: Viewport MouseLockMode Changed, DoNotLock -> LockOnCapture")/*&& line.Contains("LogViewport: Display: Viewport MouseCaptureMode Changed, NoCapture -> CapturePermanently")*/) + // { + // try + // { + // var showoverlayButton = line.Split("][")[1].Replace("]LogViewport: Display: Viewport MouseLockMode Changed, DoNotLock -> LockOnCapture", ""); + // if (Form1Module.num != showoverlayButton) + // { + // Form1Module.ShowSquadMembers = false; + // } + // Form1Module.num = showoverlayButton; + // } + // catch (Exception ex) + // { + // Debug.WriteLine(ex.Message); + + // } + // } + // else if (line.Contains("LogExit: Exiting.")) + // { + // UserPCSettings.serverConnection = false; + // Form1Module.lbl_Main_ServerConnection = "Offline"; + // Form1Module.lbl_Main_GameOpen = "Game Closed"; + // UserPCSettings.gameDetection = false; + // } + + // } + // UserPCSettings._scumLogPathPosition = file.Position; + + // } + + + //} + } + Thread.Sleep(10); + + + } + + + } +} diff --git a/Example/Connectors/GetLogedInServer.cs b/Example/Connectors/GetLogedInServer.cs new file mode 100644 index 0000000..d0b20be --- /dev/null +++ b/Example/Connectors/GetLogedInServer.cs @@ -0,0 +1,141 @@ +using System; +using Example.ViewModels; +using Example.Models; +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Http; +using System.Diagnostics; + +namespace Example.Connectors +{ + public static class GetLogedInServer + { + public static CurrentServerLoggedOn _currentServerLoggedOn = new CurrentServerLoggedOn(); + + + public static async Task LoadServerData(string playerSteamid) + { + try + { + string url = $"https://api.whalleybot.com/v2/GetCurrentServer/{playerSteamid}"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "ptlc_zMHm25ZD6AftYkhQJySteBYBxeXyT35V2SAUfDPgHBK"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var apicall = await client.GetAsync(url) + .ConfigureAwait(false); + if (apicall.IsSuccessStatusCode) + { + var json = apicall.Content.ReadAsStringAsync().Result; + var readjson = new CurrentServerLoggedOn(); + readjson = JsonConvert.DeserializeObject(json); + + + + if (_currentServerLoggedOn != null) + { + if (readjson.status == true) + { + _currentServerLoggedOn = readjson; + return _currentServerLoggedOn; + } + else if (readjson.status == true && readjson.serverID != _currentServerLoggedOn.serverID) + { + _currentServerLoggedOn = readjson; + return _currentServerLoggedOn; + + } + else if (_currentServerLoggedOn.status == true && readjson.status == false) + { + return _currentServerLoggedOn; + } + else + { + _currentServerLoggedOn = readjson; + _currentServerLoggedOn.serverID = ""; + return _currentServerLoggedOn; + } + } + _currentServerLoggedOn = readjson; + return _currentServerLoggedOn; + + + } + else if (apicall.StatusCode == System.Net.HttpStatusCode.BadRequest && _currentServerLoggedOn != null) + { + //_currentServerLoggedOn.status = true; + return _currentServerLoggedOn; + } + else if (apicall.StatusCode == System.Net.HttpStatusCode.BadRequest) + { + var json = apicall.Content.ReadAsStringAsync().Result; + _currentServerLoggedOn = JsonConvert.DeserializeObject(json); + return _currentServerLoggedOn; + } + else + { + //DialogResult msgBox_GameClose = MessageBox.Show("Sorry! We have a problem finding your player information.\n\n Please try again or restart your app!", "Connection Fail!", MessageBoxButtons.AbortRetryIgnore); + //if (msgBox_GameClose == DialogResult.Retry) + //{ + // await LoadServerData(playerSteamid); + //} + //else + //{ + + // return null; + //} + ////throw new Exception(apicall.ReasonPhrase); + return null; + } + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + + return null; + } + + } + + public static async Task SearchServer(string serverIP_port) + { + try + { + string apiUrl = "https://api.battlemetrics.com/servers?filter[game]=scum&filter[search]="; + using (var battlemetric = new HttpClient()) + { + var battleResponse = await battlemetric.GetAsync(apiUrl + serverIP_port) + .ConfigureAwait(false); + + if (battleResponse.IsSuccessStatusCode) + { + var battleJson = battleResponse.Content.ReadAsStringAsync().Result; + BattlemetricServerModule Infoserver = JsonConvert.DeserializeObject(battleJson); + + return Infoserver; + } + else + { + throw new Exception(battleResponse.ReasonPhrase + battleResponse.StatusCode); + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + + } + } +} diff --git a/Example/Connectors/GetPackData.cs b/Example/Connectors/GetPackData.cs new file mode 100644 index 0000000..50913cd --- /dev/null +++ b/Example/Connectors/GetPackData.cs @@ -0,0 +1,69 @@ +using Newtonsoft.Json; +using Example.Models.StaticData; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + internal class GetPacksData + { + public static async Task LoadPacks(string serverPort, string page) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/GetPacks/{page}"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var apicall = await client.GetAsync(apiurl) + .ConfigureAwait(false); + var response = apicall; + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + ShopPacksModule Infoserver = JsonConvert.DeserializeObject(json); + Form1Module.OverlayCanOpen = "On"; + Form1Module.OverlayCanOpenBackcolor = System.Drawing.Color.DarkGreen; + Form1Module.OverlayCanOpenForecolor = System.Drawing.Color.White; + + return Infoserver; + } + else + { + if (response.StatusCode == System.Net.HttpStatusCode.BadRequest) + { + Form1Module.WarningMsg = response.ReasonPhrase; + Form1Module.OverlayCanOpen = "On"; + Form1Module.OverlayCanOpenBackcolor = System.Drawing.Color.DarkGreen; + Form1Module.OverlayCanOpenForecolor = System.Drawing.Color.White; + } + else + { + throw new Exception(response.ReasonPhrase + response.StatusCode); + } + return null; + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/GetPlayerInfo.cs b/Example/Connectors/GetPlayerInfo.cs new file mode 100644 index 0000000..859e0dc --- /dev/null +++ b/Example/Connectors/GetPlayerInfo.cs @@ -0,0 +1,55 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Example.Models; + +namespace Example.Connectors +{ + public class GetPlayerInfo + { + public static PlayerInfoModule PlayerDetails = new PlayerInfoModule(); + + public static async Task LoadPlayerData(string player_id, string serverPort) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/GetPlayer/{player_id}"; + + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + Console.WriteLine(json); + PlayerDetails = JsonConvert.DeserializeObject(json); + return PlayerDetails; + } + else + { + throw new Exception(response.ReasonPhrase); + } + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/GetSquadPlayerMember.cs b/Example/Connectors/GetSquadPlayerMember.cs new file mode 100644 index 0000000..ef78760 --- /dev/null +++ b/Example/Connectors/GetSquadPlayerMember.cs @@ -0,0 +1,54 @@ +using Newtonsoft.Json; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + internal class GetSquadPlayerMember + { + + public static async Task LoadPlayerData(string player_id, string serverPort) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/GetPlayer/{player_id}"; + + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + Console.WriteLine(json); + PlayerInfoModule SquadMemberDetails = JsonConvert.DeserializeObject(json); + return SquadMemberDetails; + } + else + { + throw new Exception(response.ReasonPhrase); + } + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/GetTaxis.cs b/Example/Connectors/GetTaxis.cs new file mode 100644 index 0000000..27e7865 --- /dev/null +++ b/Example/Connectors/GetTaxis.cs @@ -0,0 +1,65 @@ +using Newtonsoft.Json; +using Example.Models.StaticData; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + public static class GetTaxis + { + public static List _taxiDetails = new List(); + public static async Task> LoadTaxis(string serverPort) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/GetTaxis"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + //var response = apicall.GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + + _taxiDetails = JsonConvert.DeserializeObject>(json); + + return _taxiDetails; + } + if (response.StatusCode == System.Net.HttpStatusCode.BadRequest && _taxiDetails == null) + { + Form1Module.WarningMsg = response.ReasonPhrase; + Form1Module.OverlayCanOpen = "On"; + Form1Module.OverlayCanOpenBackcolor = System.Drawing.Color.DarkGreen; + Form1Module.OverlayCanOpenForecolor = System.Drawing.Color.White; + return _taxiDetails; + } + else + { + throw new Exception(response.ReasonPhrase + response.StatusCode); + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/SendPackOrder.cs b/Example/Connectors/SendPackOrder.cs new file mode 100644 index 0000000..07f2382 --- /dev/null +++ b/Example/Connectors/SendPackOrder.cs @@ -0,0 +1,55 @@ +using Newtonsoft.Json; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + internal class SendPackOrder + { + + public static async Task OrderProcess(string serverPort, string steamdi, string packids) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{GetLogedInServer._currentServerLoggedOn.serverID}/BuyPack/{steamdi}/{packids}/{serverPort}"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + Console.WriteLine(json); + PackOrderStatus Infoserver = JsonConvert.DeserializeObject(json); + + return Infoserver; + } + else + { + throw new Exception(response.ReasonPhrase + response.StatusCode); + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Connectors/SendTaxi.cs b/Example/Connectors/SendTaxi.cs new file mode 100644 index 0000000..96dc284 --- /dev/null +++ b/Example/Connectors/SendTaxi.cs @@ -0,0 +1,54 @@ +using Newtonsoft.Json; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Connectors +{ + internal class SendTaxi + { + public static async Task TaxiOrderProcess(string serverPort, string steamdi, string taxiname) + { + try + { + string apiurl = $"https://api.whalleybot.com/bot/{serverPort}/BuyTaxi/{steamdi}/{taxiname}"; + var handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + + using (var client = new HttpClient(handler)) + { + client.DefaultRequestHeaders.Add("Authorization", "WhalleyBotOverlay_e-H1rr55f"); + client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + + var response = await client.GetAsync(apiurl) + .ConfigureAwait(false); + if (response.IsSuccessStatusCode) + { + var json = response.Content.ReadAsStringAsync().Result; + Console.WriteLine(json); + PackOrderStatus Infoserver = JsonConvert.DeserializeObject(json); + + return Infoserver; + } + else + { + throw new Exception(response.ReasonPhrase + response.StatusCode + response.RequestMessage); + } + + } + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + return null; + } + } + } +} diff --git a/Example/Example.csproj b/Example/Example.csproj new file mode 100644 index 0000000..40f250e --- /dev/null +++ b/Example/Example.csproj @@ -0,0 +1,233 @@ + + + + + Debug + AnyCPU + {AE7779E7-AE31-4922-8095-C2AEC3BEF841} + WinExe + Example + Example + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Material.Icons.2.1.0\lib\netstandard2.0\Material.Icons.dll + + + ..\packages\Material.Icons.WPF.2.1.0\lib\net461\Material.Icons.WPF.dll + + + ..\packages\MaterialDesignColors.2.1.4\lib\net462\MaterialDesignColors.dll + + + ..\packages\MaterialDesignThemes.4.9.0\lib\net462\MaterialDesignThemes.Wpf.dll + + + ..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + + + + + + + + + + + + + + overlay.xaml + + + + + + + + + + + + + + + + + + + + HomeView.xaml + + + ProfileView.xaml + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + IngameControl.xaml + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {4EE6FC63-5260-4ABE-A40B-36A5CDC7C734} + DamnOverSharp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Example/Helpers/CreateCategoryLists.cs b/Example/Helpers/CreateCategoryLists.cs new file mode 100644 index 0000000..f7f4209 --- /dev/null +++ b/Example/Helpers/CreateCategoryLists.cs @@ -0,0 +1,78 @@ +using Example.Connectors; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Helpers +{ + public class CreateCategoryLists + { + public static Dictionary CreatedCategoryList = new Dictionary(); + + + //Get Total Pages from the packs and Loop into them to create a Category List With Packs information in the model CategoryPacksList + public static async Task GetPacksList() + { + + try + { + ShopPacksModule serverTotalPages = await GetPacksData.LoadPacks(GetLogedInServer._currentServerLoggedOn.serverID, "1"); + if (serverTotalPages != null) + { + var cpage = Convert.ToInt16(serverTotalPages.currentPage); + var tpages = Convert.ToInt16(serverTotalPages.totalPages); + + while (cpage <= tpages) + { + ShopPacksModule serverPacksList = await GetPacksData.LoadPacks(GetLogedInServer._currentServerLoggedOn.serverID, cpage.ToString()); + if (serverPacksList != null) + { + foreach (var item in serverPacksList.packData) + { + if (item.categoryName == null) + { + + } + else + { + if (item.price == "0" || item.OverlayHidden || item.categoryName.Contains("welcome") || item.categoryName.Contains("war") + || item.categoryName.Contains("daily") || item.categoryName.Contains("lottery") + || item.categoryName.Contains("quests") || item.categoryName.Contains("wz") + || item.categoryName.Contains("coins") || item.categoryName.Contains("special") + || item.categoryName.Contains("admin") || item.categoryName.Contains("hidden")) + { + } + else + { + var dictpacks = new ItemModule(); + dictpacks.price = item.price; + dictpacks.name = item.name; + dictpacks.packID = item.packID; + dictpacks.description = item.description; + dictpacks.imageURL = item.imageURL; + dictpacks.categoryName = item.categoryName; + CreatedCategoryList.Add(item.name, dictpacks); + } + } + + } + cpage++; + } + + } + } + + return; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message + ex.StackTrace); + + return; + } + } + } +} diff --git a/Example/Helpers/CreateSquad.cs b/Example/Helpers/CreateSquad.cs new file mode 100644 index 0000000..de1f718 --- /dev/null +++ b/Example/Helpers/CreateSquad.cs @@ -0,0 +1,66 @@ +using Example.Connectors; +using Example.Models.StaticData; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Helpers +{ + internal class CreateSquad + { + + public static List SquadMembersInfo = new List(); + public static SquadsModel SquadInfo = new SquadsModel(); + + public static async Task GetSquadmembers() + { + + try + { + SquadMembersInfo.Clear(); + Dictionary SquadList = await APIGetSquads.GetSquadsList(GetLogedInServer._currentServerLoggedOn.serverID); + + if (SquadList == null) + { + + //throw new NullReferenceException("Can't load Squad Info List"); + } + else + { + + SquadInfo = SquadList.FirstOrDefault(squad => squad.Value.SquadMember.ContainsKey(UserPCSettings.activeSteamID.ToString())).Value; + + if (SquadInfo != null) + { + foreach (var squad in SquadInfo.SquadMember.Values) + { + PlayerInfoModule squadMember = new PlayerInfoModule(); + squadMember = await GetSquadPlayerMember.LoadPlayerData(squad.SteamID, GetLogedInServer._currentServerLoggedOn.serverID); + SquadMembersInfo.Add(squadMember); + + //foreach (var member in squad.SquadMember.Values) + //{ + // Console.WriteLine($"- SteamID: {member.SteamID}, Rank: {member.Rank}"); + //} + + } + } + else + { + //throw new NullReferenceException("Player is not member of a Squad."); + } + } + + + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + } + } + } +} diff --git a/Example/Helpers/CreateTaxiList.cs b/Example/Helpers/CreateTaxiList.cs new file mode 100644 index 0000000..ef1c759 --- /dev/null +++ b/Example/Helpers/CreateTaxiList.cs @@ -0,0 +1,54 @@ +using Example.Connectors; +using Example.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Helpers +{ + public class CreateTaxiList + { + public static Dictionary _TaxiList = new Dictionary(); + + + //Get Total Pages from the packs and Loop into them to create a Category List With Packs information in the model CategoryPacksList + public static async Task GetTaxiList() + { + + try + { + List listTaxis = await GetTaxis.LoadTaxis(GetLogedInServer._currentServerLoggedOn.serverID); + if (listTaxis == null) + { + throw new NullReferenceException("Can't load taxi List"); + } + else + { + foreach (TaxiDataModule taxi in listTaxis) + { + if (taxi.enabled == true) + { + var dictaxis = new TaxiDataModule(); + dictaxis.id = taxi.id; + dictaxis.locationName = taxi.locationName; + dictaxis.discordRoles = taxi.discordRoles; + dictaxis.locationPrice = taxi.locationPrice; + dictaxis.enabled = taxi.enabled; + _TaxiList.Add(taxi.locationName, dictaxis); + } + else { } + } + } + + + } + catch (Exception ex) + { + Debug.WriteLine(ex.Source + ex.Message + ex.Data + ex.StackTrace); + } + } + } +} diff --git a/Example/Helpers/GetScreenSize.cs b/Example/Helpers/GetScreenSize.cs new file mode 100644 index 0000000..9fb3dbc --- /dev/null +++ b/Example/Helpers/GetScreenSize.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Helpers +{ + class GetScreenSize + { + + public int MaxScreenWidth { get; set; } + public int MaxScreenHeight { get; set; } + + public GetScreenSize() + { + //MaxScreenWidth = Screen.PrimaryScreen.Bounds.Width; + //MaxScreenHeight = Screen.PrimaryScreen.Bounds.Height; + + } + + } +} diff --git a/Example/Helpers/GetVersion.cs b/Example/Helpers/GetVersion.cs new file mode 100644 index 0000000..c6d7f33 --- /dev/null +++ b/Example/Helpers/GetVersion.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Helpers +{ + class GetVersion + { + public string Version { get; set; } + + public GetVersion() + + { + + + Assembly assembly = Assembly.GetEntryAssembly(); + Version version = assembly.GetName().Version; + + if (version != null) + { + Version = version.ToString(); + } + + } + } +} diff --git a/Example/Img/Ingame_btn.png b/Example/Img/Ingame_btn.png new file mode 100644 index 0000000..cf124a3 Binary files /dev/null and b/Example/Img/Ingame_btn.png differ diff --git a/Example/Img/SCUM_logo.webp b/Example/Img/SCUM_logo.webp new file mode 100644 index 0000000..a2e8530 Binary files /dev/null and b/Example/Img/SCUM_logo.webp differ diff --git a/Example/Img/logo.png b/Example/Img/logo.png new file mode 100644 index 0000000..5e671b5 Binary files /dev/null and b/Example/Img/logo.png differ diff --git a/Example/Img/logo_head.png b/Example/Img/logo_head.png new file mode 100644 index 0000000..1759faa Binary files /dev/null and b/Example/Img/logo_head.png differ diff --git a/Example/Img/logo_intro.jpg b/Example/Img/logo_intro.jpg new file mode 100644 index 0000000..915e2f0 Binary files /dev/null and b/Example/Img/logo_intro.jpg differ diff --git a/Example/Img/logo_original.png b/Example/Img/logo_original.png new file mode 100644 index 0000000..fe633a2 Binary files /dev/null and b/Example/Img/logo_original.png differ diff --git a/Example/Img/scum_logo2.png b/Example/Img/scum_logo2.png new file mode 100644 index 0000000..19d11e9 Binary files /dev/null and b/Example/Img/scum_logo2.png differ diff --git a/Example/Img/zypher_logo_big.png b/Example/Img/zypher_logo_big.png new file mode 100644 index 0000000..1159cc6 Binary files /dev/null and b/Example/Img/zypher_logo_big.png differ diff --git a/Example/Img/zypher_mini_logo.png b/Example/Img/zypher_mini_logo.png new file mode 100644 index 0000000..200b570 Binary files /dev/null and b/Example/Img/zypher_mini_logo.png differ diff --git a/Example/Ingame/IngameControl.xaml b/Example/Ingame/IngameControl.xaml new file mode 100644 index 0000000..6b03eae --- /dev/null +++ b/Example/Ingame/IngameControl.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + diff --git a/Example/Ingame/IngameControl.xaml.cs b/Example/Ingame/IngameControl.xaml.cs new file mode 100644 index 0000000..b3b6579 --- /dev/null +++ b/Example/Ingame/IngameControl.xaml.cs @@ -0,0 +1,31 @@ +using DamnOverSharp.WPF.UiLibrary; +using System; +using System.Windows; + +namespace Example +{ + /// + /// Interaction logic for IngameControl.xaml + /// + public partial class IngameControl : VirtualControlBase + { + public IngameControl() + { + InitializeComponent(); + } + + private void VirtualButton_Clicked(object sender, EventArgs e) + { + button.Text = "Clicked :)"; + } + + private void mouseCapture_VirtualMouseDrag(object sender, System.Windows.Point e) + { + if (mouseCapture.VirtualMouseDown) + { + this.Margin = new Thickness(e.X - mouseCapture.ActualWidth / 2, e.Y - mouseCapture.ActualHeight / 2, 0, 0); + UpdateVisual(); + } + } + } +} diff --git a/Example/Ingame/example_image.png b/Example/Ingame/example_image.png new file mode 100644 index 0000000..8ac1754 Binary files /dev/null and b/Example/Ingame/example_image.png differ diff --git a/Example/Ingame/overlay.xaml b/Example/Ingame/overlay.xaml new file mode 100644 index 0000000..e7278a8 --- /dev/null +++ b/Example/Ingame/overlay.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/Example/Ingame/overlay.xaml.cs b/Example/Ingame/overlay.xaml.cs new file mode 100644 index 0000000..3b59ec0 --- /dev/null +++ b/Example/Ingame/overlay.xaml.cs @@ -0,0 +1,63 @@ +using DamnOverSharp.WPF.UiLibrary; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Example.Ingame +{ + /// + /// Interaction logic for overlay.xaml + /// + public partial class overlay : VirtualControlBase + { + public overlay() + { + InitializeComponent(); + } + + private void ButtonDiscord_Click(object sender, RoutedEventArgs e) + { + App.Current.MainWindow.Close(); + } + + private void VirtualButton_Clicked(object sender, EventArgs e) + { + ShopTitle.Content = "I click it"; + } + + private void ShopTitle_Click(object sender, EventArgs e) + { + TaxiTitle.Content = "Shop Menu"; + ShopTitle.Content = "Shop"; + } + + private void TaxiTitle_Click(object sender, EventArgs e) + { + TaxiTitle.Content = "Taxi"; + ShopTitle.Content = "Taxi menu"; + } + + private void SquadTitle_Click(object sender, EventArgs e) + { + SquadTitle.Content = "Squad"; + SettingsTitle.Content = " Squad Menu"; + } + + private void SettingsTitle_Click(object sender, EventArgs e) + { + SquadTitle.Content = "Settings Menu"; + SettingsTitle.Content = "Settings"; + } + } +} diff --git a/Example/MainWindow.xaml b/Example/MainWindow.xaml new file mode 100644 index 0000000..fcc2744 --- /dev/null +++ b/Example/MainWindow.xaml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/MainWindow.xaml.cs b/Example/MainWindow.xaml.cs new file mode 100644 index 0000000..cf485bd --- /dev/null +++ b/Example/MainWindow.xaml.cs @@ -0,0 +1,155 @@ +using DamnOverSharp.Renderers.Chromium; +using DamnOverSharp.Renderers.Graphic; +using DamnOverSharp.Renderers.WPF; +using Example.Connectors; +using Example.Models.StaticData; +using Example.Models; +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Input; +using System.Windows.Threading; +using Example.Ingame; +using System.Diagnostics; +using System.Windows.Forms; + +namespace Example +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + WpfRenderer Renderer; + GraphicRenderer BitmapRenderer; + public static CurrentServerLoggedOn connectedServer = new CurrentServerLoggedOn(); + DispatcherTimer timer = new DispatcherTimer(); + + private CancellationTokenSource _cancellationTokenReadLogs; + + public MainWindow() + { + InitializeComponent(); + //connectedServer = await GetLogedInServer.LoadServerData("76561197995865733").Result; + timer.Tick += (sender, e) => UpdatePagesInformation(sender, e); + timer.Interval = new TimeSpan(0, 0, 0, 0, 100); + timer.Start(); + Screen primaryScreenSize = Screen.PrimaryScreen; + UserPCSettings.maxScreenWidth = primaryScreenSize.Bounds.Width; + UserPCSettings.maxScreenHeight = primaryScreenSize.Bounds.Height; + + } + + private void Window_Closed(object sender, System.EventArgs e) + { + Renderer?.Destroy(); + Renderer = null; + BitmapRenderer?.Destroy(); + BitmapRenderer = null; + } + + private void Button_ShowWPFOverlay_Clicked(object sender, RoutedEventArgs e) + { + Renderer?.Destroy(); + Renderer = null; + BitmapRenderer?.Destroy(); + BitmapRenderer = null; + + Renderer = new WpfRenderer("SCUM", new Size(UserPCSettings.maxScreenWidth, UserPCSettings.maxScreenHeight), new Point(0, 0)) { InteractionOffset = new Point(8, 30) }; + Renderer.AddControl(new overlay() { VerticalAlignment = VerticalAlignment.Top}); + Renderer.UpdateVisual(); + } + + + private async void UpdatePagesInformation(object sender, EventArgs e) + { + if (SetThreadStatus.dochecks == 0) + { + SetThreadStatus.dochecks = 1; + _cancellationTokenReadLogs = new CancellationTokenSource(); + await MainLoop(_cancellationTokenReadLogs.Token); + } + + + GetLogedInServer._currentServerLoggedOn.status = true; + GetLogedInServer._currentServerLoggedOn.serverID = "eeddaaf5"; + GetLogedInServer._currentServerLoggedOn.apiPort = ""; + if (GetLogedInServer._currentServerLoggedOn.status) + { + Form1Module.CurrentServer = GetLogedInServer._currentServerLoggedOn.serverID; + UserPCSettings.serverConnection = GetLogedInServer._currentServerLoggedOn.status; + } + MainWindow_UserName.Text = GetPlayerInfo.PlayerDetails.playerName; + } + + private async Task MainLoop(CancellationToken cancellation) + { + await Task.Run(() => + { + try + { + while (true) + { + Thread.Sleep(100); + dispatcherTimer_Tick(); + } + } + catch (Exception ex) + { + Console.WriteLine(ex.Source); + } + }); + + } + + private async void dispatcherTimer_Tick() + { + UserPCSettings.activeSteamID = "76561197995865733"; + UserPCSettings.gameDetection = true; + + connectedServer = new CurrentServerLoggedOn(); + connectedServer.status = true; + connectedServer.serverID = "eeddaaf5"; + connectedServer.apiPort = ""; + if (connectedServer.status) + { + Form1Module.CurrentServer = connectedServer.serverID; + UserPCSettings.serverConnection = connectedServer.status; + } + await CheckInfo.ConfirmServerWhaleyServerConnection(); + + + + } + + private void btnMinimize_Click(object sender, RoutedEventArgs e) + { + this.WindowState = WindowState.Minimized; + } + + private void btnClose_Click_1(object sender, RoutedEventArgs e) + { + this.Close(); + } + + private void Border_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + this.DragMove(); + } + + private void btnMaximise_Click(object sender, RoutedEventArgs e) + { + switch (this.WindowState) + { + case WindowState.Maximized: + this.WindowState = WindowState.Normal; + break; + case WindowState.Normal: + this.WindowState = WindowState.Maximized; + break; + + } + } + } +} diff --git a/Example/Models/BattlemetricServerModule.cs b/Example/Models/BattlemetricServerModule.cs new file mode 100644 index 0000000..cb09d7e --- /dev/null +++ b/Example/Models/BattlemetricServerModule.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class BattlemetricServerModule + { + public ServerInfoModel[] data { get; set; } + + + } + public class ServerInfoModel + { + public string type { get; set; } + public int id { get; set; } + public InfoDetailsModel attributes { get; set; } + + } + public class InfoDetailsModel + { + + public string name { get; set; } + public int id { get; set; } + public string address { get; set; } + public string ip { get; set; } + public string port { get; set; } + public int players { get; set; } + public int maxPlayers { get; set; } + public int rank { get; set; } + public string status { get; set; } + + } +} diff --git a/Example/Models/CurrentServerLoggedOn.cs b/Example/Models/CurrentServerLoggedOn.cs new file mode 100644 index 0000000..fdf0f7a --- /dev/null +++ b/Example/Models/CurrentServerLoggedOn.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class CurrentServerLoggedOn + { + public bool status { get; set; } + public string apiPort { get; set; } + public string serverID { get; set; } + + } +} diff --git a/Example/Models/ItemModule.cs b/Example/Models/ItemModule.cs new file mode 100644 index 0000000..9fa2305 --- /dev/null +++ b/Example/Models/ItemModule.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class ItemModule + { + public string PositionTitle { get; set; } + public string packID { get; set; } + public string name { get; set; } + public string price { get; set; } + public string description { get; set; } + public string imageURL { get; set; } + public string categoryName { get; set; } + public string packLimit { get; set; } + public string packLimitTime { get; set; } + public string packLinkedLimit { get; set; } + public string excludedRegions { get; set; } + public string exclusiveRegions { get; set; } + } +} diff --git a/Example/Models/PackOrderStatus.cs b/Example/Models/PackOrderStatus.cs new file mode 100644 index 0000000..5aa276d --- /dev/null +++ b/Example/Models/PackOrderStatus.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class PackOrderStatus + { + public string status { get; set; } + + } +} diff --git a/Example/Models/PlayerInfoModule.cs b/Example/Models/PlayerInfoModule.cs new file mode 100644 index 0000000..5b6a6cb --- /dev/null +++ b/Example/Models/PlayerInfoModule.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class PlayerInfoModule + { + + public string playerName { get; set; } + public long coins { get; set; } + public int totalDeaths { get; set; } + public int totalKills { get; set; } + public long steamID { get; set; } + public int kills { get; set; } + public int deaths { get; set; } + public long longestKillDistance { get; set; } + public bool isLinked { get; set; } + public long currentKillStreak { get; set; } + public int totalTimeAlive { get; set; } + public int totalInGameTime { get; set; } + public int goldBalance { get; set; } + public int creditBalance { get; set; } + public int lockpickStreak { get; set; } + public string lastKnownLocation { get; set; } + //public Dictionary> packLimitJson { get; set; } + //public DateTime traderCooldown { get; set; } + //public DateTime dailyPack { get; set; } + + + } +} diff --git a/Example/Models/SendTaxiOrder.cs b/Example/Models/SendTaxiOrder.cs new file mode 100644 index 0000000..3acc89a --- /dev/null +++ b/Example/Models/SendTaxiOrder.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + internal class SendTaxiOrder + { + } +} diff --git a/Example/Models/ShopPackModule.cs b/Example/Models/ShopPackModule.cs new file mode 100644 index 0000000..eface6b --- /dev/null +++ b/Example/Models/ShopPackModule.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class ShopPacksModule + { + public List packData { get; set; } + public string currentPage { get; set; } + public string totalPages { get; set; } + } + + public class packs + { + public string PositionTitle { get; set; } + public string packID { get; set; } + public string name { get; set; } + public string price { get; set; } + public string description { get; set; } + public string imageURL { get; set; } + public string categoryName { get; set; } + public string packLimit { get; set; } + public string packLimitTime { get; set; } + public string packLinkedLimit { get; set; } + public string excludedRegions { get; set; } + public string exclusiveRegions { get; set; } + public bool OverlayHidden { get; set; } + } + public class CategoriePackList + { + public Dictionary Categories { get; set; } + } +} diff --git a/Example/Models/SquadsModel.cs b/Example/Models/SquadsModel.cs new file mode 100644 index 0000000..374ec27 --- /dev/null +++ b/Example/Models/SquadsModel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class SquadsModel + { + public string Id { get; set; } + public string SquadName { get; set; } + public Dictionary SquadMember { get; set; } + public DateTime? LastOnline { get; set; } + } + + public class SquadMember + { + public string SteamID { get; set; } + public string Rank { get; set; } + } +} diff --git a/Example/Models/StaticData/Form1Module.cs b/Example/Models/StaticData/Form1Module.cs new file mode 100644 index 0000000..6557b18 --- /dev/null +++ b/Example/Models/StaticData/Form1Module.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Color = System.Drawing.Color; + +namespace Example.Models.StaticData +{ + public static class Form1Module + { + public static string lbl_Main_GameOpen { get; set; } + public static string lbl_Main_ServerConnection { get; set; } + public static string lbl_Main_SteamDetected { get; set; } + public static int ShowInventoryOverlayButton { get; set; } + public static string num { get; set; } + public static string CurrentServer { get; set; } + public static string OverlayCanOpen { get; set; } + public static System.Drawing.Color OverlayCanOpenForecolor { get; set; } + public static System.Drawing.Color OverlayCanOpenBackcolor { get; set; } + public static bool OverlayCanOpenCheckBox { get; set; } + public static string WarningMsg { get; set; } + public static bool KeyhidePress { get; set; } + public static Color BackGround_Color { get; set; } + public static Color Text_Color { get; set; } + public static Color Label_Color { get; set; } + public static bool ShowSquadMembers { get; set; } + public static bool MembersToSee { get; set; } + public static bool PosPrinted { get; set; } + } +} diff --git a/Example/Models/StaticData/UserPcSettings.cs b/Example/Models/StaticData/UserPcSettings.cs new file mode 100644 index 0000000..4016068 --- /dev/null +++ b/Example/Models/StaticData/UserPcSettings.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models.StaticData +{ + public static class UserPCSettings + { + public static bool gameDetection { get; set; } + public static string gameSettingsPath { get; set; } + public static string gameLogsPath { get; set; } + public static bool serverConnection { get; set; } + public static string activeSteamID { get; set; } + public static int maxScreenHeight { get; set; } + public static int maxScreenWidth { get; set; } + public static int FullScreenActivated { get; set; } + public static int PreferredFullscreenMode { get; set; } + public static int ResolutionSizeX { get; set; } + public static int ResolutionSizeY { get; set; } + public static Process[] processNameList { get; set; } + public static string ScumPath { get; set; } + public static long _scumLogPathPosition { get; set; } + public static string joinedGameIP { get; set; } + public static string joinedGamePort { get; set; } + public static bool _scumAtMainMenu { get; set; } + public static string _processInFocus { get; set; } + } + + public static class SetThreadStatus + { + public static int readinglogs { get; set; } + public static int dochecks { get; set; } + } +} diff --git a/Example/Models/SteamLibrary.cs b/Example/Models/SteamLibrary.cs new file mode 100644 index 0000000..19d8d0c --- /dev/null +++ b/Example/Models/SteamLibrary.cs @@ -0,0 +1,24 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class SteamLibrary + { + [JsonProperty("libraryfolders")] + public Dictionary Libraryfolders { get; set; } + } + + + + public class Library + { + public string path { get; set; } + //public Dictionary Apps { get; set; } + + } +} diff --git a/Example/Models/TaxiDataModule.cs b/Example/Models/TaxiDataModule.cs new file mode 100644 index 0000000..786625c --- /dev/null +++ b/Example/Models/TaxiDataModule.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.Models +{ + public class TaxiDataModule + { + public int id { get; set; } + public string locationName { get; set; } + public int locationPrice { get; set; } + public string discordRoles { get; set; } + public bool enabled { get; set; } + + } +} diff --git a/Example/Properties/AssemblyInfo.cs b/Example/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..01a4b47 --- /dev/null +++ b/Example/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Example")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Example")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Example/Properties/Resources.Designer.cs b/Example/Properties/Resources.Designer.cs new file mode 100644 index 0000000..898eaea --- /dev/null +++ b/Example/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Example.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Example.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Example/Properties/Resources.resx b/Example/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Example/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Example/Properties/Settings.Designer.cs b/Example/Properties/Settings.Designer.cs new file mode 100644 index 0000000..7515125 --- /dev/null +++ b/Example/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Example.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Example/Properties/Settings.settings b/Example/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Example/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Example/Styles/ButtonStyles.xaml b/Example/Styles/ButtonStyles.xaml new file mode 100644 index 0000000..5321e37 --- /dev/null +++ b/Example/Styles/ButtonStyles.xaml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Example/Styles/UIColors.xaml b/Example/Styles/UIColors.xaml new file mode 100644 index 0000000..8b2086f --- /dev/null +++ b/Example/Styles/UIColors.xaml @@ -0,0 +1,41 @@ + + + + + #0A003A + #1C0E49 + #24105F + #210F55 + + + #4ECDC4 + #6c757d + #3e4954 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Example/ViewModels/HomeViewModel.cs b/Example/ViewModels/HomeViewModel.cs new file mode 100644 index 0000000..8c472a3 --- /dev/null +++ b/Example/ViewModels/HomeViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.ViewModels +{ + public class HomeViewModel : ViewModelBase + { + + } +} diff --git a/Example/ViewModels/MainViewModel.cs b/Example/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..9dbfedf --- /dev/null +++ b/Example/ViewModels/MainViewModel.cs @@ -0,0 +1,68 @@ +using Example.Connectors; +using Example.Models; +using Material.Icons; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Example.ViewModels +{ + public class MainViewModel : ViewModelBase + { + private PlayerInfoModule _playerInfoModule = GetPlayerInfo.PlayerDetails; + private ViewModelBase _currentChildView; + private string _windowtitle; + private MaterialIconKind _windowIcon; + + + public PlayerInfoModule playerInfoModule + { + get + { + return _playerInfoModule; + } + set + { + _playerInfoModule = value; + } + + + + } + + public ViewModelBase CurrentChildView { get => _currentChildView; set { _currentChildView = value; OnPropertyChanged(nameof(CurrentChildView)); } } + public string Windowtitle { get => _windowtitle; set { _windowtitle = value; OnPropertyChanged(nameof(Windowtitle)); } } + public MaterialIconKind WindowIcon { get => _windowIcon; set { _windowIcon = value; OnPropertyChanged(nameof(WindowIcon)); } } + + //--> Commands + public ICommand ShowHomeViewCommand { get; } + public ICommand ShowProfileViewCommand { get; } + + public MainViewModel() + { + //Initialize Commands + ShowHomeViewCommand = new ViewModelCommand(ExecuteShowHomeViewCommand); + ShowProfileViewCommand = new ViewModelCommand(ExecuteShowProfileViewCommand); + + // Default View + ExecuteShowHomeViewCommand(null); + } + + private void ExecuteShowProfileViewCommand(object obj) + { + CurrentChildView = new ProfileViewModel(); + Windowtitle = "Profile"; + WindowIcon = MaterialIconKind.Person; + } + + private void ExecuteShowHomeViewCommand(object obj) + { + CurrentChildView = new HomeViewModel(); + Windowtitle = "Home"; + WindowIcon = MaterialIconKind.Home; + } + } +} diff --git a/Example/ViewModels/ProfileViewModel.cs b/Example/ViewModels/ProfileViewModel.cs new file mode 100644 index 0000000..fa4e8f5 --- /dev/null +++ b/Example/ViewModels/ProfileViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.ViewModels +{ + public class ProfileViewModel: ViewModelBase + { + + + } +} diff --git a/Example/ViewModels/ViewModelBase.cs b/Example/ViewModels/ViewModelBase.cs new file mode 100644 index 0000000..38651bf --- /dev/null +++ b/Example/ViewModels/ViewModelBase.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Example.ViewModels +{ + public abstract class ViewModelBase : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + public void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/Example/ViewModels/ViewModelCommand.cs b/Example/ViewModels/ViewModelCommand.cs new file mode 100644 index 0000000..9ed8492 --- /dev/null +++ b/Example/ViewModels/ViewModelCommand.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Example.ViewModels +{ + public class ViewModelCommand : ICommand + { + //Fields + private readonly Action _executeAction; + private readonly Predicate _canExecuteAction; + + public ViewModelCommand(Action executeAction) + { + _executeAction = executeAction; + _canExecuteAction = null; + } + + public ViewModelCommand(Action executeAction, Predicate canExecuteAction) + { + _executeAction = executeAction; + _canExecuteAction = canExecuteAction; + } + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + //Methods + public bool CanExecute(object parameter) + { + return _canExecuteAction == null ? true : _canExecuteAction(parameter); + } + + public void Execute(object parameter) + { + _executeAction(parameter); + } + } +} diff --git a/Example/Views/HomeView.xaml b/Example/Views/HomeView.xaml new file mode 100644 index 0000000..4f461fe --- /dev/null +++ b/Example/Views/HomeView.xaml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Views/HomeView.xaml.cs b/Example/Views/HomeView.xaml.cs new file mode 100644 index 0000000..f93deee --- /dev/null +++ b/Example/Views/HomeView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Example.Views +{ + /// + /// Interaction logic for HomeView.xaml + /// + public partial class HomeView : UserControl + { + public HomeView() + { + InitializeComponent(); + } + } +} diff --git a/Example/Views/ProfileView.xaml b/Example/Views/ProfileView.xaml new file mode 100644 index 0000000..550a56d --- /dev/null +++ b/Example/Views/ProfileView.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/Example/Views/ProfileView.xaml.cs b/Example/Views/ProfileView.xaml.cs new file mode 100644 index 0000000..ce3da93 --- /dev/null +++ b/Example/Views/ProfileView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Example.Views +{ + /// + /// Interaction logic for ProfileView.xaml + /// + public partial class ProfileView : UserControl + { + public ProfileView() + { + InitializeComponent(); + } + } +} diff --git a/Example/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Example/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Example/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Example/obj/Debug/App.g.cs b/Example/obj/Debug/App.g.cs new file mode 100644 index 0000000..dc4f9dc --- /dev/null +++ b/Example/obj/Debug/App.g.cs @@ -0,0 +1,83 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1013D332F5CF7F76730B043F8F24ECB0ADD389B3FB38F49BCBA53A874105BE54" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + System.Uri resourceLocater = new System.Uri("/Example;component/app.xaml", System.UriKind.Relative); + + #line 1 "..\..\App.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + Example.App app = new Example.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/Example/obj/Debug/App.g.i.cs b/Example/obj/Debug/App.g.i.cs new file mode 100644 index 0000000..dc4f9dc --- /dev/null +++ b/Example/obj/Debug/App.g.i.cs @@ -0,0 +1,83 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1013D332F5CF7F76730B043F8F24ECB0ADD389B3FB38F49BCBA53A874105BE54" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + System.Uri resourceLocater = new System.Uri("/Example;component/app.xaml", System.UriKind.Relative); + + #line 1 "..\..\App.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + Example.App app = new Example.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/Example/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Example/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..60c4c47 Binary files /dev/null and b/Example/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8e07b9e Binary files /dev/null and b/Example/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Example/obj/Debug/Example.Properties.Resources.resources b/Example/obj/Debug/Example.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Example/obj/Debug/Example.Properties.Resources.resources differ diff --git a/Example/obj/Debug/Example.csproj.AssemblyReference.cache b/Example/obj/Debug/Example.csproj.AssemblyReference.cache new file mode 100644 index 0000000..a79a218 Binary files /dev/null and b/Example/obj/Debug/Example.csproj.AssemblyReference.cache differ diff --git a/Example/obj/Debug/Example.csproj.CopyComplete b/Example/obj/Debug/Example.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Example/obj/Debug/Example.csproj.CoreCompileInputs.cache b/Example/obj/Debug/Example.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..a0d03e4 --- /dev/null +++ b/Example/obj/Debug/Example.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +46bd7f055311c260667bd4c27bf4516573cbde2a58bde73e6ee7c4c166e48484 diff --git a/Example/obj/Debug/Example.csproj.FileListAbsolute.txt b/Example/obj/Debug/Example.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..42b7a96 --- /dev/null +++ b/Example/obj/Debug/Example.csproj.FileListAbsolute.txt @@ -0,0 +1,428 @@ +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook64.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyLoad64.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\sharpdx_direct3d11_1_effects_x64.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\d3dcompiler_47.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook32.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook32Svc.exe +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook64Svc.exe +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyLoad32.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\sharpdx_direct3d11_1_effects_x86.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\chrome_100_percent.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\chrome_200_percent.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\chrome_elf.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\icudtl.dat +D:\source\repos\DamnOverSharp\Example\bin\Debug\libcef.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\libEGL.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\libGLESv2.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\LICENSE.txt +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\af.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\am.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ar.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\bg.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\bn.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ca.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\cs.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\da.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\de.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\el.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\en-GB.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\en-US.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\es-419.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\es.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\et.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\fa.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\fi.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\fil.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\fr.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\gu.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\he.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\hi.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\hr.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\hu.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\id.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\it.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ja.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\kn.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ko.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\lt.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\lv.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ml.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\mr.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ms.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\nb.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\nl.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\pl.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\pt-BR.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\pt-PT.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ro.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ru.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\sk.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\sl.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\sr.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\sv.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\sw.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ta.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\te.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\th.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\tr.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\uk.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\ur.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\vi.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\zh-CN.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\locales\zh-TW.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\README.txt +D:\source\repos\DamnOverSharp\Example\bin\Debug\resources.pak +D:\source\repos\DamnOverSharp\Example\bin\Debug\snapshot_blob.bin +D:\source\repos\DamnOverSharp\Example\bin\Debug\v8_context_snapshot.bin +D:\source\repos\DamnOverSharp\Example\bin\Debug\vk_swiftshader.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\vk_swiftshader_icd.json +D:\source\repos\DamnOverSharp\Example\bin\Debug\vulkan-1.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.exe +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\Example.exe.config +D:\source\repos\DamnOverSharp\Example\bin\Debug\Example.exe +D:\source\repos\DamnOverSharp\Example\bin\Debug\Example.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\DamnOverSharp.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.OffScreen.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\Capture.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D9.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.DXGI.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D10.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Mathematics.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Desktop.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct2D1.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.Effects.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.D3DCompiler.dll +D:\source\repos\DamnOverSharp\Example\bin\Debug\DamnOverSharp.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\Gma.System.MouseKeyHook.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\Capture.pdb +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\EasyHook.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D9.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.DXGI.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D10.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Mathematics.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Desktop.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct2D1.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.Effects.xml +D:\source\repos\DamnOverSharp\Example\bin\Debug\SharpDX.D3DCompiler.xml +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.csproj.AssemblyReference.cache +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.csproj.SuggestedBindingRedirects.cache +D:\source\repos\DamnOverSharp\Example\obj\Debug\Ingame\IngameControl.g.cs +D:\source\repos\DamnOverSharp\Example\obj\Debug\MainWindow.g.cs +D:\source\repos\DamnOverSharp\Example\obj\Debug\App.g.cs +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example_MarkupCompile.cache +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example_MarkupCompile.lref +D:\source\repos\DamnOverSharp\Example\obj\Debug\Ingame\IngameControl.baml +D:\source\repos\DamnOverSharp\Example\obj\Debug\MainWindow.baml +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.g.resources +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.Properties.Resources.resources +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.csproj.GenerateResource.cache +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.csproj.CoreCompileInputs.cache +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.csproj.CopyComplete +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.exe +D:\source\repos\DamnOverSharp\Example\obj\Debug\Example.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.Runtime.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook32.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook32Svc.exe +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook64.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook64Svc.exe +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyLoad32.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyLoad64.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\sharpdx_direct3d11_1_effects_x64.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\sharpdx_direct3d11_1_effects_x86.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\chrome_100_percent.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\chrome_200_percent.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\chrome_elf.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\d3dcompiler_47.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\icudtl.dat +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\libcef.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\libEGL.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\libGLESv2.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\LICENSE.txt +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\af.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\am.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ar.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\bg.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\bn.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ca.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\cs.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\da.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\de.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\el.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\en-GB.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\en-US.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\es-419.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\es.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\et.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\fa.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\fi.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\fil.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\fr.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\gu.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\he.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\hi.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\hr.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\hu.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\id.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\it.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ja.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\kn.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ko.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\lt.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\lv.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ml.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\mr.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ms.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\nb.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\nl.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\pl.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\pt-BR.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\pt-PT.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ro.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ru.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\sk.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\sl.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\sr.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\sv.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\sw.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ta.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\te.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\th.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\tr.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\uk.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\ur.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\vi.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\zh-CN.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\locales\zh-TW.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\README.txt +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\resources.pak +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\snapshot_blob.bin +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\v8_context_snapshot.bin +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\vk_swiftshader.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\vk_swiftshader_icd.json +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\vulkan-1.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.exe +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.BrowserSubprocess.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Example.exe.config +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Example.exe +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Example.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\DamnOverSharp.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.OffScreen.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Capture.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\CefSharp.Core.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D9.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.DXGI.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D10.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Mathematics.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Desktop.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct2D1.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.Effects.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.D3DCompiler.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\DamnOverSharp.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\Capture.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\EasyHook.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D9.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.DXGI.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D10.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Mathematics.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Desktop.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct2D1.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.Direct3D11.Effects.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\bin\Debug\SharpDX.D3DCompiler.xml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.csproj.AssemblyReference.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Ingame\IngameControl.g.cs +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\MainWindow.g.cs +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\App.g.cs +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example_MarkupCompile.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example_MarkupCompile.lref +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Ingame\IngameControl.baml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\MainWindow.baml +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.g.resources +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.Properties.Resources.resources +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.csproj.GenerateResource.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.csproj.CoreCompileInputs.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.csproj.CopyComplete +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.exe +C:\Users\vitor\Source\Repos\DamnOverSharp\Example\obj\Debug\Example.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Styles\ButtonStyles.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Styles\UIColors.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Ingame\IngameControl.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\MainWindow.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Views\HomeView.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\App.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\GeneratedInternalTypeHelper.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example_MarkupCompile.cache +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example_MarkupCompile.lref +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.exe +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Views\ProfileView.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\App.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Ingame\IngameControl.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\MainWindow.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Views\HomeView.baml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Views\ProfileView.baml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook32.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook32Svc.exe +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook64.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook64Svc.exe +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyLoad32.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyLoad64.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\sharpdx_direct3d11_1_effects_x64.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\sharpdx_direct3d11_1_effects_x86.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\chrome_100_percent.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\chrome_200_percent.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\chrome_elf.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\d3dcompiler_47.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\icudtl.dat +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\libcef.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\libEGL.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\libGLESv2.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\LICENSE.txt +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\af.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\am.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ar.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\bg.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\bn.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ca.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\cs.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\da.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\de.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\el.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\en-GB.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\en-US.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\es-419.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\es.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\et.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\fa.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\fi.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\fil.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\fr.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\gu.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\he.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\hi.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\hr.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\hu.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\id.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\it.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ja.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\kn.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ko.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\lt.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\lv.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ml.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\mr.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ms.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\nb.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\nl.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\pl.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\pt-BR.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\pt-PT.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ro.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ru.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\sk.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\sl.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\sr.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\sv.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\sw.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ta.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\te.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\th.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\tr.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\uk.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\ur.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\vi.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\zh-CN.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\locales\zh-TW.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\README.txt +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\resources.pak +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\snapshot_blob.bin +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\v8_context_snapshot.bin +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\vk_swiftshader.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\vk_swiftshader_icd.json +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\vulkan-1.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.BrowserSubprocess.Core.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.BrowserSubprocess.exe +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.BrowserSubprocess.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.Core.Runtime.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.Core.Runtime.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.Core.Runtime.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Example.exe.config +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Example.exe +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Example.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\DamnOverSharp.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Material.Icons.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Material.Icons.WPF.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\MaterialDesignColors.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\MaterialDesignThemes.Wpf.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Microsoft.Xaml.Behaviors.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Newtonsoft.Json.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.OffScreen.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Capture.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\CefSharp.Core.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D9.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.DXGI.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D10.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Mathematics.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Desktop.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D11.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct2D1.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D11.Effects.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.D3DCompiler.dll +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\DamnOverSharp.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\MaterialDesignColors.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\MaterialDesignThemes.Wpf.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\MaterialDesignThemes.Wpf.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Microsoft.Xaml.Behaviors.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Microsoft.Xaml.Behaviors.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Newtonsoft.Json.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\Capture.pdb +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\EasyHook.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D9.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.DXGI.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D10.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Mathematics.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Desktop.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D11.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct2D1.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.Direct3D11.Effects.xml +C:\Users\vitor\source\repos\scumoverlay\Example\bin\Debug\SharpDX.D3DCompiler.xml +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.g.resources +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.Properties.Resources.resources +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.csproj.GenerateResource.cache +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Example.csproj.CopyComplete +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Ingame\overlay.g.cs +C:\Users\vitor\source\repos\scumoverlay\Example\obj\Debug\Ingame\overlay.baml diff --git a/Example/obj/Debug/Example.csproj.GenerateResource.cache b/Example/obj/Debug/Example.csproj.GenerateResource.cache new file mode 100644 index 0000000..0cf6b65 Binary files /dev/null and b/Example/obj/Debug/Example.csproj.GenerateResource.cache differ diff --git a/Example/obj/Debug/Example.exe b/Example/obj/Debug/Example.exe new file mode 100644 index 0000000..f3d9ae8 Binary files /dev/null and b/Example/obj/Debug/Example.exe differ diff --git a/Example/obj/Debug/Example.g.resources b/Example/obj/Debug/Example.g.resources new file mode 100644 index 0000000..adfe9b4 Binary files /dev/null and b/Example/obj/Debug/Example.g.resources differ diff --git a/Example/obj/Debug/Example.pdb b/Example/obj/Debug/Example.pdb new file mode 100644 index 0000000..4b007f3 Binary files /dev/null and b/Example/obj/Debug/Example.pdb differ diff --git a/Example/obj/Debug/Example_Content.g.i.cs b/Example/obj/Debug/Example_Content.g.i.cs new file mode 100644 index 0000000..ecd59d2 --- /dev/null +++ b/Example/obj/Debug/Example_Content.g.i.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("chrome_100_percent.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("chrome_200_percent.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("chrome_elf.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("d3dcompiler_47.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("icudtl.dat")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("libcef.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("libegl.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("libglesv2.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("license.txt")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("af.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("am.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ar.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("bg.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("bn.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ca.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cs.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("da.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("de.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("el.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("en-gb.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("en-us.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("es-419.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("es.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("et.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("fa.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("fi.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("fil.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("fr.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("gu.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("he.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("hi.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("hr.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("hu.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("id.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("it.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ja.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("kn.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ko.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("lt.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("lv.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ml.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("mr.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ms.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("nb.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("nl.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("pl.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("pt-br.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("pt-pt.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ro.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ru.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("sk.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("sl.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("sr.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("sv.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("sw.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ta.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("te.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("th.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("tr.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("uk.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("ur.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("vi.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("zh-cn.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("zh-tw.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("readme.txt")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("resources.pak")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("snapshot_blob.bin")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("v8_context_snapshot.bin")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("vk_swiftshader.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("vk_swiftshader_icd.json")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("vulkan-1.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.browsersubprocess.core.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.browsersubprocess.core.pdb")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.browsersubprocess.exe")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.browsersubprocess.pdb")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.core.runtime.dll")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.core.runtime.pdb")] +[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("cefsharp.core.runtime.xml")] + + diff --git a/Example/obj/Debug/GeneratedInternalTypeHelper.g.cs b/Example/obj/Debug/GeneratedInternalTypeHelper.g.cs new file mode 100644 index 0000000..136dd1b --- /dev/null +++ b/Example/obj/Debug/GeneratedInternalTypeHelper.g.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace XamlGeneratedNamespace { + + + /// + /// GeneratedInternalTypeHelper + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { + + /// + /// CreateInstance + /// + protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { + return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) + | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); + } + + /// + /// GetPropertyValue + /// + protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { + return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// SetPropertyValue + /// + protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { + propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// CreateDelegate + /// + protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { + return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod + | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { + delegateType, + handler}, null))); + } + + /// + /// AddEventHandler + /// + protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { + eventInfo.AddEventHandler(target, handler); + } + } +} + diff --git a/Example/obj/Debug/GeneratedInternalTypeHelper.g.i.cs b/Example/obj/Debug/GeneratedInternalTypeHelper.g.i.cs new file mode 100644 index 0000000..136dd1b --- /dev/null +++ b/Example/obj/Debug/GeneratedInternalTypeHelper.g.i.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace XamlGeneratedNamespace { + + + /// + /// GeneratedInternalTypeHelper + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { + + /// + /// CreateInstance + /// + protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { + return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) + | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); + } + + /// + /// GetPropertyValue + /// + protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { + return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// SetPropertyValue + /// + protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { + propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// CreateDelegate + /// + protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { + return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod + | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { + delegateType, + handler}, null))); + } + + /// + /// AddEventHandler + /// + protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { + eventInfo.AddEventHandler(target, handler); + } + } +} + diff --git a/Example/obj/Debug/Ingame/IngameControl.g.i.cs b/Example/obj/Debug/Ingame/IngameControl.g.i.cs new file mode 100644 index 0000000..796e366 --- /dev/null +++ b/Example/obj/Debug/Ingame/IngameControl.g.i.cs @@ -0,0 +1,124 @@ +#pragma checksum "..\..\..\Ingame\IngameControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7097A8A122C565177707B7DD4A36C56CC2890FF8B40D419B8929B7B09760826C" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// IngameControl + /// + public partial class IngameControl : DamnOverSharp.WPF.UiLibrary.VirtualControlBase, System.Windows.Markup.IComponentConnector { + + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea mouseCapture; + + #line default + #line hidden + + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton button; + + #line default + #line hidden + + + #line 22 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Image image; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/ingame/ingamecontrol.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Ingame\IngameControl.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.mouseCapture = ((DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea)(target)); + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + this.mouseCapture.VirtualMouseDrag += new System.EventHandler(this.mouseCapture_VirtualMouseDrag); + + #line default + #line hidden + return; + case 2: + this.button = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + this.button.Clicked += new System.EventHandler(this.VirtualButton_Clicked); + + #line default + #line hidden + return; + case 3: + this.image = ((System.Windows.Controls.Image)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/Ingame/overlay.g.i.cs b/Example/obj/Debug/Ingame/overlay.g.i.cs new file mode 100644 index 0000000..cae3933 --- /dev/null +++ b/Example/obj/Debug/Ingame/overlay.g.i.cs @@ -0,0 +1,147 @@ +#pragma checksum "..\..\..\Ingame\overlay.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9DFB5CF8EC2D00071F2DC6BBCC69BD5806743A156BEAABF6C50D9D6E9FB6B17C" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example.Ingame; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example.Ingame { + + + /// + /// overlay + /// + public partial class overlay : DamnOverSharp.WPF.UiLibrary.VirtualControlBase, System.Windows.Markup.IComponentConnector { + + + #line 15 "..\..\..\Ingame\overlay.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton ShopTitle; + + #line default + #line hidden + + + #line 16 "..\..\..\Ingame\overlay.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton TaxiTitle; + + #line default + #line hidden + + + #line 17 "..\..\..\Ingame\overlay.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton SquadTitle; + + #line default + #line hidden + + + #line 18 "..\..\..\Ingame\overlay.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton SettingsTitle; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/ingame/overlay.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Ingame\overlay.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.ShopTitle = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 15 "..\..\..\Ingame\overlay.xaml" + this.ShopTitle.Clicked += new System.EventHandler(this.ShopTitle_Click); + + #line default + #line hidden + return; + case 2: + this.TaxiTitle = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 16 "..\..\..\Ingame\overlay.xaml" + this.TaxiTitle.Clicked += new System.EventHandler(this.TaxiTitle_Click); + + #line default + #line hidden + return; + case 3: + this.SquadTitle = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 17 "..\..\..\Ingame\overlay.xaml" + this.SquadTitle.Clicked += new System.EventHandler(this.SquadTitle_Click); + + #line default + #line hidden + return; + case 4: + this.SettingsTitle = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 18 "..\..\..\Ingame\overlay.xaml" + this.SettingsTitle.Clicked += new System.EventHandler(this.SettingsTitle_Click); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/IngameControl.g.i.cs b/Example/obj/Debug/IngameControl.g.i.cs new file mode 100644 index 0000000..b0e5a8c --- /dev/null +++ b/Example/obj/Debug/IngameControl.g.i.cs @@ -0,0 +1,124 @@ +#pragma checksum "..\..\IngameControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "668FEF9D95C8E1C323A1B4290BE79BFC92BAB1C6AF4712666FFF7C63255646B7" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// IngameControl + /// + public partial class IngameControl : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + + #line 13 "..\..\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea mouseCapture; + + #line default + #line hidden + + + #line 15 "..\..\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock text; + + #line default + #line hidden + + + #line 16 "..\..\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton button; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/ingamecontrol.xaml", System.UriKind.Relative); + + #line 1 "..\..\IngameControl.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.mouseCapture = ((DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea)(target)); + + #line 13 "..\..\IngameControl.xaml" + this.mouseCapture.VirtualMouseDrag += new System.EventHandler(this.mouseCapture_VirtualMouseDrag); + + #line default + #line hidden + return; + case 2: + this.text = ((System.Windows.Controls.TextBlock)(target)); + return; + case 3: + this.button = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 16 "..\..\IngameControl.xaml" + this.button.Clicked += new System.EventHandler(this.VirtualButton_Clicked); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/MainWindow.g.cs b/Example/obj/Debug/MainWindow.g.cs new file mode 100644 index 0000000..8e72103 --- /dev/null +++ b/Example/obj/Debug/MainWindow.g.cs @@ -0,0 +1,204 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "79EB77BADA9DFD6DB9B67F9978B29AABE5AE00530273EC524AF29D034B815DF2" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using Example.Ingame; +using Example.ViewModels; +using Example.Views; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 57 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border NavBar; + + #line default + #line hidden + + + #line 66 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnMinimize; + + #line default + #line hidden + + + #line 67 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnMaximise; + + #line default + #line hidden + + + #line 68 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnClose; + + #line default + #line hidden + + + #line 138 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock MainWindow_UserName; + + #line default + #line hidden + + + #line 159 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border Footer_Border; + + #line default + #line hidden + + + #line 162 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.StackPanel Footer; + + #line default + #line hidden + + + #line 164 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox lbl_name; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.NavBar = ((System.Windows.Controls.Border)(target)); + return; + case 2: + + #line 63 "..\..\MainWindow.xaml" + ((System.Windows.Controls.StackPanel)(target)).PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Border_PreviewMouseLeftButtonDown); + + #line default + #line hidden + return; + case 3: + this.btnMinimize = ((System.Windows.Controls.Button)(target)); + + #line 66 "..\..\MainWindow.xaml" + this.btnMinimize.Click += new System.Windows.RoutedEventHandler(this.btnMinimize_Click); + + #line default + #line hidden + return; + case 4: + this.btnMaximise = ((System.Windows.Controls.Button)(target)); + + #line 67 "..\..\MainWindow.xaml" + this.btnMaximise.Click += new System.Windows.RoutedEventHandler(this.btnMaximise_Click); + + #line default + #line hidden + return; + case 5: + this.btnClose = ((System.Windows.Controls.Button)(target)); + + #line 68 "..\..\MainWindow.xaml" + this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click_1); + + #line default + #line hidden + return; + case 6: + + #line 104 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowWPFOverlay_Clicked); + + #line default + #line hidden + return; + case 7: + this.MainWindow_UserName = ((System.Windows.Controls.TextBlock)(target)); + return; + case 8: + this.Footer_Border = ((System.Windows.Controls.Border)(target)); + return; + case 9: + this.Footer = ((System.Windows.Controls.StackPanel)(target)); + return; + case 10: + this.lbl_name = ((System.Windows.Controls.TextBox)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/MainWindow.g.i.cs b/Example/obj/Debug/MainWindow.g.i.cs new file mode 100644 index 0000000..8e72103 --- /dev/null +++ b/Example/obj/Debug/MainWindow.g.i.cs @@ -0,0 +1,204 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "79EB77BADA9DFD6DB9B67F9978B29AABE5AE00530273EC524AF29D034B815DF2" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using Example.Ingame; +using Example.ViewModels; +using Example.Views; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 57 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border NavBar; + + #line default + #line hidden + + + #line 66 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnMinimize; + + #line default + #line hidden + + + #line 67 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnMaximise; + + #line default + #line hidden + + + #line 68 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnClose; + + #line default + #line hidden + + + #line 138 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock MainWindow_UserName; + + #line default + #line hidden + + + #line 159 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border Footer_Border; + + #line default + #line hidden + + + #line 162 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.StackPanel Footer; + + #line default + #line hidden + + + #line 164 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox lbl_name; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.NavBar = ((System.Windows.Controls.Border)(target)); + return; + case 2: + + #line 63 "..\..\MainWindow.xaml" + ((System.Windows.Controls.StackPanel)(target)).PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Border_PreviewMouseLeftButtonDown); + + #line default + #line hidden + return; + case 3: + this.btnMinimize = ((System.Windows.Controls.Button)(target)); + + #line 66 "..\..\MainWindow.xaml" + this.btnMinimize.Click += new System.Windows.RoutedEventHandler(this.btnMinimize_Click); + + #line default + #line hidden + return; + case 4: + this.btnMaximise = ((System.Windows.Controls.Button)(target)); + + #line 67 "..\..\MainWindow.xaml" + this.btnMaximise.Click += new System.Windows.RoutedEventHandler(this.btnMaximise_Click); + + #line default + #line hidden + return; + case 5: + this.btnClose = ((System.Windows.Controls.Button)(target)); + + #line 68 "..\..\MainWindow.xaml" + this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click_1); + + #line default + #line hidden + return; + case 6: + + #line 104 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowWPFOverlay_Clicked); + + #line default + #line hidden + return; + case 7: + this.MainWindow_UserName = ((System.Windows.Controls.TextBlock)(target)); + return; + case 8: + this.Footer_Border = ((System.Windows.Controls.Border)(target)); + return; + case 9: + this.Footer = ((System.Windows.Controls.StackPanel)(target)); + return; + case 10: + this.lbl_name = ((System.Windows.Controls.TextBox)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/Styles/ButtonStyles.baml b/Example/obj/Debug/Styles/ButtonStyles.baml new file mode 100644 index 0000000..5ca3644 Binary files /dev/null and b/Example/obj/Debug/Styles/ButtonStyles.baml differ diff --git a/Example/obj/Debug/Styles/UIColors.baml b/Example/obj/Debug/Styles/UIColors.baml new file mode 100644 index 0000000..7f0169f Binary files /dev/null and b/Example/obj/Debug/Styles/UIColors.baml differ diff --git a/Example/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/Example/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..f642287 Binary files /dev/null and b/Example/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/Example/obj/Debug/Views/HomeView.g.cs b/Example/obj/Debug/Views/HomeView.g.cs new file mode 100644 index 0000000..d950e9d --- /dev/null +++ b/Example/obj/Debug/Views/HomeView.g.cs @@ -0,0 +1,76 @@ +#pragma checksum "..\..\..\Views\HomeView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A9FE14BB2494507CBB9FB3AC41C8D9EAD11879F5EEE840CF159228273D1553FB" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example.Views; +using Material.Icons.WPF; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example.Views { + + + /// + /// HomeView + /// + public partial class HomeView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/views/homeview.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Views\HomeView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/Views/HomeView.g.i.cs b/Example/obj/Debug/Views/HomeView.g.i.cs new file mode 100644 index 0000000..d950e9d --- /dev/null +++ b/Example/obj/Debug/Views/HomeView.g.i.cs @@ -0,0 +1,76 @@ +#pragma checksum "..\..\..\Views\HomeView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A9FE14BB2494507CBB9FB3AC41C8D9EAD11879F5EEE840CF159228273D1553FB" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example.Views; +using Material.Icons.WPF; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example.Views { + + + /// + /// HomeView + /// + public partial class HomeView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/views/homeview.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Views\HomeView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/Views/ProfileView.g.cs b/Example/obj/Debug/Views/ProfileView.g.cs new file mode 100644 index 0000000..c4e0fcb --- /dev/null +++ b/Example/obj/Debug/Views/ProfileView.g.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\..\Views\ProfileView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B495324628A6C7A3239AF197BD31AEDA1D11FDB8738B2EDD3CCF4551B27A3FF7" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example.Views; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example.Views { + + + /// + /// ProfileView + /// + public partial class ProfileView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/views/profileview.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Views\ProfileView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Debug/Views/ProfileView.g.i.cs b/Example/obj/Debug/Views/ProfileView.g.i.cs new file mode 100644 index 0000000..c4e0fcb --- /dev/null +++ b/Example/obj/Debug/Views/ProfileView.g.i.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\..\Views\ProfileView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B495324628A6C7A3239AF197BD31AEDA1D11FDB8738B2EDD3CCF4551B27A3FF7" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example.Views; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example.Views { + + + /// + /// ProfileView + /// + public partial class ProfileView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/views/profileview.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Views\ProfileView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Example/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Example/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Example/obj/Release/App.g.cs b/Example/obj/Release/App.g.cs new file mode 100644 index 0000000..3336d3a --- /dev/null +++ b/Example/obj/Release/App.g.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1EE013DD5E27BA9DF3E3172EFA55CDBA91A9DE4F38137FA57D64E5F325EAF6FC" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + Example.App app = new Example.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/Example/obj/Release/App.g.i.cs b/Example/obj/Release/App.g.i.cs new file mode 100644 index 0000000..3336d3a --- /dev/null +++ b/Example/obj/Release/App.g.i.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1EE013DD5E27BA9DF3E3172EFA55CDBA91A9DE4F38137FA57D64E5F325EAF6FC" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + Example.App app = new Example.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/Example/obj/Release/Example.Properties.Resources.resources b/Example/obj/Release/Example.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Example/obj/Release/Example.Properties.Resources.resources differ diff --git a/Example/obj/Release/Example.csproj.AssemblyReference.cache b/Example/obj/Release/Example.csproj.AssemblyReference.cache new file mode 100644 index 0000000..25928b9 Binary files /dev/null and b/Example/obj/Release/Example.csproj.AssemblyReference.cache differ diff --git a/Example/obj/Release/Example.csproj.CopyComplete b/Example/obj/Release/Example.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Example/obj/Release/Example.csproj.CoreCompileInputs.cache b/Example/obj/Release/Example.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..36bb76d --- /dev/null +++ b/Example/obj/Release/Example.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +d55ac1f7ebb803302c3936e23182a598d8cf456c diff --git a/Example/obj/Release/Example.csproj.FileListAbsolute.txt b/Example/obj/Release/Example.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..277b9cf --- /dev/null +++ b/Example/obj/Release/Example.csproj.FileListAbsolute.txt @@ -0,0 +1,135 @@ +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.Core.Runtime.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.Core.Runtime.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.Core.Runtime.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook32.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook32Svc.exe +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook64.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook64Svc.exe +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyLoad32.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyLoad64.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\sharpdx_direct3d11_1_effects_x64.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\sharpdx_direct3d11_1_effects_x86.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\chrome_100_percent.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\chrome_200_percent.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\chrome_elf.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\d3dcompiler_47.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\icudtl.dat +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\libcef.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\libEGL.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\libGLESv2.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\LICENSE.txt +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\af.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\am.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ar.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\bg.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\bn.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ca.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\cs.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\da.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\de.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\el.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\en-GB.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\en-US.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\es-419.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\es.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\et.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\fa.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\fi.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\fil.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\fr.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\gu.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\he.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\hi.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\hr.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\hu.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\id.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\it.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ja.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\kn.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ko.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\lt.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\lv.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ml.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\mr.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ms.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\nb.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\nl.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\pl.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\pt-BR.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\pt-PT.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ro.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ru.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\sk.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\sl.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\sr.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\sv.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\sw.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ta.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\te.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\th.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\tr.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\uk.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\ur.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\vi.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\zh-CN.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\locales\zh-TW.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\README.txt +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\resources.pak +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\snapshot_blob.bin +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\v8_context_snapshot.bin +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\vk_swiftshader.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\vk_swiftshader_icd.json +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\vulkan-1.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.BrowserSubprocess.Core.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.BrowserSubprocess.Core.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.BrowserSubprocess.exe +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.BrowserSubprocess.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Example.exe.config +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Example.exe +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Example.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\DamnOverSharp.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.OffScreen.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Capture.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\CefSharp.Core.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D9.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.DXGI.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D10.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Mathematics.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Desktop.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D11.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct2D1.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D11.Effects.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.D3DCompiler.dll +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\DamnOverSharp.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\Capture.pdb +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\EasyHook.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D9.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.DXGI.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D10.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Mathematics.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Desktop.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D11.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct2D1.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.Direct3D11.Effects.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\bin\Release\SharpDX.D3DCompiler.xml +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.csproj.SuggestedBindingRedirects.cache +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Ingame\IngameControl.g.cs +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\MainWindow.g.cs +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\App.g.cs +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example_MarkupCompile.cache +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example_MarkupCompile.lref +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Ingame\IngameControl.baml +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\MainWindow.baml +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.g.resources +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.Properties.Resources.resources +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.csproj.GenerateResource.cache +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.csproj.CopyComplete +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.exe +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\Example.pdb diff --git a/Example/obj/Release/Example.csproj.GenerateResource.cache b/Example/obj/Release/Example.csproj.GenerateResource.cache new file mode 100644 index 0000000..0cf6b65 Binary files /dev/null and b/Example/obj/Release/Example.csproj.GenerateResource.cache differ diff --git a/Example/obj/Release/Example.csproj.SuggestedBindingRedirects.cache b/Example/obj/Release/Example.csproj.SuggestedBindingRedirects.cache new file mode 100644 index 0000000..e69de29 diff --git a/Example/obj/Release/Example.exe b/Example/obj/Release/Example.exe new file mode 100644 index 0000000..fc65f49 Binary files /dev/null and b/Example/obj/Release/Example.exe differ diff --git a/Example/obj/Release/Example.g.resources b/Example/obj/Release/Example.g.resources new file mode 100644 index 0000000..4bcae9b Binary files /dev/null and b/Example/obj/Release/Example.g.resources differ diff --git a/Example/obj/Release/Example.pdb b/Example/obj/Release/Example.pdb new file mode 100644 index 0000000..78ee975 Binary files /dev/null and b/Example/obj/Release/Example.pdb differ diff --git a/Example/obj/Release/Example_MarkupCompile.cache b/Example/obj/Release/Example_MarkupCompile.cache new file mode 100644 index 0000000..07e4980 --- /dev/null +++ b/Example/obj/Release/Example_MarkupCompile.cache @@ -0,0 +1,20 @@ +Example + + +winexe +C# +.cs +C:\Users\vitor\source\repos\DamnOverSharp\Example\obj\Release\ +Example +none +false +TRACE +C:\Users\vitor\source\repos\DamnOverSharp\Example\App.xaml +2-420063034 + +6398351564 +15782689300 +Ingame\IngameControl.xaml;MainWindow.xaml; + +False + diff --git a/Example/obj/Release/Example_MarkupCompile.lref b/Example/obj/Release/Example_MarkupCompile.lref new file mode 100644 index 0000000..57faa12 --- /dev/null +++ b/Example/obj/Release/Example_MarkupCompile.lref @@ -0,0 +1,5 @@ + + +FC:\Users\vitor\source\repos\DamnOverSharp\Example\Ingame\IngameControl.xaml;; +FC:\Users\vitor\source\repos\DamnOverSharp\Example\MainWindow.xaml;; + diff --git a/Example/obj/Release/Ingame/IngameControl.baml b/Example/obj/Release/Ingame/IngameControl.baml new file mode 100644 index 0000000..3154199 Binary files /dev/null and b/Example/obj/Release/Ingame/IngameControl.baml differ diff --git a/Example/obj/Release/Ingame/IngameControl.g.cs b/Example/obj/Release/Ingame/IngameControl.g.cs new file mode 100644 index 0000000..796e366 --- /dev/null +++ b/Example/obj/Release/Ingame/IngameControl.g.cs @@ -0,0 +1,124 @@ +#pragma checksum "..\..\..\Ingame\IngameControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7097A8A122C565177707B7DD4A36C56CC2890FF8B40D419B8929B7B09760826C" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// IngameControl + /// + public partial class IngameControl : DamnOverSharp.WPF.UiLibrary.VirtualControlBase, System.Windows.Markup.IComponentConnector { + + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea mouseCapture; + + #line default + #line hidden + + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton button; + + #line default + #line hidden + + + #line 22 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Image image; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/ingame/ingamecontrol.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Ingame\IngameControl.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.mouseCapture = ((DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea)(target)); + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + this.mouseCapture.VirtualMouseDrag += new System.EventHandler(this.mouseCapture_VirtualMouseDrag); + + #line default + #line hidden + return; + case 2: + this.button = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + this.button.Clicked += new System.EventHandler(this.VirtualButton_Clicked); + + #line default + #line hidden + return; + case 3: + this.image = ((System.Windows.Controls.Image)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Release/Ingame/IngameControl.g.i.cs b/Example/obj/Release/Ingame/IngameControl.g.i.cs new file mode 100644 index 0000000..796e366 --- /dev/null +++ b/Example/obj/Release/Ingame/IngameControl.g.i.cs @@ -0,0 +1,124 @@ +#pragma checksum "..\..\..\Ingame\IngameControl.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7097A8A122C565177707B7DD4A36C56CC2890FF8B40D419B8929B7B09760826C" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using DamnOverSharp.WPF.UiLibrary; +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// IngameControl + /// + public partial class IngameControl : DamnOverSharp.WPF.UiLibrary.VirtualControlBase, System.Windows.Markup.IComponentConnector { + + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea mouseCapture; + + #line default + #line hidden + + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal DamnOverSharp.WPF.UiLibrary.VirtualButton button; + + #line default + #line hidden + + + #line 22 "..\..\..\Ingame\IngameControl.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Image image; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/ingame/ingamecontrol.xaml", System.UriKind.Relative); + + #line 1 "..\..\..\Ingame\IngameControl.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.mouseCapture = ((DamnOverSharp.WPF.UiLibrary.VirtualMouseCaptureArea)(target)); + + #line 13 "..\..\..\Ingame\IngameControl.xaml" + this.mouseCapture.VirtualMouseDrag += new System.EventHandler(this.mouseCapture_VirtualMouseDrag); + + #line default + #line hidden + return; + case 2: + this.button = ((DamnOverSharp.WPF.UiLibrary.VirtualButton)(target)); + + #line 18 "..\..\..\Ingame\IngameControl.xaml" + this.button.Clicked += new System.EventHandler(this.VirtualButton_Clicked); + + #line default + #line hidden + return; + case 3: + this.image = ((System.Windows.Controls.Image)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Release/MainWindow.baml b/Example/obj/Release/MainWindow.baml new file mode 100644 index 0000000..fe2e03c Binary files /dev/null and b/Example/obj/Release/MainWindow.baml differ diff --git a/Example/obj/Release/MainWindow.g.cs b/Example/obj/Release/MainWindow.g.cs new file mode 100644 index 0000000..173921a --- /dev/null +++ b/Example/obj/Release/MainWindow.g.cs @@ -0,0 +1,121 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "716AF247A3CDD46D1350A60904C7D0F8B7EFE710242F4EAAEE73093D3CACBD3E" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 11 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox textbox_targetApp; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + + #line 8 "..\..\MainWindow.xaml" + ((Example.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed); + + #line default + #line hidden + return; + case 2: + this.textbox_targetApp = ((System.Windows.Controls.TextBox)(target)); + return; + case 3: + + #line 12 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowWPFOverlay_Clicked); + + #line default + #line hidden + return; + case 4: + + #line 13 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowChromiumOverlay_Clicked); + + #line default + #line hidden + return; + case 5: + + #line 14 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowBitmapOverlay_Clicked); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Release/MainWindow.g.i.cs b/Example/obj/Release/MainWindow.g.i.cs new file mode 100644 index 0000000..173921a --- /dev/null +++ b/Example/obj/Release/MainWindow.g.i.cs @@ -0,0 +1,121 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "716AF247A3CDD46D1350A60904C7D0F8B7EFE710242F4EAAEE73093D3CACBD3E" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using Example; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; + + +namespace Example { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 11 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox textbox_targetApp; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/Example;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + + #line 8 "..\..\MainWindow.xaml" + ((Example.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed); + + #line default + #line hidden + return; + case 2: + this.textbox_targetApp = ((System.Windows.Controls.TextBox)(target)); + return; + case 3: + + #line 12 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowWPFOverlay_Clicked); + + #line default + #line hidden + return; + case 4: + + #line 13 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowChromiumOverlay_Clicked); + + #line default + #line hidden + return; + case 5: + + #line 14 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ShowBitmapOverlay_Clicked); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/Example/obj/Release/TempPE/Properties.Resources.Designer.cs.dll b/Example/obj/Release/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..f8c5326 Binary files /dev/null and b/Example/obj/Release/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/Example/packages.config b/Example/packages.config new file mode 100644 index 0000000..172a161 --- /dev/null +++ b/Example/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/MouseKeyHook/Combination.cs b/MouseKeyHook/Combination.cs new file mode 100644 index 0000000..c33ab48 --- /dev/null +++ b/MouseKeyHook/Combination.cs @@ -0,0 +1,146 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Used to represent a key combination as frequently used in application as shortcuts. + /// e.g. Alt+Shift+R. This combination is triggered when 'R' is pressed after 'Alt' and 'Shift' are already down. + /// + public class Combination + { + private readonly Chord _chord; + + private Combination(Keys triggerKey, IEnumerable chordKeys) + : this(triggerKey, new Chord(chordKeys)) + { + } + + private Combination(Keys triggerKey, Chord chord) + { + TriggerKey = triggerKey.Normalize(); + _chord = chord; + } + + /// + /// Last key which triggers the combination. + /// + public Keys TriggerKey { get; } + + /// + /// Keys which all must be alredy down when trigger key is pressed. + /// + public IEnumerable Chord + { + get { return _chord; } + } + + /// + /// Number of chord (modifier) keys which must be already down when the trigger key is pressed. + /// + public int ChordLength + { + get { return _chord.Count; } + } + + /// + /// A chainable builder method to simplify chord creation. Used along with , + /// , , , . + /// + /// + public static Combination TriggeredBy(Keys key) + { + return new Combination(key, (IEnumerable) new Chord(Enumerable.Empty())); + } + + /// + /// A chainable builder method to simplify chord creation. Used along with , + /// , , , . + /// + /// + public Combination With(Keys key) + { + return new Combination(TriggerKey, Chord.Concat(Enumerable.Repeat(key, 1))); + } + + /// + /// A chainable builder method to simplify chord creation. Used along with , + /// , , , . + /// + public Combination Control() + { + return With(Keys.Control); + } + + /// + /// A chainable builder method to simplify chord creation. Used along with , + /// , , , . + /// + public Combination Alt() + { + return With(Keys.Alt); + } + + /// + /// A chainable builder method to simplify chord creation. Used along with , + /// , , , . + /// + public Combination Shift() + { + return With(Keys.Shift); + } + + + /// + public override string ToString() + { + return string.Join("+", Chord.Concat(Enumerable.Repeat(TriggerKey, 1))); + } + + /// + /// TriggeredBy a chord from any string like this 'Alt+Shift+R'. + /// Nothe that the trigger key must be the last one. + /// + public static Combination FromString(string trigger) + { + var parts = trigger + .Split('+') + .Select(p => Enum.Parse(typeof(Keys), p)) + .Cast(); + var stack = new Stack(parts); + var triggerKey = stack.Pop(); + return new Combination(triggerKey, stack); + } + + /// + protected bool Equals(Combination other) + { + return + TriggerKey == other.TriggerKey + && Chord.Equals(other.Chord); + } + + /// + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + return Equals((Combination) obj); + } + + /// + public override int GetHashCode() + { + return Chord.GetHashCode() ^ + (int) TriggerKey; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Hook.cs b/MouseKeyHook/Hook.cs new file mode 100644 index 0000000..b728087 --- /dev/null +++ b/MouseKeyHook/Hook.cs @@ -0,0 +1,38 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook +{ + /// + /// This is the class to start with. + /// + public static class Hook + { + /// + /// Here you find all application wide events. Both mouse and keyboard. + /// + /// + /// Returned instance is used for event subscriptions. + /// You can refetch it (you will get the same instance anyway). + /// + public static IKeyboardMouseEvents AppEvents() + { + return new AppEventFacade(); + } + + /// + /// Here you find all application wide events. Both mouse and keyboard. + /// + /// + /// Returned instance is used for event subscriptions. + /// You can refetch it (you will get the same instance anyway). + /// + public static IKeyboardMouseEvents GlobalEvents() + { + return new GlobalEventFacade(); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/HotKeys/HotKeyArgs.cs b/MouseKeyHook/HotKeys/HotKeyArgs.cs new file mode 100644 index 0000000..1e847c8 --- /dev/null +++ b/MouseKeyHook/HotKeys/HotKeyArgs.cs @@ -0,0 +1,28 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; + +namespace Gma.System.MouseKeyHook.HotKeys +{ + /// + /// The event arguments passed when a HotKeySet's OnHotKeysDownHold event is triggered. + /// + public sealed class HotKeyArgs : EventArgs + { + /// + /// Creates an instance of the HotKeyArgs. + /// Time when the event was triggered + /// + public HotKeyArgs(DateTime triggeredAt) + { + Time = triggeredAt; + } + + /// + /// Time when the event was triggered + /// + public DateTime Time { get; } + } +} \ No newline at end of file diff --git a/MouseKeyHook/HotKeys/HotKeySet.cs b/MouseKeyHook/HotKeys/HotKeySet.cs new file mode 100644 index 0000000..4fb2b3a --- /dev/null +++ b/MouseKeyHook/HotKeys/HotKeySet.cs @@ -0,0 +1,284 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook.HotKeys +{ + /// + /// An immutable set of Hot Keys that provides an event for when the set is activated. + /// + public class HotKeySet + { + /// + /// A delegate representing the signature for the OnHotKeysDownHold event + /// + /// + /// + public delegate void HotKeyHandler(object sender, HotKeyArgs e); + + private readonly Dictionary m_hotkeystate; //Keeps track of the status of the set of Keys + + /* + * Example of m_remapping: + * a single key from the set of Keys requested is chosen to be the reference key (aka primary key) + * + * m_remapping[ Keys.LShiftKey ] = Keys.LShiftKey + * m_remapping[ Keys.RShiftKey ] = Keys.LShiftKey + * + * This allows the m_hotkeystate to use a single key (primary key) from the set that will act on behalf of all the keys in the set, + * which in turn reduces to this: + * + * Keys k = Keys.RShiftKey + * Keys primaryKey = PrimaryKeyOf( k ) = Keys.LShiftKey + * m_hotkeystate[ primaryKey ] = true/false + */ + private readonly Dictionary m_remapping; //Used for mapping multiple keys to a single key + + private bool m_enabled = true; //enabled by default + + //These provide the actual status of whether a set is truly activated or not. + private int m_hotkeydowncount; //number of hot keys down + + private int m_remappingCount; + //the number of remappings, i.e., a set of mappings, not the individual count in m_remapping + + /// + /// Creates an instance of the HotKeySet class. Once created, the keys cannot be changed. + /// + /// Set of Hot Keys + public HotKeySet(IEnumerable hotkeys) + { + m_hotkeystate = new Dictionary(); + m_remapping = new Dictionary(); + HotKeys = hotkeys; + InitializeKeys(); + } + + /// + /// Enables the ability to name the set + /// + public string Name { get; set; } + + /// + /// Enables the ability to describe what the set is used for or supposed to do + /// + public string Description { get; set; } + + /// + /// Gets the set of hotkeys that this class handles. + /// + public IEnumerable HotKeys { get; } + + /// + /// Returns whether the set of Keys is activated + /// + public bool HotKeysActivated + { + get { return m_hotkeydowncount == m_hotkeystate.Count - m_remappingCount; } + } + + /// + /// Gets or sets the enabled state of the HotKey set. + /// + public bool Enabled + { + get { return m_enabled; } + set + { + if (value) + InitializeKeys(); //must get the actual current state of each key to update + + m_enabled = value; + } + } + + /// + /// Called as the user holds down the keys in the set. It is NOT triggered the first time the keys are set. + /// + /// + public event HotKeyHandler OnHotKeysDownHold; + + /// + /// Called whenever the hot key set is no longer active. This is essentially a KeyPress event, indicating that a full + /// key cycle has occurred, only for HotKeys because a single key removed from the set constitutes an incomplete set. + /// + public event HotKeyHandler OnHotKeysUp; + + /// + /// Called the first time the down keys are set. It does not get called throughout the duration the user holds it but + /// only the + /// first time it's activated. + /// + public event HotKeyHandler OnHotKeysDownOnce; + + /// + /// General invocation handler + /// + /// + private void InvokeHotKeyHandler(HotKeyHandler hotKeyDelegate) + { + if (hotKeyDelegate != null) + hotKeyDelegate(this, new HotKeyArgs(DateTime.Now)); + } + + /// + /// Adds the keys into the dictionary tracking the keys and gets the real-time status of the Keys + /// from the OS + /// + private void InitializeKeys() + { + foreach (var k in HotKeys) + { + if (m_hotkeystate.ContainsKey(k)) + m_hotkeystate.Add(k, false); + + //assign using the current state of the keyboard + m_hotkeystate[k] = KeyboardState.GetCurrent().IsDown(k); + } + } + + /// + /// Unregisters a previously set exclusive or based on the primary key. + /// + /// Any key used in the Registration method used to create an exclusive or set + /// + /// True if successful. False doesn't indicate a failure to unregister, it indicates that the Key is not + /// registered as an Exclusive Or key or it's not the Primary Key. + /// + public bool UnregisterExclusiveOrKey(Keys anyKeyInTheExclusiveOrSet) + { + var primaryKey = GetExclusiveOrPrimaryKey(anyKeyInTheExclusiveOrSet); + + if (primaryKey == Keys.None || !m_remapping.ContainsValue(primaryKey)) + return false; + + var keystoremove = new List(); + + foreach (var pair in m_remapping) + if (pair.Value == primaryKey) + keystoremove.Add(pair.Key); + + foreach (var k in keystoremove) + m_remapping.Remove(k); + + --m_remappingCount; + + return true; + } + + /// + /// Registers a group of Keys that are already part of the HotKeySet in order to provide better flexibility among keys. + /// + /// + /// HotKeySet hks = new HotKeySet( new [] { Keys.T, Keys.LShiftKey, Keys.RShiftKey } ); + /// RegisterExclusiveOrKey( new [] { Keys.LShiftKey, Keys.RShiftKey } ); + /// + /// allows either Keys.LShiftKey or Keys.RShiftKey to be combined with Keys.T. + /// + /// + /// + /// Primary key used for mapping or Keys.None on error + public Keys RegisterExclusiveOrKey(IEnumerable orKeySet) + { + //Verification first, so as to not leave the m_remapping with a partial set. + foreach (var k in orKeySet) + if (!m_hotkeystate.ContainsKey(k)) + return Keys.None; + + var i = 0; + var primaryKey = Keys.None; + + //Commit after verification + foreach (var k in orKeySet) + { + if (i == 0) + primaryKey = k; + + m_remapping[k] = primaryKey; + + ++i; + } + + //Must increase to keep a true count of how many keys are necessary for the activation to be true + ++m_remappingCount; + + return primaryKey; + } + + /// + /// Gets the primary key + /// + /// + /// The primary key if it exists, otherwise Keys.None + private Keys GetExclusiveOrPrimaryKey(Keys k) + { + return m_remapping.ContainsKey(k) ? m_remapping[k] : Keys.None; + } + + /// + /// Resolves obtaining the key used for state checking. + /// + /// + /// The primary key if it exists, otherwise the key entered + private Keys GetPrimaryKey(Keys k) + { + //If the key is remapped then get the primary keys + return m_remapping.ContainsKey(k) ? m_remapping[k] : k; + } + + /// + /// + /// + internal void OnKey(KeyEventArgsExt kex) + { + if (!Enabled) + return; + + //Gets the primary key if mapped to a single key or gets the key itself + var primaryKey = GetPrimaryKey(kex.KeyCode); + + if (kex.IsKeyDown) + OnKeyDown(primaryKey); + else //reset + OnKeyUp(primaryKey); + } + + private void OnKeyDown(Keys k) + { + //If the keys are activated still then keep invoking the event + if (HotKeysActivated) + { + InvokeHotKeyHandler(OnHotKeysDownHold); //Call the duration event + } + + //indicates the key's state is current false but the key is now down + else if (m_hotkeystate.ContainsKey(k) && !m_hotkeystate[k]) + { + m_hotkeystate[k] = true; //key's state is down + ++m_hotkeydowncount; //increase the number of keys down in this set + + if (HotKeysActivated) //because of the increase, check whether the set is activated + InvokeHotKeyHandler(OnHotKeysDownOnce); //Call the initial event + } + } + + private void OnKeyUp(Keys k) + { + if (m_hotkeystate.ContainsKey(k) && m_hotkeystate[k]) //indicates the key's state was down but now it's up + { + var wasActive = HotKeysActivated; + + m_hotkeystate[k] = false; //key's state is up + --m_hotkeydowncount; //this set is no longer ready + + if (wasActive) + InvokeHotKeyHandler(OnHotKeysUp); //call the KeyUp event because the set is no longer active + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/HotKeys/HotKeySetCollection.cs b/MouseKeyHook/HotKeys/HotKeySetCollection.cs new file mode 100644 index 0000000..479c7cd --- /dev/null +++ b/MouseKeyHook/HotKeys/HotKeySetCollection.cs @@ -0,0 +1,48 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Collections.Generic; + +namespace Gma.System.MouseKeyHook.HotKeys +{ + /// + /// A collection of HotKeySets + /// + public sealed class HotKeySetCollection : List + { + private KeyChainHandler m_keyChain; + + /// + /// Adds a HotKeySet to the collection. + /// + /// + public new void Add(HotKeySet hks) + { + m_keyChain += hks.OnKey; + base.Add(hks); + } + + /// + /// Removes the HotKeySet from the collection. + /// + /// + public new void Remove(HotKeySet hks) + { + m_keyChain -= hks.OnKey; + base.Remove(hks); + } + + /// + /// Uses a multi-case delegate to invoke individual HotKeySets if the Key is in use by any HotKeySets. + /// + /// + internal void OnKey(KeyEventArgsExt e) + { + if (m_keyChain != null) + m_keyChain(e); + } + + private delegate void KeyChainHandler(KeyEventArgsExt kex); + } +} \ No newline at end of file diff --git a/MouseKeyHook/HotKeys/HotKeySetsListener.cs b/MouseKeyHook/HotKeys/HotKeySetsListener.cs new file mode 100644 index 0000000..4c4ca9b --- /dev/null +++ b/MouseKeyHook/HotKeys/HotKeySetsListener.cs @@ -0,0 +1,4 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + diff --git a/MouseKeyHook/HotKeys/ReadMe.txt b/MouseKeyHook/HotKeys/ReadMe.txt new file mode 100644 index 0000000..12a3f83 --- /dev/null +++ b/MouseKeyHook/HotKeys/ReadMe.txt @@ -0,0 +1,85 @@ +Until a separate, full-featured test version is ready, here's a quick update that can be made to the TestFormHookListeners: + + //HotKeySetsListener inherits KeyboardHookListener + private readonly HotKeySetsListener m_KeyboardHookManager; + private readonly MouseHookListener m_MouseHookManager; + + public TestFormHookListeners() + { + InitializeComponent(); + //m_KeyboardHookManager = new KeyboardHookListener(new GlobalHooker()); + //m_KeyboardHookManager.Enabled = true; + + m_MouseHookManager = new MouseHookListener( new GlobalHooker() ) { Enabled = true }; + + HotKeySetCollection hkscoll = new HotKeySetCollection(); + m_KeyboardHookManager = new HotKeySetsListener( hkscoll, new GlobalHooker() ) { Enabled = true }; + + BuildHotKeyTests( hkscoll ); + } + + private void BuildHotKeyTests( HotKeySetCollection hkscoll ) + { + //Hot Keys are enabled by default. Use the Enabled property to adjust. + hkscoll.Add( BindHotKeySet( new[] { Keys.T, Keys.LShiftKey }, null, OnHotKeyDownOnce1, OnHotKeyDownHold1, OnHotKeyUp1, "test1" ) ); + hkscoll.Add( BindHotKeySet( new[] { Keys.T, Keys.LControlKey, Keys.RControlKey }, new[] { Keys.LControlKey, Keys.RControlKey }, OnHotKeyDownGeneral2, OnHotKeyDownGeneral2, OnHotKeyUp1, "test2" ) ); + } + + private static HotKeySet BindHotKeySet( IEnumerable ks, + IEnumerable xorKeys, + HotKeySet.HotKeyHandler onEventDownOnce, + HotKeySet.HotKeyHandler onEventDownHold, + HotKeySet.HotKeyHandler onEventUp, + string name ) + { + + //Declare ALL Keys that will be available in this set, including any keys you want to register as an either/or subset + HotKeySet hks = new HotKeySet( ks ); + + //Indicates that the keys in this array will be treated as an OR rather than AND: LShiftKey or RShiftKey + //The keys MUST be a subset of the ks Keys array. + if ( hks.RegisterExclusiveOrKey( xorKeys ) == Keys.None ) //Keys.None indicates an error + { + MessageBox.Show( null, @"Unable to register subset: " + String.Join( ", ", xorKeys ), + @"Subset registration error", MessageBoxButtons.OK, MessageBoxIcon.Error ); + } + + hks.OnHotKeysDownOnce += onEventDownOnce; //The first time the key is down + hks.OnHotKeysDownHold += onEventDownHold; //Fired as long as the user holds the hot keys down but is not fired the first time. + hks.OnHotKeysUp += onEventUp; //Whenever a key from the set is no longer being held down + + hks.Name = ( name ?? String.Empty ); + + return hks; + + } + + private void GeneralHotKeyEvent( object sender, DateTime timeTriggered, string eventType ) + { + HotKeySet hks = sender as HotKeySet; + string kstring = String.Join( ", ", hks.HotKeys ); + Log( String.Format( "{0}: {2} {1} - {3}\r\n", timeTriggered.TimeOfDay, eventType, hks.Name, kstring ) ); + } + + private void OnHotKeyDownGeneral2( object sender, HotKeyArgs e ) + { + GeneralHotKeyEvent( sender, e.Time, "ONCE/HOLD" ); + } + + private void OnHotKeyDownOnce1( object sender, HotKeyArgs e ) + { + GeneralHotKeyEvent( sender, e.Time, "ONCE" ); + } + + private void OnHotKeyDownHold1( object sender, HotKeyArgs e ) + { + GeneralHotKeyEvent( sender, e.Time, "HOLD" ); + } + + private void OnHotKeyUp1( object sender, HotKeyArgs e ) + { + GeneralHotKeyEvent( sender, e.Time, "UP" ); + } + + + diff --git a/MouseKeyHook/IKeyboardEvents.cs b/MouseKeyHook/IKeyboardEvents.cs new file mode 100644 index 0000000..700cb04 --- /dev/null +++ b/MouseKeyHook/IKeyboardEvents.cs @@ -0,0 +1,50 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides keyboard events + /// + public interface IKeyboardEvents + { + /// + /// Occurs when a key is pressed. + /// + event KeyEventHandler KeyDown; + + /// + /// Occurs when a key is pressed. + /// + /// + /// Key events occur in the following order: + /// + /// KeyDown + /// KeyPress + /// KeyDownTxt + /// KeyUp + /// + /// The KeyPress event is not raised by non-character keys; however, the non-character keys do raise the KeyDown and + /// KeyUp events. + /// Use the KeyChar property to sample keystrokes at run time and to consume or modify a subset of common keystrokes. + /// To handle keyboard events only in your application and not enable other applications to receive keyboard events, + /// set the property in your form's KeyPress event-handling method to + /// true. + /// + event KeyPressEventHandler KeyPress; + + /// + /// Occurs when a key is pressed, includes the keystroke characters if any + /// + event EventHandler KeyDownTxt; + + /// + /// Occurs when a key is released. + /// + event KeyEventHandler KeyUp; + } +} \ No newline at end of file diff --git a/MouseKeyHook/IKeyboardMouseEvents.cs b/MouseKeyHook/IKeyboardMouseEvents.cs new file mode 100644 index 0000000..be5b230 --- /dev/null +++ b/MouseKeyHook/IKeyboardMouseEvents.cs @@ -0,0 +1,15 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides keyboard and mouse events. + /// + public interface IKeyboardMouseEvents : IKeyboardEvents, IMouseEvents, IDisposable + { + } +} \ No newline at end of file diff --git a/MouseKeyHook/IMouseEvents.cs b/MouseKeyHook/IMouseEvents.cs new file mode 100644 index 0000000..232112e --- /dev/null +++ b/MouseKeyHook/IMouseEvents.cs @@ -0,0 +1,124 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides all mouse events. + /// + public interface IMouseEvents + { + /// + /// Occurs when the mouse pointer is moved. + /// + event MouseEventHandler MouseMove; + + /// + /// Occurs when the mouse pointer is moved. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse movement in other applications. + /// + event EventHandler MouseMoveExt; + + /// + /// Occurs when a click was performed by the mouse. + /// + event MouseEventHandler MouseClick; + + /// + /// Occurs when the mouse a mouse button is pressed. + /// + event MouseEventHandler MouseDown; + + /// + /// Occurs when the mouse a mouse button is pressed. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse click in other applications. + /// + event EventHandler MouseDownExt; + + /// + /// Occurs when a mouse button is released. + /// + event MouseEventHandler MouseUp; + + /// + /// Occurs when a mouse button is released. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse click in other applications. + /// + event EventHandler MouseUpExt; + + + /// + /// Occurs when the mouse wheel moves. + /// + event MouseEventHandler MouseWheel; + + /// + /// Occurs when the mouse wheel moves horizontally. + /// + event MouseEventHandler MouseHWheel; + + /// + /// Occurs when the mouse wheel moves. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse wheel moves in other applications. + /// + event EventHandler MouseWheelExt; + + /// + /// Occurs when the mouse wheel moves. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of horizontal mouse wheel moves in other applications. + /// + event EventHandler MouseHWheelExt; + + /// + /// Occurs when a mouse button is double-clicked. + /// + event MouseEventHandler MouseDoubleClick; + + /// + /// Occurs when a drag event has started (left button held down whilst moving more than the system drag threshold). + /// + event MouseEventHandler MouseDragStarted; + + /// + /// Occurs when a drag event has started (left button held down whilst moving more than the system drag threshold). + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse movement in other applications. + /// + event EventHandler MouseDragStartedExt; + + /// + /// Occurs when a drag event has completed. + /// + event MouseEventHandler MouseDragFinished; + + /// + /// Occurs when a drag event has completed. + /// + /// + /// This event provides extended arguments of type enabling you to + /// suppress further processing of mouse movement in other applications. + /// + event EventHandler MouseDragFinishedExt; + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/AppEventFacade.cs b/MouseKeyHook/Implementation/AppEventFacade.cs new file mode 100644 index 0000000..3b2ac51 --- /dev/null +++ b/MouseKeyHook/Implementation/AppEventFacade.cs @@ -0,0 +1,19 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class AppEventFacade : EventFacade + { + protected override MouseListener CreateMouseListener() + { + return new AppMouseListener(); + } + + protected override KeyListener CreateKeyListener() + { + return new AppKeyListener(); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/AppKeyListener.cs b/MouseKeyHook/Implementation/AppKeyListener.cs new file mode 100644 index 0000000..0eccf33 --- /dev/null +++ b/MouseKeyHook/Implementation/AppKeyListener.cs @@ -0,0 +1,27 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Collections.Generic; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class AppKeyListener : KeyListener + { + public AppKeyListener() + : base(HookHelper.HookAppKeyboard) + { + } + + protected override IEnumerable GetPressEventArgs(CallbackData data) + { + return KeyPressEventArgsExt.FromRawDataApp(data); + } + + protected override KeyEventArgsExt GetDownUpEventArgs(CallbackData data) + { + return KeyEventArgsExt.FromRawDataApp(data); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/AppMouseListener.cs b/MouseKeyHook/Implementation/AppMouseListener.cs new file mode 100644 index 0000000..3588560 --- /dev/null +++ b/MouseKeyHook/Implementation/AppMouseListener.cs @@ -0,0 +1,21 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class AppMouseListener : MouseListener + { + public AppMouseListener() + : base(HookHelper.HookAppMouse) + { + } + + protected override MouseEventExtArgs GetEventArgs(CallbackData data) + { + return MouseEventExtArgs.FromRawDataApp(data); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/BaseListener.cs b/MouseKeyHook/Implementation/BaseListener.cs new file mode 100644 index 0000000..338df57 --- /dev/null +++ b/MouseKeyHook/Implementation/BaseListener.cs @@ -0,0 +1,26 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal abstract class BaseListener : IDisposable + { + protected BaseListener(Subscribe subscribe) + { + Handle = subscribe(Callback); + } + + protected HookResult Handle { get; set; } + + public void Dispose() + { + Handle.Dispose(); + } + + protected abstract bool Callback(CallbackData data); + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/ButtonSet.cs b/MouseKeyHook/Implementation/ButtonSet.cs new file mode 100644 index 0000000..5342562 --- /dev/null +++ b/MouseKeyHook/Implementation/ButtonSet.cs @@ -0,0 +1,33 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class ButtonSet + { + private MouseButtons m_Set; + + public ButtonSet() + { + m_Set = MouseButtons.None; + } + + public void Add(MouseButtons element) + { + m_Set |= element; + } + + public void Remove(MouseButtons element) + { + m_Set &= ~element; + } + + public bool Contains(MouseButtons element) + { + return (m_Set & element) != MouseButtons.None; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/Callback.cs b/MouseKeyHook/Implementation/Callback.cs new file mode 100644 index 0000000..685cf55 --- /dev/null +++ b/MouseKeyHook/Implementation/Callback.cs @@ -0,0 +1,10 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal delegate bool Callback(CallbackData data); +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/Chord.cs b/MouseKeyHook/Implementation/Chord.cs new file mode 100644 index 0000000..0edc936 --- /dev/null +++ b/MouseKeyHook/Implementation/Chord.cs @@ -0,0 +1,75 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class Chord : IEnumerable + { + private readonly Keys[] _keys; + + internal Chord(IEnumerable additionalKeys) + { + _keys = additionalKeys.Select(k => k.Normalize()).OrderBy(k => k).ToArray(); + } + + public int Count + { + get { return _keys.Length; } + } + + public IEnumerator GetEnumerator() + { + return _keys.Cast().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public override string ToString() + { + return string.Join("+", _keys); + } + + public static Chord FromString(string chord) + { + var parts = chord + .Split('+') + .Select(p => Enum.Parse(typeof(Keys), p)) + .Cast(); + var stack = new Stack(parts); + return new Chord(stack); + } + + protected bool Equals(Chord other) + { + if (_keys.Length != other._keys.Length) return false; + return _keys.SequenceEqual(other._keys); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + return Equals((Chord) obj); + } + + public override int GetHashCode() + { + unchecked + { + return (_keys.Length + 13) ^ + ((_keys.Length != 0 ? (int) _keys[0] ^ (int) _keys[_keys.Length - 1] : 0) * 397); + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/EventFacade.cs b/MouseKeyHook/Implementation/EventFacade.cs new file mode 100644 index 0000000..152e819 --- /dev/null +++ b/MouseKeyHook/Implementation/EventFacade.cs @@ -0,0 +1,162 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal abstract class EventFacade : IKeyboardMouseEvents + { + private KeyListener m_KeyListenerCache; + private MouseListener m_MouseListenerCache; + + public event KeyEventHandler KeyDown + { + add { GetKeyListener().KeyDown += value; } + remove { GetKeyListener().KeyDown -= value; } + } + + public event KeyPressEventHandler KeyPress + { + add { GetKeyListener().KeyPress += value; } + remove { GetKeyListener().KeyPress -= value; } + } + + public event EventHandler KeyDownTxt + { + add { GetKeyListener().KeyDownTxt += value; } + remove { GetKeyListener().KeyDownTxt -= value; } + } + + public event KeyEventHandler KeyUp + { + add { GetKeyListener().KeyUp += value; } + remove { GetKeyListener().KeyUp -= value; } + } + + public event MouseEventHandler MouseMove + { + add { GetMouseListener().MouseMove += value; } + remove { GetMouseListener().MouseMove -= value; } + } + + public event EventHandler MouseMoveExt + { + add { GetMouseListener().MouseMoveExt += value; } + remove { GetMouseListener().MouseMoveExt -= value; } + } + + public event MouseEventHandler MouseClick + { + add { GetMouseListener().MouseClick += value; } + remove { GetMouseListener().MouseClick -= value; } + } + + public event MouseEventHandler MouseDown + { + add { GetMouseListener().MouseDown += value; } + remove { GetMouseListener().MouseDown -= value; } + } + + public event EventHandler MouseDownExt + { + add { GetMouseListener().MouseDownExt += value; } + remove { GetMouseListener().MouseDownExt -= value; } + } + + public event MouseEventHandler MouseUp + { + add { GetMouseListener().MouseUp += value; } + remove { GetMouseListener().MouseUp -= value; } + } + + public event EventHandler MouseUpExt + { + add { GetMouseListener().MouseUpExt += value; } + remove { GetMouseListener().MouseUpExt -= value; } + } + + public event MouseEventHandler MouseWheel + { + add { GetMouseListener().MouseWheel += value; } + remove { GetMouseListener().MouseWheel -= value; } + } + + public event EventHandler MouseWheelExt + { + add { GetMouseListener().MouseWheelExt += value; } + remove { GetMouseListener().MouseWheelExt -= value; } + } + + public event MouseEventHandler MouseHWheel + { + add { GetMouseListener().MouseHWheel += value; } + remove { GetMouseListener().MouseHWheel -= value; } + } + + public event EventHandler MouseHWheelExt + { + add { GetMouseListener().MouseHWheelExt += value; } + remove { GetMouseListener().MouseHWheelExt -= value; } + } + + public event MouseEventHandler MouseDoubleClick + { + add { GetMouseListener().MouseDoubleClick += value; } + remove { GetMouseListener().MouseDoubleClick -= value; } + } + + public event MouseEventHandler MouseDragStarted + { + add { GetMouseListener().MouseDragStarted += value; } + remove { GetMouseListener().MouseDragStarted -= value; } + } + + public event EventHandler MouseDragStartedExt + { + add { GetMouseListener().MouseDragStartedExt += value; } + remove { GetMouseListener().MouseDragStartedExt -= value; } + } + + public event MouseEventHandler MouseDragFinished + { + add { GetMouseListener().MouseDragFinished += value; } + remove { GetMouseListener().MouseDragFinished -= value; } + } + + public event EventHandler MouseDragFinishedExt + { + add { GetMouseListener().MouseDragFinishedExt += value; } + remove { GetMouseListener().MouseDragFinishedExt -= value; } + } + + public void Dispose() + { + if (m_MouseListenerCache != null) m_MouseListenerCache.Dispose(); + if (m_KeyListenerCache != null) m_KeyListenerCache.Dispose(); + } + + private KeyListener GetKeyListener() + { + var target = m_KeyListenerCache; + if (target != null) return target; + target = CreateKeyListener(); + m_KeyListenerCache = target; + return target; + } + + private MouseListener GetMouseListener() + { + var target = m_MouseListenerCache; + if (target != null) return target; + target = CreateMouseListener(); + m_MouseListenerCache = target; + return target; + } + + protected abstract MouseListener CreateMouseListener(); + protected abstract KeyListener CreateKeyListener(); + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/GlobalEventFacade.cs b/MouseKeyHook/Implementation/GlobalEventFacade.cs new file mode 100644 index 0000000..a7a772b --- /dev/null +++ b/MouseKeyHook/Implementation/GlobalEventFacade.cs @@ -0,0 +1,19 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class GlobalEventFacade : EventFacade + { + protected override MouseListener CreateMouseListener() + { + return new GlobalMouseListener(); + } + + protected override KeyListener CreateKeyListener() + { + return new GlobalKeyListener(); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/GlobalKeyListener.cs b/MouseKeyHook/Implementation/GlobalKeyListener.cs new file mode 100644 index 0000000..9f78345 --- /dev/null +++ b/MouseKeyHook/Implementation/GlobalKeyListener.cs @@ -0,0 +1,27 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Collections.Generic; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class GlobalKeyListener : KeyListener + { + public GlobalKeyListener() + : base(HookHelper.HookGlobalKeyboard) + { + } + + protected override IEnumerable GetPressEventArgs(CallbackData data) + { + return KeyPressEventArgsExt.FromRawDataGlobal(data); + } + + protected override KeyEventArgsExt GetDownUpEventArgs(CallbackData data) + { + return KeyEventArgsExt.FromRawDataGlobal(data); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/GlobalMouseListener.cs b/MouseKeyHook/Implementation/GlobalMouseListener.cs new file mode 100644 index 0000000..178102d --- /dev/null +++ b/MouseKeyHook/Implementation/GlobalMouseListener.cs @@ -0,0 +1,75 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal class GlobalMouseListener : MouseListener + { + private readonly int m_SystemDoubleClickTime; + private readonly int m_xDoubleClickThreshold; + private readonly int m_yDoubleClickThreshold; + private MouseButtons m_PreviousClicked; + private Point m_PreviousClickedPosition; + private int m_PreviousClickedTime; + + public GlobalMouseListener() + : base(HookHelper.HookGlobalMouse) + { + m_SystemDoubleClickTime = MouseNativeMethods.GetDoubleClickTime(); + m_xDoubleClickThreshold = NativeMethods.GetXDoubleClickThreshold(); + m_yDoubleClickThreshold = NativeMethods.GetYDoubleClickThreshold(); + } + + protected override void ProcessDown(ref MouseEventExtArgs e) + { + if (IsDoubleClick(e)) + e = e.ToDoubleClickEventArgs(); + else + StartDoubleClickWaiting(e); + base.ProcessDown(ref e); + } + + protected override void ProcessUp(ref MouseEventExtArgs e) + { + base.ProcessUp(ref e); + if (e.Clicks == 2) + StopDoubleClickWaiting(); + } + + private void StartDoubleClickWaiting(MouseEventExtArgs e) + { + m_PreviousClicked = e.Button; + m_PreviousClickedTime = e.Timestamp; + m_PreviousClickedPosition = e.Point; + } + + private void StopDoubleClickWaiting() + { + m_PreviousClicked = MouseButtons.None; + m_PreviousClickedTime = 0; + m_PreviousClickedPosition = m_UninitialisedPoint; + } + + private bool IsDoubleClick(MouseEventExtArgs e) + { + var isXMoving = Math.Abs(e.Point.X - m_PreviousClickedPosition.X) > m_xDoubleClickThreshold; + var isYMoving = Math.Abs(e.Point.Y - m_PreviousClickedPosition.Y) > m_yDoubleClickThreshold; + + return + e.Button == m_PreviousClicked && + !isXMoving && + !isYMoving && + e.Timestamp - m_PreviousClickedTime <= m_SystemDoubleClickTime; + } + + protected override MouseEventExtArgs GetEventArgs(CallbackData data) + { + return MouseEventExtArgs.FromRawDataGlobal(data); + } + } +} diff --git a/MouseKeyHook/Implementation/KeyListener.cs b/MouseKeyHook/Implementation/KeyListener.cs new file mode 100644 index 0000000..fa0ce88 --- /dev/null +++ b/MouseKeyHook/Implementation/KeyListener.cs @@ -0,0 +1,89 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal abstract class KeyListener : BaseListener, IKeyboardEvents + { + protected KeyListener(Subscribe subscribe) + : base(subscribe) + { + } + + public event KeyEventHandler KeyDown; + public event KeyPressEventHandler KeyPress; + public event EventHandler KeyDownTxt; + public event KeyEventHandler KeyUp; + + public void InvokeKeyDown(KeyEventArgsExt e) + { + var handler = KeyDown; + if (handler == null || e.Handled || !e.IsKeyDown) + return; + handler(this, e); + } + + public void InvokeKeyPress(KeyPressEventArgsExt e) + { + var handler = KeyPress; + if (handler == null || e.Handled || e.IsNonChar) + return; + handler(this, e); + } + + public void InvokeKeyDownTxt(KeyDownTxtEventArgs e) + { + var handler = KeyDownTxt; + if (handler == null || e.KeyEvent.Handled || !e.KeyEvent.IsKeyDown) + return; + handler(this, e); + } + + public void InvokeKeyUp(KeyEventArgsExt e) + { + var handler = KeyUp; + if (handler == null || e.Handled || !e.IsKeyUp) + return; + handler(this, e); + } + + protected override bool Callback(CallbackData data) + { + var eDownUp = GetDownUpEventArgs(data); + + InvokeKeyDown(eDownUp); + + if (KeyPress != null || KeyDownTxt != null) + { + var pressEventArgs = GetPressEventArgs(data).ToList(); + + foreach (var pressEventArg in pressEventArgs) + InvokeKeyPress(pressEventArg); + + var downTxtEventArgs = GetDownTxtEventArgs(eDownUp, pressEventArgs); + InvokeKeyDownTxt(downTxtEventArgs); + } + + InvokeKeyUp(eDownUp); + + return !eDownUp.Handled; + } + + private KeyDownTxtEventArgs GetDownTxtEventArgs(KeyEventArgsExt eDownUp, IEnumerable pressEventArgs) + { + var charsCollection = pressEventArgs.Where(e => !e.IsNonChar).Select(e => e.KeyChar); + var chars = string.Join(string.Empty, charsCollection); + return new KeyDownTxtEventArgs(eDownUp, chars); + } + + protected abstract IEnumerable GetPressEventArgs(CallbackData data); + protected abstract KeyEventArgsExt GetDownUpEventArgs(CallbackData data); + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/KeyboardState.cs b/MouseKeyHook/Implementation/KeyboardState.cs new file mode 100644 index 0000000..9c7837f --- /dev/null +++ b/MouseKeyHook/Implementation/KeyboardState.cs @@ -0,0 +1,112 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + /// + /// Contains a snapshot of a keyboard state at certain moment and provides methods + /// of querying whether specific keys are pressed or locked. + /// + /// + /// This class is basically a managed wrapper of GetKeyboardState API function + /// http://msdn.microsoft.com/en-us/library/ms646299 + /// + public class KeyboardState + { + private readonly byte[] m_KeyboardStateNative; + + private KeyboardState(byte[] keyboardStateNative) + { + m_KeyboardStateNative = keyboardStateNative; + } + + /// + /// Makes a snapshot of a keyboard state to the moment of call and returns an + /// instance of class. + /// + /// An instance of class representing a snapshot of keyboard state at certain moment. + public static KeyboardState GetCurrent() + { + var keyboardStateNative = new byte[256]; + KeyboardNativeMethods.GetKeyboardState(keyboardStateNative); + return new KeyboardState(keyboardStateNative); + } + + internal byte[] GetNativeState() + { + return m_KeyboardStateNative; + } + + /// + /// Indicates whether specified key was down at the moment when snapshot was created or not. + /// + /// Key (corresponds to the virtual code of the key) + /// true if key was down, false - if key was up. + public bool IsDown(Keys key) + { + if ((int)key < 256) return IsDownRaw(key); + if (key == Keys.Alt) return IsDownRaw(Keys.LMenu) || IsDownRaw(Keys.RMenu); + if (key == Keys.Shift) return IsDownRaw(Keys.LShiftKey) || IsDownRaw(Keys.RShiftKey); + if (key == Keys.Control) return IsDownRaw(Keys.LControlKey) || IsDownRaw(Keys.RControlKey); + return false; + } + + private bool IsDownRaw(Keys key) + { + var keyState = GetKeyState(key); + var isDown = GetHighBit(keyState); + return isDown; + } + + /// + /// Indicate weather specified key was toggled at the moment when snapshot was created or not. + /// + /// Key (corresponds to the virtual code of the key) + /// + /// true if toggle key like (CapsLock, NumLocke, etc.) was on. false if it was off. + /// Ordinal (non toggle) keys return always false. + /// + public bool IsToggled(Keys key) + { + var keyState = GetKeyState(key); + var isToggled = GetLowBit(keyState); + return isToggled; + } + + /// + /// Indicates weather every of specified keys were down at the moment when snapshot was created. + /// The method returns false if even one of them was up. + /// + /// Keys to verify whether they were down or not. + /// true - all were down. false - at least one was up. + public bool AreAllDown(IEnumerable keys) + { + return keys.All(IsDown); + } + + private byte GetKeyState(Keys key) + { + var virtualKeyCode = (int) key; + if (virtualKeyCode < 0 || virtualKeyCode > 255) + throw new ArgumentOutOfRangeException("key", key, "The value must be between 0 and 255."); + return m_KeyboardStateNative[virtualKeyCode]; + } + + private static bool GetHighBit(byte value) + { + return value >> 7 != 0; + } + + private static bool GetLowBit(byte value) + { + return (value & 1) != 0; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/KeysExtensions.cs b/MouseKeyHook/Implementation/KeysExtensions.cs new file mode 100644 index 0000000..07e4068 --- /dev/null +++ b/MouseKeyHook/Implementation/KeysExtensions.cs @@ -0,0 +1,22 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Windows.Forms; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal static class KeysExtensions + { + public static Keys Normalize(this Keys key) + { + if ((key & Keys.LControlKey) == Keys.LControlKey || + (key & Keys.RControlKey) == Keys.RControlKey) return Keys.Control; + if ((key & Keys.LShiftKey) == Keys.LShiftKey || + (key & Keys.RShiftKey) == Keys.RShiftKey) return Keys.Shift; + if ((key & Keys.LMenu) == Keys.LMenu || + (key & Keys.RMenu) == Keys.RMenu) return Keys.Alt; + return key; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/Implementation/MouseListener.cs b/MouseKeyHook/Implementation/MouseListener.cs new file mode 100644 index 0000000..0763359 --- /dev/null +++ b/MouseKeyHook/Implementation/MouseListener.cs @@ -0,0 +1,317 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + // Because it is a P/Invoke method, 'GetSystemMetrics(int)' + // should be defined in a class named NativeMethods, SafeNativeMethods, + // or UnsafeNativeMethods. + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx + internal static class NativeMethods + { + private const int SM_CXDRAG = 68; + private const int SM_CYDRAG = 69; + private const int SM_CXDOUBLECLK = 36; + private const int SM_CYDOUBLECLK = 37; + + [DllImport("user32.dll")] + private static extern int GetSystemMetrics(int index); + + public static int GetXDragThreshold() + { + return GetSystemMetrics(SM_CXDRAG); + } + + public static int GetYDragThreshold() + { + return GetSystemMetrics(SM_CYDRAG); + } + + public static int GetXDoubleClickThreshold() + { + return GetSystemMetrics(SM_CXDOUBLECLK) / 2 + 1; + } + + public static int GetYDoubleClickThreshold() + { + return GetSystemMetrics(SM_CYDOUBLECLK) / 2 + 1; + } + } + + internal abstract class MouseListener : BaseListener, IMouseEvents + { + private readonly ButtonSet m_DoubleDown; + private readonly ButtonSet m_SingleDown; + protected readonly Point m_UninitialisedPoint = new Point(-99999, -99999); + private readonly int m_xDragThreshold; + private readonly int m_yDragThreshold; + private Point m_DragStartPosition; + + private bool m_IsDragging; + + private Point m_PreviousPosition; + + protected MouseListener(Subscribe subscribe) + : base(subscribe) + { + m_xDragThreshold = NativeMethods.GetXDragThreshold(); + m_yDragThreshold = NativeMethods.GetYDragThreshold(); + m_IsDragging = false; + + m_PreviousPosition = m_UninitialisedPoint; + m_DragStartPosition = m_UninitialisedPoint; + + m_DoubleDown = new ButtonSet(); + m_SingleDown = new ButtonSet(); + } + + public event MouseEventHandler MouseMove; + public event EventHandler MouseMoveExt; + public event MouseEventHandler MouseClick; + public event MouseEventHandler MouseDown; + public event EventHandler MouseDownExt; + public event MouseEventHandler MouseUp; + public event EventHandler MouseUpExt; + public event MouseEventHandler MouseWheel; + public event EventHandler MouseWheelExt; + public event MouseEventHandler MouseHWheel; + public event EventHandler MouseHWheelExt; + public event MouseEventHandler MouseDoubleClick; + public event MouseEventHandler MouseDragStarted; + public event EventHandler MouseDragStartedExt; + public event MouseEventHandler MouseDragFinished; + public event EventHandler MouseDragFinishedExt; + + protected override bool Callback(CallbackData data) + { + var e = GetEventArgs(data); + + if (e.IsMouseButtonDown) + ProcessDown(ref e); + + if (e.IsMouseButtonUp) + ProcessUp(ref e); + + if (e.WheelScrolled) + { + if (e.IsHorizontalWheel) + ProcessHWheel(ref e); + else + ProcessWheel(ref e); + } + + if (HasMoved(e.Point)) + ProcessMove(ref e); + + ProcessDrag(ref e); + + return !e.Handled; + } + + protected abstract MouseEventExtArgs GetEventArgs(CallbackData data); + + protected virtual void ProcessWheel(ref MouseEventExtArgs e) + { + OnWheel(e); + OnWheelExt(e); + } + + protected virtual void ProcessHWheel(ref MouseEventExtArgs e) + { + OnHWheel(e); + OnHWheelExt(e); + } + + protected virtual void ProcessDown(ref MouseEventExtArgs e) + { + OnDown(e); + OnDownExt(e); + if (e.Handled) + return; + + if (e.Clicks == 2) + m_DoubleDown.Add(e.Button); + + if (e.Clicks == 1) + m_SingleDown.Add(e.Button); + } + + protected virtual void ProcessUp(ref MouseEventExtArgs e) + { + OnUp(e); + OnUpExt(e); + if (e.Handled) + return; + + if (m_SingleDown.Contains(e.Button)) + { + OnClick(e); + m_SingleDown.Remove(e.Button); + } + + if (m_DoubleDown.Contains(e.Button)) + { + e = e.ToDoubleClickEventArgs(); + OnDoubleClick(e); + m_DoubleDown.Remove(e.Button); + } + } + + private void ProcessMove(ref MouseEventExtArgs e) + { + m_PreviousPosition = e.Point; + + OnMove(e); + OnMoveExt(e); + } + + private void ProcessDrag(ref MouseEventExtArgs e) + { + if (m_SingleDown.Contains(MouseButtons.Left)) + { + if (m_DragStartPosition.Equals(m_UninitialisedPoint)) + m_DragStartPosition = e.Point; + + ProcessDragStarted(ref e); + } + else + { + m_DragStartPosition = m_UninitialisedPoint; + ProcessDragFinished(ref e); + } + } + + private void ProcessDragStarted(ref MouseEventExtArgs e) + { + if (!m_IsDragging) + { + var isXDragging = Math.Abs(e.Point.X - m_DragStartPosition.X) > m_xDragThreshold; + var isYDragging = Math.Abs(e.Point.Y - m_DragStartPosition.Y) > m_yDragThreshold; + m_IsDragging = isXDragging || isYDragging; + + if (m_IsDragging) + { + OnDragStarted(e); + OnDragStartedExt(e); + } + } + } + + private void ProcessDragFinished(ref MouseEventExtArgs e) + { + if (m_IsDragging) + { + OnDragFinished(e); + OnDragFinishedExt(e); + m_IsDragging = false; + } + } + + private bool HasMoved(Point actualPoint) + { + return m_PreviousPosition != actualPoint; + } + + protected virtual void OnMove(MouseEventArgs e) + { + var handler = MouseMove; + if (handler != null) handler(this, e); + } + + protected virtual void OnMoveExt(MouseEventExtArgs e) + { + var handler = MouseMoveExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnClick(MouseEventArgs e) + { + var handler = MouseClick; + if (handler != null) handler(this, e); + } + + protected virtual void OnDown(MouseEventArgs e) + { + var handler = MouseDown; + if (handler != null) handler(this, e); + } + + protected virtual void OnDownExt(MouseEventExtArgs e) + { + var handler = MouseDownExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnUp(MouseEventArgs e) + { + var handler = MouseUp; + if (handler != null) handler(this, e); + } + + protected virtual void OnUpExt(MouseEventExtArgs e) + { + var handler = MouseUpExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnWheel(MouseEventArgs e) + { + var handler = MouseWheel; + if (handler != null) handler(this, e); + } + + protected virtual void OnWheelExt(MouseEventExtArgs e) + { + var handler = MouseWheelExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnHWheel(MouseEventArgs e) + { + var handler = MouseHWheel; + if (handler != null) handler(this, e); + } + + protected virtual void OnHWheelExt(MouseEventExtArgs e) + { + var handler = MouseHWheelExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnDoubleClick(MouseEventArgs e) + { + var handler = MouseDoubleClick; + if (handler != null) handler(this, e); + } + + protected virtual void OnDragStarted(MouseEventArgs e) + { + var handler = MouseDragStarted; + if (handler != null) handler(this, e); + } + + protected virtual void OnDragStartedExt(MouseEventExtArgs e) + { + var handler = MouseDragStartedExt; + if (handler != null) handler(this, e); + } + + protected virtual void OnDragFinished(MouseEventArgs e) + { + var handler = MouseDragFinished; + if (handler != null) handler(this, e); + } + + protected virtual void OnDragFinishedExt(MouseEventExtArgs e) + { + var handler = MouseDragFinishedExt; + if (handler != null) handler(this, e); + } + } +} diff --git a/MouseKeyHook/Implementation/Subscribe.cs b/MouseKeyHook/Implementation/Subscribe.cs new file mode 100644 index 0000000..1dc4ee9 --- /dev/null +++ b/MouseKeyHook/Implementation/Subscribe.cs @@ -0,0 +1,10 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook.Implementation +{ + internal delegate HookResult Subscribe(Callback callbck); +} \ No newline at end of file diff --git a/MouseKeyHook/KeyCombinationExtensions.cs b/MouseKeyHook/KeyCombinationExtensions.cs new file mode 100644 index 0000000..de7fe4b --- /dev/null +++ b/MouseKeyHook/KeyCombinationExtensions.cs @@ -0,0 +1,108 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Linq; +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Extension methods to detect key combinations + /// + public static class KeyCombinationExtensions + { + /// + /// Detects a key or key combination and triggers the corresponding action. + /// + /// + /// An instance of Global or Application hook. Use or to + /// create it. + /// + /// + /// This map contains the list of key combinations mapped to corresponding actions. You can use a dictionary initilizer + /// to easily create it. + /// Whenever a listed combination will be detected a corresponding action will be triggered. + /// + /// + /// This optional action will be executed when some key was pressed but it was not part of any wanted combinations. + /// + public static void OnCombination(this IKeyboardEvents source, + IEnumerable> map, Action reset = null) + { + var watchlists = map.GroupBy(k => k.Key.TriggerKey) + .ToDictionary(g => g.Key, g => g.ToArray()); + source.KeyDown += (sender, e) => + { + KeyValuePair[] element; + var found = watchlists.TryGetValue(e.KeyCode, out element); + if (!found) + { + reset?.Invoke(); + return; + } + var state = KeyboardState.GetCurrent(); + var action = reset; + var maxLength = 0; + foreach (var current in element) + { + var matches = current.Key.Chord.All(state.IsDown); + if (!matches) continue; + if (maxLength > current.Key.ChordLength) continue; + maxLength = current.Key.ChordLength; + action = current.Value; + } + action?.Invoke(); + }; + } + + + /// + /// Detects a key or key combination sequence and triggers the corresponding action. + /// + /// + /// An instance of Global or Application hook. Use or + /// to create it. + /// + /// + /// This map contains the list of sequences mapped to corresponding actions. You can use a dictionary initilizer to + /// easily create it. + /// Whenever a listed sequnce will be detected a corresponding action will be triggered. If two or more sequences match + /// the longest one will be used. + /// Example: sequences may A,B,C and B,C might be detected simultanously if user pressed first A then B then C. In this + /// case only action corresponding + /// to 'A,B,C' will be triggered. + /// + public static void OnSequence(this IKeyboardEvents source, IEnumerable> map) + { + var actBySeq = map.ToArray(); + var endsWith = new Func, Sequence, bool>((chords, sequence) => + { + var skipCount = chords.Count - sequence.Length; + return skipCount >= 0 && chords.Skip(skipCount).SequenceEqual(sequence); + }); + + var max = actBySeq.Select(p => p.Key).Max(c => c.Length); + var min = actBySeq.Select(p => p.Key).Min(c => c.Length); + var buffer = new Queue(max); + + var wrapMap = actBySeq.SelectMany(p => p.Key).Select(c => new KeyValuePair(c, () => + { + buffer.Enqueue(c); + if (buffer.Count > max) buffer.Dequeue(); + if (buffer.Count < min) return; + //Invoke action corresponding to the longest matching sequence + actBySeq + .Where(pair => endsWith(buffer, pair.Key)) + .OrderBy(pair => pair.Key.Length) + .Select(pair => pair.Value) + .LastOrDefault() + ?.Invoke(); + })); + + OnCombination(source, wrapMap, buffer.Clear); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/KeyDownTxtEventArgs.cs b/MouseKeyHook/KeyDownTxtEventArgs.cs new file mode 100644 index 0000000..fec69d8 --- /dev/null +++ b/MouseKeyHook/KeyDownTxtEventArgs.cs @@ -0,0 +1,16 @@ +using System; + +namespace Gma.System.MouseKeyHook +{ + public class KeyDownTxtEventArgs : EventArgs + { + public KeyEventArgsExt KeyEvent { get; } + public string Chars { get; } + + public KeyDownTxtEventArgs(KeyEventArgsExt keyEvent, string chars) + { + KeyEvent = keyEvent; + Chars = chars ?? string.Empty; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/KeyEventArgsExt.cs b/MouseKeyHook/KeyEventArgsExt.cs new file mode 100644 index 0000000..3d4d505 --- /dev/null +++ b/MouseKeyHook/KeyEventArgsExt.cs @@ -0,0 +1,153 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.Implementation; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides extended argument data for the or + /// event. + /// + public class KeyEventArgsExt : KeyEventArgs + { + /// + /// Initializes a new instance of the class. + /// + /// + public KeyEventArgsExt(Keys keyData) + : base(keyData) + { + } + + internal KeyEventArgsExt(Keys keyData, int scanCode, int timestamp, bool isKeyDown, bool isKeyUp, + bool isExtendedKey) + : this(keyData) + { + ScanCode = scanCode; + Timestamp = timestamp; + IsKeyDown = isKeyDown; + IsKeyUp = isKeyUp; + IsExtendedKey = isExtendedKey; + } + + /// + /// The hardware scan code. + /// + public int ScanCode { get; } + + /// + /// The system tick count of when the event occurred. + /// + public int Timestamp { get; } + + /// + /// True if event signals key down.. + /// + public bool IsKeyDown { get; } + + /// + /// True if event signals key up. + /// + public bool IsKeyUp { get; } + + /// + /// True if event signals, that the key is an extended key + /// + public bool IsExtendedKey { get; } + + internal static KeyEventArgsExt FromRawDataApp(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + + //http://msdn.microsoft.com/en-us/library/ms644984(v=VS.85).aspx + + const uint maskKeydown = 0x40000000; // for bit 30 + const uint maskKeyup = 0x80000000; // for bit 31 + const uint maskExtendedKey = 0x1000000; // for bit 24 + + var timestamp = Environment.TickCount; + + var flags = (uint) lParam.ToInt64(); + + //bit 30 Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up. + var wasKeyDown = (flags & maskKeydown) > 0; + //bit 31 Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released. + var isKeyReleased = (flags & maskKeyup) > 0; + //bit 24 Specifies the extended key state. The value is 1 if the key is an extended key, otherwise the value is 0. + var isExtendedKey = (flags & maskExtendedKey) > 0; + + + var keyData = AppendModifierStates((Keys) wParam); + var scanCode = (int) (((flags & 0x10000) | (flags & 0x20000) | (flags & 0x40000) | (flags & 0x80000) | + (flags & 0x100000) | (flags & 0x200000) | (flags & 0x400000) | (flags & 0x800000)) >> + 16); + + var isKeyDown = !isKeyReleased; + var isKeyUp = wasKeyDown && isKeyReleased; + + return new KeyEventArgsExt(keyData, scanCode, timestamp, isKeyDown, isKeyUp, isExtendedKey); + } + + internal static KeyEventArgsExt FromRawDataGlobal(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + var keyboardHookStruct = + (KeyboardHookStruct) Marshal.PtrToStructure(lParam, typeof(KeyboardHookStruct)); + + var keyData = AppendModifierStates((Keys) keyboardHookStruct.VirtualKeyCode); + + var keyCode = (int) wParam; + var isKeyDown = keyCode == Messages.WM_KEYDOWN || keyCode == Messages.WM_SYSKEYDOWN; + var isKeyUp = keyCode == Messages.WM_KEYUP || keyCode == Messages.WM_SYSKEYUP; + + const uint maskExtendedKey = 0x1; + var isExtendedKey = (keyboardHookStruct.Flags & maskExtendedKey) > 0; + + return new KeyEventArgsExt(keyData, keyboardHookStruct.ScanCode, keyboardHookStruct.Time, isKeyDown, + isKeyUp, isExtendedKey); + } + + // # It is not possible to distinguish Keys.LControlKey and Keys.RControlKey when they are modifiers + // Check for Keys.Control instead + // Same for Shift and Alt(Menu) + // See more at http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms/2008-04/msg00127.html # + + // A shortcut to make life easier + private static bool CheckModifier(int vKey) + { + return (KeyboardNativeMethods.GetKeyState(vKey) & 0x8000) > 0; + } + + private static Keys AppendModifierStates(Keys keyData) + { + // Is Control being held down? + var control = CheckModifier(KeyboardNativeMethods.VK_CONTROL); + // Is Shift being held down? + var shift = CheckModifier(KeyboardNativeMethods.VK_SHIFT); + // Is Alt being held down? + var alt = CheckModifier(KeyboardNativeMethods.VK_MENU); + + // Windows keys + // # combine LWin and RWin key with other keys will potentially corrupt the data + // notable F5 | Keys.LWin == F12, see https://globalmousekeyhook.codeplex.com/workitem/1188 + // and the KeyEventArgs.KeyData don't recognize combined data either + + // Function (Fn) key + // # CANNOT determine state due to conversion inside keyboard + // See http://en.wikipedia.org/wiki/Fn_key#Technical_details # + + return keyData | + (control ? Keys.Control : Keys.None) | + (shift ? Keys.Shift : Keys.None) | + (alt ? Keys.Alt : Keys.None); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/KeyPressEventArgsExt.cs b/MouseKeyHook/KeyPressEventArgsExt.cs new file mode 100644 index 0000000..2e54390 --- /dev/null +++ b/MouseKeyHook/KeyPressEventArgsExt.cs @@ -0,0 +1,111 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.Implementation; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides extended data for the event. + /// + public class KeyPressEventArgsExt : KeyPressEventArgs + { + internal KeyPressEventArgsExt(char keyChar, int timestamp) + : base(keyChar) + { + IsNonChar = keyChar == (char) 0x0; + Timestamp = timestamp; + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// Character corresponding to the key pressed. 0 char if represents a system or functional non char + /// key. + /// + public KeyPressEventArgsExt(char keyChar) + : this(keyChar, Environment.TickCount) + { + } + + /// + /// True if represents a system or functional non char key. + /// + public bool IsNonChar { get; } + + /// + /// The system tick count of when the event occurred. + /// + public int Timestamp { get; } + + internal static IEnumerable FromRawDataApp(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + + //http://msdn.microsoft.com/en-us/library/ms644984(v=VS.85).aspx + + const uint maskKeydown = 0x40000000; // for bit 30 + const uint maskKeyup = 0x80000000; // for bit 31 + const uint maskScanCode = 0xff0000; // for bit 23-16 + + var flags = (uint) lParam.ToInt64(); + + //bit 30 Specifies the previous key state. The value is 1 if the key is down before the message is sent; it is 0 if the key is up. + var wasKeyDown = (flags & maskKeydown) > 0; + //bit 31 Specifies the transition state. The value is 0 if the key is being pressed and 1 if it is being released. + var isKeyReleased = (flags & maskKeyup) > 0; + + if (!wasKeyDown && !isKeyReleased) + yield break; + + var virtualKeyCode = (int) wParam; + var scanCode = checked((int) (flags & maskScanCode)); + const int fuState = 0; + + char[] chars; + + KeyboardNativeMethods.TryGetCharFromKeyboardState(virtualKeyCode, scanCode, fuState, out chars); + if (chars == null) yield break; + foreach (var ch in chars) + yield return new KeyPressEventArgsExt(ch); + } + + internal static IEnumerable FromRawDataGlobal(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + + if ((int) wParam != Messages.WM_KEYDOWN && (int) wParam != Messages.WM_SYSKEYDOWN) + yield break; + + var keyboardHookStruct = + (KeyboardHookStruct) Marshal.PtrToStructure(lParam, typeof(KeyboardHookStruct)); + + var virtualKeyCode = keyboardHookStruct.VirtualKeyCode; + var scanCode = keyboardHookStruct.ScanCode; + var fuState = keyboardHookStruct.Flags; + + if (virtualKeyCode == KeyboardNativeMethods.VK_PACKET) + { + var ch = (char) scanCode; + yield return new KeyPressEventArgsExt(ch, keyboardHookStruct.Time); + } + else + { + char[] chars; + KeyboardNativeMethods.TryGetCharFromKeyboardState(virtualKeyCode, scanCode, fuState, out chars); + if (chars == null) yield break; + foreach (var current in chars) + yield return new KeyPressEventArgsExt(current, keyboardHookStruct.Time); + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/MouseEventExtArgs.cs b/MouseKeyHook/MouseEventExtArgs.cs new file mode 100644 index 0000000..30b778d --- /dev/null +++ b/MouseKeyHook/MouseEventExtArgs.cs @@ -0,0 +1,219 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.WinApi; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Provides extended data for the MouseClickExt and MouseMoveExt events. + /// + public class MouseEventExtArgs : MouseEventArgs + { + /// + /// Initializes a new instance of the class. + /// + /// One of the MouseButtons values indicating which mouse button was pressed. + /// The number of times a mouse button was pressed. + /// The x and y coordinate of a mouse click, in pixels. + /// A signed count of the number of detents the wheel has rotated. + /// The system tick count when the event occurred. + /// True if event signals mouse button down. + /// True if event signals mouse button up. + /// True if event signals horizontal wheel action. + internal MouseEventExtArgs(MouseButtons buttons, int clicks, Point point, int delta, int timestamp, + bool isMouseButtonDown, bool isMouseButtonUp, bool isHorizontalWheel) + : base(buttons, clicks, point.X, point.Y, delta) + { + IsMouseButtonDown = isMouseButtonDown; + IsMouseButtonUp = isMouseButtonUp; + IsHorizontalWheel = isHorizontalWheel; + Timestamp = timestamp; + } + + /// + /// Set this property to true inside your event handler to prevent further processing of the event in other + /// applications. + /// + public bool Handled { get; set; } + + /// + /// True if event contains information about wheel scroll. + /// + public bool WheelScrolled + { + get { return Delta != 0; } + } + + /// + /// True if event signals a click. False if it was only a move or wheel scroll. + /// + public bool Clicked + { + get { return Clicks > 0; } + } + + /// + /// True if event signals mouse button down. + /// + public bool IsMouseButtonDown { get; } + + /// + /// True if event signals mouse button up. + /// + public bool IsMouseButtonUp { get; } + + /// + /// True if event signals horizontal wheel action. + /// + public bool IsHorizontalWheel { get; } + + /// + /// The system tick count of when the event occurred. + /// + public int Timestamp { get; } + + /// + /// + internal Point Point + { + get { return new Point(X, Y); } + } + + internal static MouseEventExtArgs FromRawDataApp(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + + var marshalledMouseStruct = + (AppMouseStruct) Marshal.PtrToStructure(lParam, typeof(AppMouseStruct)); + return FromRawDataUniversal(wParam, marshalledMouseStruct.ToMouseStruct()); + } + + internal static MouseEventExtArgs FromRawDataGlobal(CallbackData data) + { + var wParam = data.WParam; + var lParam = data.LParam; + + var marshalledMouseStruct = (MouseStruct) Marshal.PtrToStructure(lParam, typeof(MouseStruct)); + return FromRawDataUniversal(wParam, marshalledMouseStruct); + } + + /// + /// Creates from relevant mouse data. + /// + /// First Windows Message parameter. + /// A MouseStruct containing information from which to construct MouseEventExtArgs. + /// A new MouseEventExtArgs object. + private static MouseEventExtArgs FromRawDataUniversal(IntPtr wParam, MouseStruct mouseInfo) + { + var button = MouseButtons.None; + short mouseDelta = 0; + var clickCount = 0; + + var isMouseButtonDown = false; + var isMouseButtonUp = false; + var isHorizontalWheel = false; + + + switch ((long) wParam) + { + case Messages.WM_LBUTTONDOWN: + isMouseButtonDown = true; + button = MouseButtons.Left; + clickCount = 1; + break; + case Messages.WM_LBUTTONUP: + isMouseButtonUp = true; + button = MouseButtons.Left; + clickCount = 1; + break; + case Messages.WM_LBUTTONDBLCLK: + isMouseButtonDown = true; + button = MouseButtons.Left; + clickCount = 2; + break; + case Messages.WM_RBUTTONDOWN: + isMouseButtonDown = true; + button = MouseButtons.Right; + clickCount = 1; + break; + case Messages.WM_RBUTTONUP: + isMouseButtonUp = true; + button = MouseButtons.Right; + clickCount = 1; + break; + case Messages.WM_RBUTTONDBLCLK: + isMouseButtonDown = true; + button = MouseButtons.Right; + clickCount = 2; + break; + case Messages.WM_MBUTTONDOWN: + isMouseButtonDown = true; + button = MouseButtons.Middle; + clickCount = 1; + break; + case Messages.WM_MBUTTONUP: + isMouseButtonUp = true; + button = MouseButtons.Middle; + clickCount = 1; + break; + case Messages.WM_MBUTTONDBLCLK: + isMouseButtonDown = true; + button = MouseButtons.Middle; + clickCount = 2; + break; + case Messages.WM_MOUSEWHEEL: + isHorizontalWheel = false; + mouseDelta = mouseInfo.MouseData; + break; + case Messages.WM_MOUSEHWHEEL: + isHorizontalWheel = true; + mouseDelta = mouseInfo.MouseData; + break; + case Messages.WM_XBUTTONDOWN: + button = mouseInfo.MouseData == 1 + ? MouseButtons.XButton1 + : MouseButtons.XButton2; + isMouseButtonDown = true; + clickCount = 1; + break; + case Messages.WM_XBUTTONUP: + button = mouseInfo.MouseData == 1 + ? MouseButtons.XButton1 + : MouseButtons.XButton2; + isMouseButtonUp = true; + clickCount = 1; + break; + case Messages.WM_XBUTTONDBLCLK: + isMouseButtonDown = true; + button = mouseInfo.MouseData == 1 + ? MouseButtons.XButton1 + : MouseButtons.XButton2; + clickCount = 2; + break; + } + + var e = new MouseEventExtArgs( + button, + clickCount, + mouseInfo.Point, + mouseDelta, + mouseInfo.Timestamp, + isMouseButtonDown, + isMouseButtonUp, + isHorizontalWheel); + + return e; + } + + internal MouseEventExtArgs ToDoubleClickEventArgs() + { + return new MouseEventExtArgs(Button, 2, Point, Delta, Timestamp, IsMouseButtonDown, IsMouseButtonUp, IsHorizontalWheel); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/MouseKeyHook.csproj b/MouseKeyHook/MouseKeyHook.csproj new file mode 100644 index 0000000..68801f3 --- /dev/null +++ b/MouseKeyHook/MouseKeyHook.csproj @@ -0,0 +1,64 @@ + + + Local + 9.0.21022 + {F52AA97E-180A-40ED-8F2B-09080171D6C7} + Debug + AnyCPU + MouseKeyHook + Gma.System.MouseKeyHook + 5.6.1-alpha + false + Library + netcoreapp3.1;net462;net472 + true + Gma.System.MouseKeyHook + False + George Mamaladze + + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + + (c) George Mamaladze 2000-2020 + MouseKeyHook + git + + + false + 285212672 + false + DEBUG;TRACE + true + 4096 + false + false + false + false + false + 4 + full + + + false + 285212672 + false + TRACE + false + 4096 + false + true + false + false + false + 4 + none + + \ No newline at end of file diff --git a/MouseKeyHook/Properties/AssemblyInfo.cs b/MouseKeyHook/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..61274ec --- /dev/null +++ b/MouseKeyHook/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Runtime.InteropServices; + +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/MouseKeyHook/Sequence.cs b/MouseKeyHook/Sequence.cs new file mode 100644 index 0000000..5dc9527 --- /dev/null +++ b/MouseKeyHook/Sequence.cs @@ -0,0 +1,42 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Linq; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Describes key or key combination sequences. e.g. Control+Z,Z + /// + public class Sequence : SequenceBase + { + private Sequence(Combination[] combinations) : base(combinations) + { + } + + /// + /// Creates an instance of sequence object from parameters representing keys or key combinations. + /// + /// + /// + public static Sequence Of(params Combination[] combinations) + { + return new Sequence(combinations); + } + + /// + /// Creates an instance of sequnce object from string. + /// The string must contain comma ',' delimited list of strings describing keys or key combinations. + /// Examples: 'A,B,C' 'Alt+R,S', 'Shift+R,Alt+K' + /// + /// + /// + public static Sequence FromString(string text) + { + var parts = text.Split(','); + var combinations = parts.Select(Combination.FromString).ToArray(); + return new Sequence(combinations); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/SequenceBase.cs b/MouseKeyHook/SequenceBase.cs new file mode 100644 index 0000000..a3de256 --- /dev/null +++ b/MouseKeyHook/SequenceBase.cs @@ -0,0 +1,82 @@ +// This code is distributed under MIT license. +// Copyright (c) 2010-2018 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Gma.System.MouseKeyHook +{ + /// + /// Describes a sequence of generic objects. + /// + /// + public abstract class SequenceBase : IEnumerable + { + private readonly T[] _elements; + + /// + /// Creates an instance of sequnce from sequnce elements. + /// + /// + protected SequenceBase(params T[] elements) + { + _elements = elements; + } + + /// + /// Number of elements in the sequnce. + /// + public int Length + { + get { return _elements.Length; } + } + + /// + public IEnumerator GetEnumerator() + { + return _elements.Cast().GetEnumerator(); + } + + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + public override string ToString() + { + return string.Join(",", _elements); + } + + /// + protected bool Equals(SequenceBase other) + { + if (_elements.Length != other._elements.Length) return false; + return _elements.SequenceEqual(other._elements); + } + + /// + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + return Equals((SequenceBase) obj); + } + + /// + public override int GetHashCode() + { + unchecked + { + return (_elements.Length + 13) ^ + ((_elements.Length != 0 + ? _elements[0].GetHashCode() ^ _elements[_elements.Length - 1].GetHashCode() + : 0) * 397); + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/AppMouseStruct.cs b/MouseKeyHook/WinApi/AppMouseStruct.cs new file mode 100644 index 0000000..37dc8b1 --- /dev/null +++ b/MouseKeyHook/WinApi/AppMouseStruct.cs @@ -0,0 +1,67 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + /// + /// The AppMouseStruct structure contains information about a application-level mouse input event. + /// + /// + /// See full documentation at http://globalmousekeyhook.codeplex.com/wikipage?title=MouseStruct + /// + [StructLayout(LayoutKind.Explicit)] + internal struct AppMouseStruct + { + /// + /// Specifies a Point structure that contains the X- and Y-coordinates of the cursor, in screen coordinates. + /// + [FieldOffset(0x00)] public Point Point; + + /// + /// Specifies information associated with the message. + /// + /// + /// The possible values are: + /// + /// + /// 0 - No Information + /// + /// + /// 1 - X-Button1 Click + /// + /// + /// 2 - X-Button2 Click + /// + /// + /// 120 - Mouse Scroll Away from User + /// + /// + /// -120 - Mouse Scroll Toward User + /// + /// + /// + [FieldOffset(0x16)] public short MouseData_x86; + + [FieldOffset(0x22)] public short MouseData_x64; + + /// + /// Converts the current into a . + /// + /// + /// + /// The AppMouseStruct does not have a timestamp, thus one is generated at the time of this call. + /// + public MouseStruct ToMouseStruct() + { + var tmp = new MouseStruct(); + tmp.Point = Point; + tmp.MouseData = IntPtr.Size == 4 ? MouseData_x86 : MouseData_x64; + tmp.Timestamp = Environment.TickCount; + return tmp; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/CallbackData.cs b/MouseKeyHook/WinApi/CallbackData.cs new file mode 100644 index 0000000..8fa1885 --- /dev/null +++ b/MouseKeyHook/WinApi/CallbackData.cs @@ -0,0 +1,21 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal struct CallbackData + { + public CallbackData(IntPtr wParam, IntPtr lParam) + { + WParam = wParam; + LParam = lParam; + } + + public IntPtr WParam { get; } + + public IntPtr LParam { get; } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookHelper.cs b/MouseKeyHook/WinApi/HookHelper.cs new file mode 100644 index 0000000..a225c24 --- /dev/null +++ b/MouseKeyHook/WinApi/HookHelper.cs @@ -0,0 +1,96 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.InteropServices; +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class HookHelper + { + private static HookProcedure _appHookProc; + private static HookProcedure _globalHookProc; + + public static HookResult HookAppMouse(Callback callback) + { + return HookApp(HookIds.WH_MOUSE, callback); + } + + public static HookResult HookAppKeyboard(Callback callback) + { + return HookApp(HookIds.WH_KEYBOARD, callback); + } + + public static HookResult HookGlobalMouse(Callback callback) + { + return HookGlobal(HookIds.WH_MOUSE_LL, callback); + } + + public static HookResult HookGlobalKeyboard(Callback callback) + { + return HookGlobal(HookIds.WH_KEYBOARD_LL, callback); + } + + private static HookResult HookApp(int hookId, Callback callback) + { + _appHookProc = (code, param, lParam) => HookProcedure(code, param, lParam, callback); + + var hookHandle = HookNativeMethods.SetWindowsHookEx( + hookId, + _appHookProc, + IntPtr.Zero, + ThreadNativeMethods.GetCurrentThreadId()); + + if (hookHandle.IsInvalid) + ThrowLastUnmanagedErrorAsException(); + + return new HookResult(hookHandle, _appHookProc); + } + + private static HookResult HookGlobal(int hookId, Callback callback) + { + _globalHookProc = (code, param, lParam) => HookProcedure(code, param, lParam, callback); + + var hookHandle = HookNativeMethods.SetWindowsHookEx( + hookId, + _globalHookProc, + Process.GetCurrentProcess().MainModule.BaseAddress, + 0); + + if (hookHandle.IsInvalid) + ThrowLastUnmanagedErrorAsException(); + + return new HookResult(hookHandle, _globalHookProc); + } + + private static IntPtr HookProcedure(int nCode, IntPtr wParam, IntPtr lParam, Callback callback) + { + var passThrough = nCode != 0; + if (passThrough) + return CallNextHookEx(nCode, wParam, lParam); + + var callbackData = new CallbackData(wParam, lParam); + var continueProcessing = callback(callbackData); + + if (!continueProcessing) + return new IntPtr(-1); + + return CallNextHookEx(nCode, wParam, lParam); + } + + private static IntPtr CallNextHookEx(int nCode, IntPtr wParam, IntPtr lParam) + { + return HookNativeMethods.CallNextHookEx(IntPtr.Zero, nCode, wParam, lParam); + } + + private static void ThrowLastUnmanagedErrorAsException() + { + var errorCode = Marshal.GetLastWin32Error(); + throw new Win32Exception(errorCode); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookIds.cs b/MouseKeyHook/WinApi/HookIds.cs new file mode 100644 index 0000000..adda76f --- /dev/null +++ b/MouseKeyHook/WinApi/HookIds.cs @@ -0,0 +1,30 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class HookIds + { + /// + /// Installs a hook procedure that monitors mouse messages. For more information, see the MouseProc hook procedure. + /// + internal const int WH_MOUSE = 7; + + /// + /// Installs a hook procedure that monitors keystroke messages. For more information, see the KeyboardProc hook + /// procedure. + /// + internal const int WH_KEYBOARD = 2; + + /// + /// Windows NT/2000/XP/Vista/7: Installs a hook procedure that monitors low-level mouse input events. + /// + internal const int WH_MOUSE_LL = 14; + + /// + /// Windows NT/2000/XP/Vista/7: Installs a hook procedure that monitors low-level keyboard input events. + /// + internal const int WH_KEYBOARD_LL = 13; + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookNativeMethods.cs b/MouseKeyHook/WinApi/HookNativeMethods.cs new file mode 100644 index 0000000..01b6eed --- /dev/null +++ b/MouseKeyHook/WinApi/HookNativeMethods.cs @@ -0,0 +1,89 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class HookNativeMethods + { + /// + /// The CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. + /// A hook procedure can call this function either before or after processing the hook information. + /// + /// This parameter is ignored. + /// [in] Specifies the hook code passed to the current hook procedure. + /// [in] Specifies the wParam value passed to the current hook procedure. + /// [in] Specifies the lParam value passed to the current hook procedure. + /// This value is returned by the next hook procedure in the chain. + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp + /// + [DllImport("user32.dll", CharSet = CharSet.Auto, + CallingConvention = CallingConvention.StdCall)] + internal static extern IntPtr CallNextHookEx( + IntPtr idHook, + int nCode, + IntPtr wParam, + IntPtr lParam); + + /// + /// The SetWindowsHookEx function installs an application-defined hook procedure into a hook chain. + /// You would install a hook procedure to monitor the system for certain types of events. These events + /// are associated either with a specific thread or with all threads in the same desktop as the calling thread. + /// + /// + /// [in] Specifies the type of hook procedure to be installed. This parameter can be one of the following values. + /// + /// + /// [in] Pointer to the hook procedure. If the dwThreadId parameter is zero or specifies the identifier of a + /// thread created by a different process, the lpfn parameter must point to a hook procedure in a dynamic-link + /// library (DLL). Otherwise, lpfn can point to a hook procedure in the code associated with the current process. + /// + /// + /// [in] Handle to the DLL containing the hook procedure pointed to by the lpfn parameter. + /// The hMod parameter must be set to NULL if the dwThreadId parameter specifies a thread created by + /// the current process and if the hook procedure is within the code associated with the current process. + /// + /// + /// [in] Specifies the identifier of the thread with which the hook procedure is to be associated. + /// If this parameter is zero, the hook procedure is associated with all existing threads running in the + /// same desktop as the calling thread. + /// + /// + /// If the function succeeds, the return value is the handle to the hook procedure. + /// If the function fails, the return value is NULL. To get extended error information, call GetLastError. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp + /// + [DllImport("user32.dll", CharSet = CharSet.Auto, + CallingConvention = CallingConvention.StdCall, SetLastError = true)] + internal static extern HookProcedureHandle SetWindowsHookEx( + int idHook, + HookProcedure lpfn, + IntPtr hMod, + int dwThreadId); + + /// + /// The UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx + /// function. + /// + /// + /// [in] Handle to the hook to be removed. This parameter is a hook handle obtained by a previous call to + /// SetWindowsHookEx. + /// + /// + /// If the function succeeds, the return value is nonzero. + /// If the function fails, the return value is zero. To get extended error information, call GetLastError. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp + /// + [DllImport("user32.dll", CharSet = CharSet.Auto, + CallingConvention = CallingConvention.StdCall, SetLastError = true)] + internal static extern int UnhookWindowsHookEx(IntPtr idHook); + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookProcedure.cs b/MouseKeyHook/WinApi/HookProcedure.cs new file mode 100644 index 0000000..5644f3a --- /dev/null +++ b/MouseKeyHook/WinApi/HookProcedure.cs @@ -0,0 +1,40 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; + +namespace Gma.System.MouseKeyHook.WinApi +{ + /// + /// The CallWndProc hook procedure is an application-defined or library-defined callback + /// function used with the SetWindowsHookEx function. The HOOKPROC type defines a pointer + /// to this callback function. CallWndProc is a placeholder for the application-defined + /// or library-defined function name. + /// + /// + /// [in] Specifies whether the hook procedure must process the message. + /// If nCode is HC_ACTION, the hook procedure must process the message. + /// If nCode is less than zero, the hook procedure must pass the message to the + /// CallNextHookEx function without further processing and must return the + /// value returned by CallNextHookEx. + /// + /// + /// [in] Specifies whether the message was sent by the current thread. + /// If the message was sent by the current thread, it is nonzero; otherwise, it is zero. + /// + /// + /// [in] Pointer to a CWPSTRUCT structure that contains details about the message. + /// + /// + /// If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx. + /// If nCode is greater than or equal to zero, it is highly recommended that you call CallNextHookEx + /// and return the value it returns; otherwise, other applications that have installed WH_CALLWNDPROC + /// hooks will not receive hook notifications and may behave incorrectly as a result. If the hook + /// procedure does not call CallNextHookEx, the return value should be zero. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/callwndproc.asp + /// + public delegate IntPtr HookProcedure(int nCode, IntPtr wParam, IntPtr lParam); +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookProcedureHandle.cs b/MouseKeyHook/WinApi/HookProcedureHandle.cs new file mode 100644 index 0000000..bcfb6de --- /dev/null +++ b/MouseKeyHook/WinApi/HookProcedureHandle.cs @@ -0,0 +1,31 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Windows.Forms; +using Microsoft.Win32.SafeHandles; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal class HookProcedureHandle : SafeHandleZeroOrMinusOneIsInvalid + { + private static bool _closing; + + static HookProcedureHandle() + { + Application.ApplicationExit += (sender, e) => { _closing = true; }; + } + + public HookProcedureHandle() + : base(true) + { + } + + protected override bool ReleaseHandle() + { + //NOTE Calling Unhook during processexit causes deley + if (_closing) return true; + return HookNativeMethods.UnhookWindowsHookEx(handle) != 0; + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HookResult.cs b/MouseKeyHook/WinApi/HookResult.cs new file mode 100644 index 0000000..32211f9 --- /dev/null +++ b/MouseKeyHook/WinApi/HookResult.cs @@ -0,0 +1,26 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal class HookResult : IDisposable + { + public HookResult(HookProcedureHandle handle, HookProcedure procedure) + { + Handle = handle; + Procedure = procedure; + } + + public HookProcedureHandle Handle { get; } + + public HookProcedure Procedure { get; } + + public void Dispose() + { + Handle.Dispose(); + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/HotkeysNativeMethods.cs b/MouseKeyHook/WinApi/HotkeysNativeMethods.cs new file mode 100644 index 0000000..2c32ee4 --- /dev/null +++ b/MouseKeyHook/WinApi/HotkeysNativeMethods.cs @@ -0,0 +1,51 @@ +using System; +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class HotkeysNativeMethods + { + /// + /// Defines a system-wide hot key. + /// + /// + /// A handle to the window that will receive WM_HOTKEY messages generated by the hot key. If this parameter is NULL, + /// WM_HOTKEY messages are posted to the message queue of the calling thread and must be processed in the message loop. + /// + /// + /// The identifier of the hot key. If the hWnd parameter is NULL, then the hot key is associated with the current + /// thread rather than with a particular window. If a hot key already exists with the same hWnd and id parameters, see + /// Remarks for the action taken. + /// + /// + /// The keys that must be pressed in combination with the key specified by the uVirtKey parameter in order to generate + /// the WM_HOTKEY message. The fsModifiers parameter can be a combination of the following values. + /// + /// + /// The virtual-key code of the hot key. See Virtual Key Codes. + /// + /// + /// If the function succeeds, the return value is nonzero. + /// If the function fails, the return value is zero. To get extended error information, call GetLastError. + /// + [DllImport("user32.dll")] + public static extern int RegisterHotKey(IntPtr hwnd, int id, int fsModifiers, int vk); + + /// + /// Frees a hot key previously registered by the calling thread. + /// + /// + /// A handle to the window associated with the hot key to be freed. This parameter should be NULL if the hot key is not + /// associated with a window. + /// + /// + /// The identifier of the hot key to be freed. + /// + /// + /// If the function succeeds, the return value is nonzero. + /// If the function fails, the return value is zero. To get extended error information, call GetLastError. + /// + [DllImport("user32.dll")] + public static extern bool UnregisterHotKey(IntPtr hwnd, int id); + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/KeyboardHookStruct.cs b/MouseKeyHook/WinApi/KeyboardHookStruct.cs new file mode 100644 index 0000000..dd4da19 --- /dev/null +++ b/MouseKeyHook/WinApi/KeyboardHookStruct.cs @@ -0,0 +1,43 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + /// + /// The KeyboardHookStruct structure contains information about a low-level keyboard input event. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookstructures/cwpstruct.asp + /// + [StructLayout(LayoutKind.Sequential)] + internal struct KeyboardHookStruct + { + /// + /// Specifies a virtual-key code. The code must be a value in the range 1 to 254. + /// + public int VirtualKeyCode; + + /// + /// Specifies a hardware scan code for the key. + /// + public int ScanCode; + + /// + /// Specifies the extended-key flag, event-injected flag, context code, and transition-state flag. + /// + public int Flags; + + /// + /// Specifies the Time stamp for this message. + /// + public int Time; + + /// + /// Specifies extra information associated with the message. + /// + public int ExtraInfo; + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/KeyboardNativeMethods.cs b/MouseKeyHook/WinApi/KeyboardNativeMethods.cs new file mode 100644 index 0000000..fd038c8 --- /dev/null +++ b/MouseKeyHook/WinApi/KeyboardNativeMethods.cs @@ -0,0 +1,376 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows.Forms; +using Gma.System.MouseKeyHook.Implementation; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class KeyboardNativeMethods + { + //values from Winuser.h in Microsoft SDK. + public const byte VK_SHIFT = 0x10; + + public const byte VK_CAPITAL = 0x14; + public const byte VK_NUMLOCK = 0x90; + public const byte VK_LSHIFT = 0xA0; + public const byte VK_RSHIFT = 0xA1; + public const byte VK_LCONTROL = 0xA2; + public const byte VK_RCONTROL = 0xA3; + public const byte VK_LMENU = 0xA4; + public const byte VK_RMENU = 0xA5; + public const byte VK_LWIN = 0x5B; + public const byte VK_RWIN = 0x5C; + public const byte VK_SCROLL = 0x91; + + public const byte VK_INSERT = 0x2D; + + //may be possible to use these aggregates instead of L and R separately (untested) + public const byte VK_CONTROL = 0x11; + + public const byte VK_MENU = 0x12; + + public const byte VK_PACKET = 0xE7; + + //Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods + private static int lastVirtualKeyCode; + + private static int lastScanCode; + private static byte[] lastKeyState = new byte[255]; + private static bool lastIsDead; + + /// + /// Translates a virtual key to its character equivalent using the current keyboard layout without knowing the + /// scancode in advance. + /// + /// + /// + /// + /// + internal static void TryGetCharFromKeyboardState(int virtualKeyCode, int fuState, out char[] chars) + { + var dwhkl = GetActiveKeyboard(); + var scanCode = MapVirtualKeyEx(virtualKeyCode, (int) MapType.MAPVK_VK_TO_VSC, dwhkl); + TryGetCharFromKeyboardState(virtualKeyCode, scanCode, fuState, dwhkl, out chars); + } + + /// + /// Translates a virtual key to its character equivalent using the current keyboard layout + /// + /// + /// + /// + /// + /// + internal static void TryGetCharFromKeyboardState(int virtualKeyCode, int scanCode, int fuState, + out char[] chars) + { + var dwhkl = GetActiveKeyboard(); //get the active keyboard layout + TryGetCharFromKeyboardState(virtualKeyCode, scanCode, fuState, dwhkl, out chars); + } + + /// + /// Translates a virtual key to its character equivalent using a specified keyboard layout + /// + /// + /// + /// + /// + /// + /// + internal static void TryGetCharFromKeyboardState(int virtualKeyCode, int scanCode, int fuState, IntPtr dwhkl, + out char[] chars) + { + var pwszBuff = new StringBuilder(64); + var keyboardState = KeyboardState.GetCurrent(); + var currentKeyboardState = keyboardState.GetNativeState(); + var isDead = false; + + if (keyboardState.IsDown(Keys.ShiftKey)) + currentKeyboardState[(byte) Keys.ShiftKey] = 0x80; + + if (keyboardState.IsToggled(Keys.CapsLock)) + currentKeyboardState[(byte) Keys.CapsLock] = 0x01; + + var relevantChars = ToUnicodeEx(virtualKeyCode, scanCode, currentKeyboardState, pwszBuff, pwszBuff.Capacity, + fuState, dwhkl); + + switch (relevantChars) + { + case -1: + isDead = true; + ClearKeyboardBuffer(virtualKeyCode, scanCode, dwhkl); + chars = null; + break; + + case 0: + chars = null; + break; + + case 1: + if (pwszBuff.Length > 0) chars = new[] {pwszBuff[0]}; + else chars = null; + break; + + // Two or more (only two of them is relevant) + default: + if (pwszBuff.Length > 1) chars = new[] {pwszBuff[0], pwszBuff[1]}; + else chars = new[] {pwszBuff[0]}; + break; + } + + if (lastVirtualKeyCode != 0 && lastIsDead) + { + if (chars != null) + { + var sbTemp = new StringBuilder(5); + ToUnicodeEx(lastVirtualKeyCode, lastScanCode, lastKeyState, sbTemp, sbTemp.Capacity, 0, dwhkl); + lastIsDead = false; + lastVirtualKeyCode = 0; + } + + return; + } + + lastScanCode = scanCode; + lastVirtualKeyCode = virtualKeyCode; + lastIsDead = isDead; + lastKeyState = (byte[]) currentKeyboardState.Clone(); + } + + + private static void ClearKeyboardBuffer(int vk, int sc, IntPtr hkl) + { + var sb = new StringBuilder(10); + + int rc; + do + { + var lpKeyStateNull = new byte[255]; + rc = ToUnicodeEx(vk, sc, lpKeyStateNull, sb, sb.Capacity, 0, hkl); + } while (rc < 0); + } + + /// + /// Gets the input locale identifier for the active application's thread. Using this combined with the ToUnicodeEx and + /// MapVirtualKeyEx enables Windows to properly translate keys based on the keyboard layout designated for the + /// application. + /// + /// HKL + private static IntPtr GetActiveKeyboard() + { + var hActiveWnd = ThreadNativeMethods.GetForegroundWindow(); //handle to focused window + int dwProcessId; + var hCurrentWnd = ThreadNativeMethods.GetWindowThreadProcessId(hActiveWnd, out dwProcessId); + //thread of focused window + return GetKeyboardLayout(hCurrentWnd); //get the layout identifier for the thread whose window is focused + } + + /// + /// The ToAscii function translates the specified virtual-key code and keyboard + /// state to the corresponding character or characters. The function translates the code + /// using the input language and physical keyboard layout identified by the keyboard layout handle. + /// + /// + /// [in] Specifies the virtual-key code to be translated. + /// + /// + /// [in] Specifies the hardware scan code of the key to be translated. + /// The high-order bit of this value is set if the key is up (not pressed). + /// + /// + /// [in] Pointer to a 256-byte array that contains the current keyboard state. + /// Each element (byte) in the array contains the state of one key. + /// If the high-order bit of a byte is set, the key is down (pressed). + /// The low bit, if set, indicates that the key is toggled on. In this function, + /// only the toggle bit of the CAPS LOCK key is relevant. The toggle state + /// of the NUM LOCK and SCROLL LOCK keys is ignored. + /// + /// + /// [out] Pointer to the buffer that receives the translated character or characters. + /// + /// + /// [in] Specifies whether a menu is active. This parameter must be 1 if a menu is active, or 0 otherwise. + /// + /// + /// If the specified key is a dead key, the return value is negative. Otherwise, it is one of the following values. + /// Value Meaning + /// 0 The specified virtual key has no translation for the current state of the keyboard. + /// 1 One character was copied to the buffer. + /// 2 Two characters were copied to the buffer. This usually happens when a dead-key character + /// (accent or diacritic) stored in the keyboard layout cannot be composed with the specified + /// virtual key to form a single character. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/toascii.asp + /// + [Obsolete("Use ToUnicodeEx instead")] + [DllImport("user32.dll")] + public static extern int ToAscii( + int uVirtKey, + int uScanCode, + byte[] lpbKeyState, + byte[] lpwTransKey, + int fuState); + + /// + /// Translates the specified virtual-key code and keyboard state to the corresponding Unicode character or characters. + /// + /// [in] The virtual-key code to be translated. + /// + /// [in] The hardware scan code of the key to be translated. The high-order bit of this value is + /// set if the key is up. + /// + /// + /// [in, optional] A pointer to a 256-byte array that contains the current keyboard state. Each + /// element (byte) in the array contains the state of one key. If the high-order bit of a byte is set, the key is down. + /// + /// + /// [out] The buffer that receives the translated Unicode character or characters. However, this + /// buffer may be returned without being null-terminated even though the variable name suggests that it is + /// null-terminated. + /// + /// [in] The size, in characters, of the buffer pointed to by the pwszBuff parameter. + /// + /// [in] The behavior of the function. If bit 0 is set, a menu is active. Bits 1 through 31 are + /// reserved. + /// + /// The input locale identifier used to translate the specified code. + /// + /// -1 <= return <= n + /// + /// + /// -1 = The specified virtual key is a dead-key character (accent or diacritic). This value is returned + /// regardless of the keyboard layout, even if several characters have been typed and are stored in the + /// keyboard state. If possible, even with Unicode keyboard layouts, the function has written a spacing version + /// of the dead-key character to the buffer specified by pwszBuff. For example, the function writes the + /// character SPACING ACUTE (0x00B4), rather than the character NON_SPACING ACUTE (0x0301). + /// + /// + /// 0 = The specified virtual key has no translation for the current state of the keyboard. Nothing was + /// written to the buffer specified by pwszBuff. + /// + /// 1 = One character was written to the buffer specified by pwszBuff. + /// + /// n = Two or more characters were written to the buffer specified by pwszBuff. The most common cause + /// for this is that a dead-key character (accent or diacritic) stored in the keyboard layout could not be + /// combined with the specified virtual key to form a single character. However, the buffer may contain more + /// characters than the return value specifies. When this happens, any extra characters are invalid and should + /// be ignored. + /// + /// + /// + [DllImport("user32.dll")] + public static extern int ToUnicodeEx(int wVirtKey, + int wScanCode, + byte[] lpKeyState, + [Out] [MarshalAs(UnmanagedType.LPWStr, SizeConst = 64)] StringBuilder pwszBuff, + int cchBuff, + int wFlags, + IntPtr dwhkl); + + /// + /// The GetKeyboardState function copies the status of the 256 virtual keys to the + /// specified buffer. + /// + /// + /// [in] Pointer to a 256-byte array that contains keyboard key states. + /// + /// + /// If the function succeeds, the return value is nonzero. + /// If the function fails, the return value is zero. To get extended error information, call GetLastError. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/toascii.asp + /// + [DllImport("user32.dll")] + public static extern int GetKeyboardState(byte[] pbKeyState); + + /// + /// The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is + /// up, down, or toggled + /// (on, off—alternating each time the key is pressed). + /// + /// + /// [in] Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 + /// through 9), nVirtKey must be set to the ASCII value of that character. For other keys, it must be a virtual-key + /// code. + /// + /// + /// The return value specifies the status of the specified virtual key, as follows: + /// If the high-order bit is 1, the key is down; otherwise, it is up. + /// If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The + /// key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be + /// on when the key is toggled, and off when the key is untoggled. + /// + /// http://msdn.microsoft.com/en-us/library/ms646301.aspx + [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + public static extern short GetKeyState(int vKey); + + /// + /// Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a + /// virtual-key code. + /// + /// + /// [in] The virtual key code or scan code for a key. How this value is interpreted depends on the + /// value of the uMapType parameter. + /// + /// + /// [in] The translation to be performed. The value of this parameter depends on the value of the + /// uCode parameter. + /// + /// [in] The input locale identifier used to translate the specified code. + /// + [DllImport("user32.dll", CharSet = CharSet.Auto)] + internal static extern int MapVirtualKeyEx(int uCode, int uMapType, IntPtr dwhkl); + + /// + /// Retrieves the active input locale identifier (formerly called the keyboard layout) for the specified thread. + /// If the idThread parameter is zero, the input locale identifier for the active thread is returned. + /// + /// [in] The identifier of the thread to query, or 0 for the current thread. + /// + /// The return value is the input locale identifier for the thread. The low word contains a Language Identifier for the + /// input + /// language and the high word contains a device handle to the physical layout of the keyboard. + /// + [DllImport("user32.dll", CharSet = CharSet.Auto)] + internal static extern IntPtr GetKeyboardLayout(int dwLayout); + + /// + /// MapVirtualKeys uMapType + /// + internal enum MapType + { + /// + /// uCode is a virtual-key code and is translated into an unshifted character value in the low-order word of the return + /// value. Dead keys (diacritics) are indicated by setting the top bit of the return value. If there is no translation, + /// the function returns 0. + /// + MAPVK_VK_TO_VSC, + + /// + /// uCode is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does not + /// distinguish between left- and right-hand keys, the left-hand scan code is returned. If there is no translation, the + /// function returns 0. + /// + MAPVK_VSC_TO_VK, + + /// + /// uCode is a scan code and is translated into a virtual-key code that does not distinguish between left- and + /// right-hand keys. If there is no translation, the function returns 0. + /// + MAPVK_VK_TO_CHAR, + + /// + /// uCode is a scan code and is translated into a virtual-key code that distinguishes between left- and right-hand + /// keys. If there is no translation, the function returns 0. + /// + MAPVK_VSC_TO_VK_EX + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/Messages.cs b/MouseKeyHook/WinApi/Messages.cs new file mode 100644 index 0000000..82557fd --- /dev/null +++ b/MouseKeyHook/WinApi/Messages.cs @@ -0,0 +1,123 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class Messages + { + //values from Winuser.h in Microsoft SDK. + + /// + /// The WM_MOUSEMOVE message is posted to a window when the cursor moves. + /// + public const int WM_MOUSEMOVE = 0x200; + + /// + /// The WM_LBUTTONDOWN message is posted when the user presses the left mouse button + /// + public const int WM_LBUTTONDOWN = 0x201; + + /// + /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button + /// + public const int WM_RBUTTONDOWN = 0x204; + + /// + /// The WM_MBUTTONDOWN message is posted when the user presses the middle mouse button + /// + public const int WM_MBUTTONDOWN = 0x207; + + /// + /// The WM_LBUTTONUP message is posted when the user releases the left mouse button + /// + public const int WM_LBUTTONUP = 0x202; + + /// + /// The WM_RBUTTONUP message is posted when the user releases the right mouse button + /// + public const int WM_RBUTTONUP = 0x205; + + /// + /// The WM_MBUTTONUP message is posted when the user releases the middle mouse button + /// + public const int WM_MBUTTONUP = 0x208; + + /// + /// The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button + /// + public const int WM_LBUTTONDBLCLK = 0x203; + + /// + /// The WM_RBUTTONDBLCLK message is posted when the user double-clicks the right mouse button + /// + public const int WM_RBUTTONDBLCLK = 0x206; + + /// + /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button + /// + public const int WM_MBUTTONDBLCLK = 0x209; + + /// + /// The WM_MOUSEWHEEL message is posted when the user presses the mouse wheel. + /// + public const int WM_MOUSEWHEEL = 0x020A; + + /// + /// The WM_XBUTTONDOWN message is posted when the user presses the first or second X mouse + /// button. + /// + public const int WM_XBUTTONDOWN = 0x20B; + + /// + /// The WM_XBUTTONUP message is posted when the user releases the first or second X mouse + /// button. + /// + public const int WM_XBUTTONUP = 0x20C; + + /// + /// The WM_XBUTTONDBLCLK message is posted when the user double-clicks the first or second + /// X mouse button. + /// + /// Only windows that have the CS_DBLCLKS style can receive WM_XBUTTONDBLCLK messages. + public const int WM_XBUTTONDBLCLK = 0x20D; + + /// + /// The WM_MOUSEHWHEEL message Sent to the active window when the mouse's horizontal scroll + /// wheel is tilted or rotated. + /// + public const int WM_MOUSEHWHEEL = 0x20E; + + /// + /// The WM_KEYDOWN message is posted to the window with the keyboard focus when a non-system + /// key is pressed. A non-system key is a key that is pressed when the ALT key is not pressed. + /// + public const int WM_KEYDOWN = 0x100; + + /// + /// The WM_KEYUP message is posted to the window with the keyboard focus when a non-system + /// key is released. A non-system key is a key that is pressed when the ALT key is not pressed, + /// or a keyboard key that is pressed when a window has the keyboard focus. + /// + public const int WM_KEYUP = 0x101; + + /// + /// The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user + /// presses the F10 key (which activates the menu bar) or holds down the ALT key and then + /// presses another key. It also occurs when no window currently has the keyboard focus; + /// in this case, the WM_SYSKEYDOWN message is sent to the active window. The window that + /// receives the message can distinguish between these two contexts by checking the context + /// code in the lParam parameter. + /// + public const int WM_SYSKEYDOWN = 0x104; + + /// + /// The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user + /// releases a key that was pressed while the ALT key was held down. It also occurs when no + /// window currently has the keyboard focus; in this case, the WM_SYSKEYUP message is sent + /// to the active window. The window that receives the message can distinguish between + /// these two contexts by checking the context code in the lParam parameter. + /// + public const int WM_SYSKEYUP = 0x105; + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/MouseNativeMethods.cs b/MouseKeyHook/WinApi/MouseNativeMethods.cs new file mode 100644 index 0000000..eddc33d --- /dev/null +++ b/MouseKeyHook/WinApi/MouseNativeMethods.cs @@ -0,0 +1,27 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class MouseNativeMethods + { + /// + /// The GetDoubleClickTime function retrieves the current double-click time for the mouse. A double-click is a series + /// of two clicks of the + /// mouse button, the second occurring within a specified time after the first. The double-click time is the maximum + /// number of + /// milliseconds that may occur between the first and second click of a double-click. + /// + /// + /// The return value specifies the current double-click time, in milliseconds. + /// + /// + /// http://msdn.microsoft.com/en-us/library/ms646258(VS.85).aspx + /// + [DllImport("user32")] + internal static extern int GetDoubleClickTime(); + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/MouseStruct.cs b/MouseKeyHook/WinApi/MouseStruct.cs new file mode 100644 index 0000000..05c2c7e --- /dev/null +++ b/MouseKeyHook/WinApi/MouseStruct.cs @@ -0,0 +1,53 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + /// + /// The structure contains information about a mouse input event. + /// + /// + /// See full documentation at http://globalmousekeyhook.codeplex.com/wikipage?title=MouseStruct + /// + [StructLayout(LayoutKind.Explicit)] + internal struct MouseStruct + { + /// + /// Specifies a Point structure that contains the X- and Y-coordinates of the cursor, in screen coordinates. + /// + [FieldOffset(0x00)] public Point Point; + + /// + /// Specifies information associated with the message. + /// + /// + /// The possible values are: + /// + /// + /// 0 - No Information + /// + /// + /// 1 - X-Button1 Click + /// + /// + /// 2 - X-Button2 Click + /// + /// + /// 120 - Mouse Scroll Away from User + /// + /// + /// -120 - Mouse Scroll Toward User + /// + /// + /// + [FieldOffset(0x0A)] public short MouseData; + + /// + /// Returns a Timestamp associated with the input, in System Ticks. + /// + [FieldOffset(0x10)] public int Timestamp; + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/Point.cs b/MouseKeyHook/WinApi/Point.cs new file mode 100644 index 0000000..15a03cb --- /dev/null +++ b/MouseKeyHook/WinApi/Point.cs @@ -0,0 +1,64 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + /// + /// The Point structure defines the X- and Y- coordinates of a point. + /// + /// + /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/rectangl_0tiq.asp + /// + [StructLayout(LayoutKind.Sequential)] + internal struct Point + { + /// + /// Specifies the X-coordinate of the point. + /// + public int X; + + /// + /// Specifies the Y-coordinate of the point. + /// + public int Y; + + public Point(int x, int y) + { + X = x; + Y = y; + } + + public static bool operator ==(Point a, Point b) + { + return a.X == b.X && a.Y == b.Y; + } + + public static bool operator !=(Point a, Point b) + { + return !(a == b); + } + + public bool Equals(Point other) + { + return other.X == X && other.Y == Y; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (obj.GetType() != typeof(Point)) return false; + return Equals((Point) obj); + } + + public override int GetHashCode() + { + unchecked + { + return (X * 397) ^ Y; + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/WinApi/ThreadNativeMethods.cs b/MouseKeyHook/WinApi/ThreadNativeMethods.cs new file mode 100644 index 0000000..b10420d --- /dev/null +++ b/MouseKeyHook/WinApi/ThreadNativeMethods.cs @@ -0,0 +1,42 @@ +// This code is distributed under MIT license. +// Copyright (c) 2015 George Mamaladze +// See license.txt or https://mit-license.org/ + +using System; +using System.Runtime.InteropServices; + +namespace Gma.System.MouseKeyHook.WinApi +{ + internal static class ThreadNativeMethods + { + /// + /// Retrieves the unmanaged thread identifier of the calling thread. + /// + /// + [DllImport("kernel32")] + internal static extern int GetCurrentThreadId(); + + /// + /// Retrieves a handle to the foreground window (the window with which the user is currently working). + /// The system assigns a slightly higher priority to the thread that creates the foreground window than it does to + /// other threads. + /// + /// + [DllImport("user32.dll", CharSet = CharSet.Auto)] + internal static extern IntPtr GetForegroundWindow(); + + /// + /// Retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the + /// process that + /// created the window. + /// + /// A handle to the window. + /// + /// A pointer to a variable that receives the process identifier. If this parameter is not NULL, + /// GetWindowThreadProcessId copies the identifier of the process to the variable; otherwise, it does not. + /// + /// The return value is the identifier of the thread that created the window. + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + internal static extern int GetWindowThreadProcessId(IntPtr handle, out int processId); + } +} \ No newline at end of file diff --git a/MouseKeyHook/bin/Release/net462/Gma.System.MouseKeyHook.dll b/MouseKeyHook/bin/Release/net462/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..7df0d82 Binary files /dev/null and b/MouseKeyHook/bin/Release/net462/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/bin/Release/net472/Gma.System.MouseKeyHook.dll b/MouseKeyHook/bin/Release/net472/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..4ad829e Binary files /dev/null and b/MouseKeyHook/bin/Release/net472/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.deps.json b/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.deps.json new file mode 100644 index 0000000..33d49a9 --- /dev/null +++ b/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "Gma.System.MouseKeyHook/5.6.1-alpha": { + "runtime": { + "Gma.System.MouseKeyHook.dll": {} + } + } + } + }, + "libraries": { + "Gma.System.MouseKeyHook/5.6.1-alpha": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll b/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..475da21 Binary files /dev/null and b/MouseKeyHook/bin/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Debug/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs b/MouseKeyHook/obj/Debug/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs new file mode 100644 index 0000000..edc4647 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] diff --git a/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..1420d3b Binary files /dev/null and b/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.pdb b/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.pdb new file mode 100644 index 0000000..a60a1e3 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net462/Gma.System.MouseKeyHook.pdb differ diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..d739240 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha+3284976fe8632226ffd8878c61a30e43c4c313cd")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..f871d09 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +34c40aeaa5ecb8948ca4743b7a8a347d5ccb39a5a7f23cf2c0d1035226e301a3 diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..0de32b6 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,11 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.assets.cache new file mode 100644 index 0000000..35a6ea9 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.AssemblyReference.cache b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.AssemblyReference.cache new file mode 100644 index 0000000..fb8a40d Binary files /dev/null and b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.AssemblyReference.cache differ diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..399e1a1 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c96c096d4f2d32de6fc01f15c6f587ba49f0c00a582f6a4a2bb84fb01ea82ff4 diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..20a469a --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,29 @@ +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.pdb +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.AssemblyReference.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfoInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfo.cs +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.CoreCompileInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net462\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\net462\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net462\Gma.System.MouseKeyHook.pdb diff --git a/MouseKeyHook/obj/Debug/net462/MouseKeyHook.sourcelink.json b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.sourcelink.json new file mode 100644 index 0000000..42d200f --- /dev/null +++ b/MouseKeyHook/obj/Debug/net462/MouseKeyHook.sourcelink.json @@ -0,0 +1 @@ +{"documents":{"C:\\Users\\vitor\\source\\repos\\scumoverlay\\*":"https://raw.githubusercontent.com/MarcellVokk/DamnOverSharp/bd23c8554ddfc6849e872b9bac200da8c8393f1b/*"}} \ No newline at end of file diff --git a/MouseKeyHook/obj/Debug/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/MouseKeyHook/obj/Debug/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..5200539 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.pdb b/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.pdb new file mode 100644 index 0000000..373f212 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net472/Gma.System.MouseKeyHook.pdb differ diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..43b3bd8 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha+82571ca7acc438d897ae3c9ec82004d9b17d8ba3")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..69f2a2a --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +06fdb9fc37c742f50d76528053869b3cbfdef2279aa1315e549dca221683598b diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..0de32b6 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,11 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.assets.cache new file mode 100644 index 0000000..ced7895 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.AssemblyReference.cache b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.AssemblyReference.cache new file mode 100644 index 0000000..a512454 Binary files /dev/null and b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.AssemblyReference.cache differ diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..3097be5 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b8affe19c90f7cd08280999aadde5dc2816881f8d9de5b276356e8e7affb0812 diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..bf53e26 --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,29 @@ +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.pdb +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.AssemblyReference.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfoInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfo.cs +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.CoreCompileInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\net472\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\net472\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\net472\Gma.System.MouseKeyHook.pdb diff --git a/MouseKeyHook/obj/Debug/net472/MouseKeyHook.sourcelink.json b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.sourcelink.json new file mode 100644 index 0000000..42d200f --- /dev/null +++ b/MouseKeyHook/obj/Debug/net472/MouseKeyHook.sourcelink.json @@ -0,0 +1 @@ +{"documents":{"C:\\Users\\vitor\\source\\repos\\scumoverlay\\*":"https://raw.githubusercontent.com/MarcellVokk/DamnOverSharp/bd23c8554ddfc6849e872b9bac200da8c8393f1b/*"}} \ No newline at end of file diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/MouseKeyHook/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..7dc39ea Binary files /dev/null and b/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.pdb b/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.pdb new file mode 100644 index 0000000..570eeed Binary files /dev/null and b/MouseKeyHook/obj/Debug/netcoreapp3.1/Gma.System.MouseKeyHook.pdb differ diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..d739240 --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha+3284976fe8632226ffd8878c61a30e43c4c313cd")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..f871d09 --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +34c40aeaa5ecb8948ca4743b7a8a347d5ccb39a5a7f23cf2c0d1035226e301a3 diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..0de32b6 --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,11 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.assets.cache new file mode 100644 index 0000000..87052c1 Binary files /dev/null and b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..c701fbe --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b142ed70104af394f96f0b67a00bf0f1c043235ae754863a72887aae180e7b55 diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7d058c8 --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,30 @@ +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.deps.json +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.csproj.AssemblyReference.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfoInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfo.cs +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.csproj.CoreCompileInputs.cache +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +D:\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.deps.json +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +C:\Users\vitor\Source\Repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.deps.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\bin\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\MouseKeyHook.sourcelink.json +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\scumoverlay\MouseKeyHook\obj\Debug\netcoreapp3.1\Gma.System.MouseKeyHook.pdb diff --git a/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.sourcelink.json b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.sourcelink.json new file mode 100644 index 0000000..42d200f --- /dev/null +++ b/MouseKeyHook/obj/Debug/netcoreapp3.1/MouseKeyHook.sourcelink.json @@ -0,0 +1 @@ +{"documents":{"C:\\Users\\vitor\\source\\repos\\scumoverlay\\*":"https://raw.githubusercontent.com/MarcellVokk/DamnOverSharp/bd23c8554ddfc6849e872b9bac200da8c8393f1b/*"}} \ No newline at end of file diff --git a/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.dgspec.json b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.dgspec.json new file mode 100644 index 0000000..f7b89a1 --- /dev/null +++ b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.dgspec.json @@ -0,0 +1,90 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj": {} + }, + "projects": { + "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj": { + "version": "5.6.1-alpha", + "restore": { + "projectUniqueName": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj", + "projectName": "MouseKeyHook", + "projectPath": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj", + "packagesPath": "C:\\Users\\vitor\\.nuget\\packages\\", + "outputPath": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\obj\\", + "projectStyle": "PackageReference", + "crossTargeting": true, + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\vitor\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net462", + "net472", + "netcoreapp3.1" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.1": { + "targetAlias": "netcoreapp3.1", + "projectReferences": {} + }, + "net462": { + "targetAlias": "net462", + "projectReferences": {} + }, + "net472": { + "targetAlias": "net472", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.1": { + "targetAlias": "netcoreapp3.1", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + }, + "net462": { + "targetAlias": "net462", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + }, + "net472": { + "targetAlias": "net472", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.props b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.props new file mode 100644 index 0000000..0ade06a --- /dev/null +++ b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\vitor\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.8.0 + + + + + + \ No newline at end of file diff --git a/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.targets b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/MouseKeyHook/obj/MouseKeyHook.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MouseKeyHook/obj/Release/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs b/MouseKeyHook/obj/Release/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs new file mode 100644 index 0000000..edc4647 --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/.NETFramework,Version=v4.6.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] diff --git a/MouseKeyHook/obj/Release/net462/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Release/net462/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..7df0d82 Binary files /dev/null and b/MouseKeyHook/obj/Release/net462/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..30453bb --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..3ec2d19 --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +5b8affa8a6864d55520c89f5cc542611496d869c diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Release/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..7a81dc2 --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,9 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\ diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Release/net462/MouseKeyHook.assets.cache new file mode 100644 index 0000000..a88c861 Binary files /dev/null and b/MouseKeyHook/obj/Release/net462/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.AssemblyReference.cache b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.AssemblyReference.cache new file mode 100644 index 0000000..fb8a40d Binary files /dev/null and b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.AssemblyReference.cache differ diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..e0c31bc --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +73ce80438fb5ca35e26a69884b24576820e884d1 diff --git a/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..db674f9 --- /dev/null +++ b/MouseKeyHook/obj/Release/net462/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Release\net462\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net462\Gma.System.MouseKeyHook.dll diff --git a/MouseKeyHook/obj/Release/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/MouseKeyHook/obj/Release/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/MouseKeyHook/obj/Release/net472/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Release/net472/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..4ad829e Binary files /dev/null and b/MouseKeyHook/obj/Release/net472/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..30453bb --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..3ec2d19 --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +5b8affa8a6864d55520c89f5cc542611496d869c diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Release/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..7a81dc2 --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,9 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\ diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Release/net472/MouseKeyHook.assets.cache new file mode 100644 index 0000000..a12ca86 Binary files /dev/null and b/MouseKeyHook/obj/Release/net472/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.AssemblyReference.cache b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.AssemblyReference.cache new file mode 100644 index 0000000..a512454 Binary files /dev/null and b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.AssemblyReference.cache differ diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..300b924 --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +f6e5bd412d1fecca7f9108b66cd70ba572127408 diff --git a/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..abc78fa --- /dev/null +++ b/MouseKeyHook/obj/Release/net472/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Release\net472\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\net472\Gma.System.MouseKeyHook.dll diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/MouseKeyHook/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll b/MouseKeyHook/obj/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll new file mode 100644 index 0000000..475da21 Binary files /dev/null and b/MouseKeyHook/obj/Release/netcoreapp3.1/Gma.System.MouseKeyHook.dll differ diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs new file mode 100644 index 0000000..30453bb --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfo.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("George Mamaladze")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("(c) George Mamaladze 2000-2020")] +[assembly: System.Reflection.AssemblyDescriptionAttribute(@" + This library attaches to windows global hooks, tracks keyboard and mouse clicks and movement and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need: + + * Mouse coordinates + * Mouse buttons clicked + * Mouse wheel scrolls + * Key presses and releases + * Special key states + * [NEW] Key combinations and sequences + + Additionally, there is a possibility to supress certain keyboard or mouse clicks, or detect special key combinations. + ")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("5.6.1.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("5.6.1-alpha")] +[assembly: System.Reflection.AssemblyProductAttribute("Gma.System.MouseKeyHook")] +[assembly: System.Reflection.AssemblyTitleAttribute("MouseKeyHook")] +[assembly: System.Reflection.AssemblyVersionAttribute("5.6.1.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache new file mode 100644 index 0000000..3ec2d19 --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +5b8affa8a6864d55520c89f5cc542611496d869c diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..7a81dc2 --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,9 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.RootNamespace = Gma.System.MouseKeyHook +build_property.ProjectDir = C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\ diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.assets.cache b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.assets.cache new file mode 100644 index 0000000..c50883f Binary files /dev/null and b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.assets.cache differ diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.AssemblyReference.cache b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.AssemblyReference.cache new file mode 100644 index 0000000..0f2e5dd Binary files /dev/null and b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.AssemblyReference.cache differ diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.BuildWithSkipAnalyzers b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..d741bf4 --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +97d94fc39c42bff1dc5047c441fec0d3c0ad564a diff --git a/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..64efef0 --- /dev/null +++ b/MouseKeyHook/obj/Release/netcoreapp3.1/MouseKeyHook.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Release\netcoreapp3.1\Gma.System.MouseKeyHook.deps.json +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\bin\Release\netcoreapp3.1\Gma.System.MouseKeyHook.dll +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\MouseKeyHook.csproj.AssemblyReference.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\MouseKeyHook.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\MouseKeyHook.AssemblyInfoInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\MouseKeyHook.AssemblyInfo.cs +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\MouseKeyHook.csproj.CoreCompileInputs.cache +C:\Users\vitor\source\repos\DamnOverSharp\MouseKeyHook\obj\Release\netcoreapp3.1\Gma.System.MouseKeyHook.dll diff --git a/MouseKeyHook/obj/project.assets.json b/MouseKeyHook/obj/project.assets.json new file mode 100644 index 0000000..30a108f --- /dev/null +++ b/MouseKeyHook/obj/project.assets.json @@ -0,0 +1,100 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": {}, + ".NETFramework,Version=v4.6.2": {}, + ".NETFramework,Version=v4.7.2": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + ".NETCoreApp,Version=v3.1": [], + ".NETFramework,Version=v4.6.2": [], + ".NETFramework,Version=v4.7.2": [] + }, + "packageFolders": { + "C:\\Users\\vitor\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "5.6.1-alpha", + "restore": { + "projectUniqueName": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj", + "projectName": "MouseKeyHook", + "projectPath": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj", + "packagesPath": "C:\\Users\\vitor\\.nuget\\packages\\", + "outputPath": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\obj\\", + "projectStyle": "PackageReference", + "crossTargeting": true, + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\vitor\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net462", + "net472", + "netcoreapp3.1" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.1": { + "targetAlias": "netcoreapp3.1", + "projectReferences": {} + }, + "net462": { + "targetAlias": "net462", + "projectReferences": {} + }, + "net472": { + "targetAlias": "net472", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.1": { + "targetAlias": "netcoreapp3.1", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + }, + "net462": { + "targetAlias": "net462", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + }, + "net472": { + "targetAlias": "net472", + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/MouseKeyHook/obj/project.nuget.cache b/MouseKeyHook/obj/project.nuget.cache new file mode 100644 index 0000000..a8cfa22 --- /dev/null +++ b/MouseKeyHook/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "zFbAKR+saf89Io6gkX/Xuz4gkxOvz9XWLwGF7cqwBcdVf+65XZ+vBIHoXRWz9ADzasXDdM+87iWCmIvVQQweCQ==", + "success": true, + "projectFilePath": "C:\\Users\\vitor\\source\\repos\\scumoverlay\\MouseKeyHook\\MouseKeyHook.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/packages/Material.Icons.2.0.12/.signature.p7s b/packages/Material.Icons.2.0.12/.signature.p7s new file mode 100644 index 0000000..f2e2894 Binary files /dev/null and b/packages/Material.Icons.2.0.12/.signature.p7s differ diff --git a/packages/Material.Icons.2.0.12/Material.Icons.2.0.12.nupkg b/packages/Material.Icons.2.0.12/Material.Icons.2.0.12.nupkg new file mode 100644 index 0000000..d639182 Binary files /dev/null and b/packages/Material.Icons.2.0.12/Material.Icons.2.0.12.nupkg differ diff --git a/packages/Material.Icons.2.0.12/README.md b/packages/Material.Icons.2.0.12/README.md new file mode 100644 index 0000000..e2e882c --- /dev/null +++ b/packages/Material.Icons.2.0.12/README.md @@ -0,0 +1,108 @@ +[icons-nuget]: https://www.nuget.org/packages/Material.Icons/ +[wpf-nuget]: https://www.nuget.org/packages/Material.Icons.WPF/ +[avalonia-nuget]: https://www.nuget.org/packages/Material.Icons.Avalonia/ + +# Material.Icons +Parsed icons set from [materialdesignicons.com](https://materialdesignicons.com/) and display control implementations for different GUI frameworks. +- All icons are **always up-to-date** because automatically updated every 6 hours. +- **Small package size** because icons are graphically encoded via SVG Path. +- Icon types are **strongly typed** enum, so your **IDE will suggest available variants**: +![895428ad-6010-4ffd-bd88-61aecd50f5e1](https://user-images.githubusercontent.com/29896317/213889827-ca4f7673-115a-433e-9fde-305d55d36772.gif) + +## Structure +This project consists of 3 parts: +- [![](https://img.shields.io/nuget/dt/Material.Icons?label=Material.Icons&style=flat-square)](#meta) contains info about the icons +- [![](https://img.shields.io/nuget/dt/Material.Icons.Avalonia?color=blue&label=Material.Icons.Avalonia&style=flat-square)](#avalonia) contains controls for **AvaloniaUI** +- [![](https://img.shields.io/nuget/dt/Material.Icons.WPF?color=blue&label=Material.Icons.WPF&style=flat-square)](#wpf) contains controls for **WPF** + + +- [FAQ](#faq) - frequently asked questions + +## Avalonia +#### Getting started +1. Install [Material.Icons.Avalonia nuget package](https://www.nuget.org/packages/Material.Icons.Avalonia/): + ```shell + dotnet add package Material.Icons.Avalonia + ``` + [![avalonia-nuget](https://img.shields.io/nuget/v/Material.Icons.Avalonia?label=Material.Icons.Avalonia&style=flat-square)][avalonia-nuget] + [![avalonia-nuget](https://img.shields.io/nuget/dt/Material.Icons.Avalonia?color=blue&label=Downloads&style=flat-square)][avalonia-nuget] +2. Include styles in `App.xaml` (for `2.0.0` version and higher): + ```xaml + + + ... + + + + ``` + For `1.*.*`: + ```xaml + + + ... + + + + ``` +#### Using +Add `Material.Icons.Avalonia` namespace to the root element of your file (your IDE can suggest it or do it automatically): +``` +xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" +``` +Use `MaterialIcon` control: +```xaml + +``` +The `Foreground` property controls the color of the icon. +Also, there is `MaterialIconExt` which allows you to use is as the markup extension: +```xaml +