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