diff --git a/Dead Matter Server Manager/.vs/Dead Matter Server Manager/v16/.suo b/Dead Matter Server Manager/.vs/Dead Matter Server Manager/v16/.suo index aa263e2..9f4686c 100644 Binary files a/Dead Matter Server Manager/.vs/Dead Matter Server Manager/v16/.suo and b/Dead Matter Server Manager/.vs/Dead Matter Server Manager/v16/.suo differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/Dead Matter Server Manager.csproj b/Dead Matter Server Manager/Dead Matter Server Manager/Dead Matter Server Manager.csproj index ecb98c2..31517ed 100644 --- a/Dead Matter Server Manager/Dead Matter Server Manager/Dead Matter Server Manager.csproj +++ b/Dead Matter Server Manager/Dead Matter Server Manager/Dead Matter Server Manager.csproj @@ -115,9 +115,6 @@ - - Always - diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/Form1.cs b/Dead Matter Server Manager/Dead Matter Server Manager/Form1.cs index 28b922e..8ec7510 100644 --- a/Dead Matter Server Manager/Dead Matter Server Manager/Form1.cs +++ b/Dead Matter Server Manager/Dead Matter Server Manager/Form1.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Net; using System.Net.Sockets; +using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; using System.Threading; @@ -43,6 +44,9 @@ public partial class Form1 : Form private DateTime lastRestart; private int killAttempts; + [DllImport("User32.dll")] + static extern int SetForegroundWindow(IntPtr point); + public Form1() { InitializeComponent(); @@ -654,8 +658,13 @@ await Task.Run(() => if ((Convert.ToDouble(memory) / 1024 / 1024 / 1024 > Convert.ToDouble(maxMem) && !killSent) || (restartServerTimeOption.Checked && restartTime == ((uptime.Hours * 60) + uptime.Minutes).ToString() && !killSent) || killSent && timeSinceLastKill.Minutes >= 1 && killAttempts <= 3) { int processID = dmServerShipping[0].Id; - Process.Start("windows-kill.exe", "-SIGINT " + processID); - //uptime = new TimeSpan(0, 0, 0); + + Process p = Process.GetProcessById(processID); + + IntPtr h = p.MainWindowHandle; + SetForegroundWindow(h); + SendKeys.SendWait("^(c)"); + killSent = true; killAttempts += 1; killCommandSentAt = DateTime.Now; @@ -874,7 +883,11 @@ private void stopServer_Click(object sender, EventArgs e) if (dmServer.Length != 0) { int processID = dmServer[0].Id; - Process.Start("windows-kill.exe", "-SIGINT " + processID); + Process p = Process.GetProcessById(processID); + + IntPtr h = p.MainWindowHandle; + SetForegroundWindow(h); + SendKeys.SendWait("^(c)"); } serverStarted = false; firstTimeServerStarted = false; diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/Properties/AssemblyInfo.cs b/Dead Matter Server Manager/Dead Matter Server Manager/Properties/AssemblyInfo.cs index 793a7ab..cf719a3 100644 --- a/Dead Matter Server Manager/Dead Matter Server Manager/Properties/AssemblyInfo.cs +++ b/Dead Matter Server Manager/Dead Matter Server Manager/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // 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.6.13.0")] -[assembly: AssemblyFileVersion("1.6.13.0")] +[assembly: AssemblyVersion("1.6.14.0")] +[assembly: AssemblyFileVersion("1.6.14.0")] diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.exe b/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.exe index 797ee64..386a471 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.exe and b/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.exe differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.pdb b/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.pdb index 0a8f31e..2eecf50 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.pdb and b/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/Dead Matter Server Manager.pdb differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/windows-kill.exe b/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/windows-kill.exe deleted file mode 100644 index 98d7d7f..0000000 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/bin/x64/Debug/windows-kill.exe and /dev/null differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.FileListAbsolute.txt b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.FileListAbsolute.txt index 7f4ec28..c8da8be 100644 --- a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.FileListAbsolute.txt +++ b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.FileListAbsolute.txt @@ -12,5 +12,3 @@ C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\De C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\Dead Matter Server Manager\obj\x64\Debug\Dead Matter Server Manager.exe C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\Dead Matter Server Manager\obj\x64\Debug\Dead Matter Server Manager.pdb C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\Dead Matter Server Manager\bin\x64\Debug\defaultEngine.txt -C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\Dead Matter Server Manager\bin\x64\Debug\windows-kill.exe -C:\Users\Dave\Source\Repos\DeadMatterServerManager\Dead Matter Server Manager\Dead Matter Server Manager\obj\x64\Debug\Dead Matter Server Manager.csprojAssemblyReference.cache diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.GenerateResource.cache b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.GenerateResource.cache index 4510bb8..69b2bdc 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.GenerateResource.cache and b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csproj.GenerateResource.cache differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csprojAssemblyReference.cache b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csprojAssemblyReference.cache deleted file mode 100644 index 3d588d2..0000000 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.csprojAssemblyReference.cache and /dev/null differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.exe b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.exe index 797ee64..386a471 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.exe and b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.exe differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.pdb b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.pdb index 0a8f31e..2eecf50 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.pdb and b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/Dead Matter Server Manager.pdb differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache index bcd5669..4f51252 100644 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Dead Matter Server Manager/Dead Matter Server Manager/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Dead Matter Server Manager/Dead Matter Server Manager/windows-kill.exe b/Dead Matter Server Manager/Dead Matter Server Manager/windows-kill.exe deleted file mode 100644 index 98d7d7f..0000000 Binary files a/Dead Matter Server Manager/Dead Matter Server Manager/windows-kill.exe and /dev/null differ diff --git a/Dead Matter Server Manager/DeadMatterServerManagerInstaller/DeadMatterServerManagerInstaller.vdproj b/Dead Matter Server Manager/DeadMatterServerManagerInstaller/DeadMatterServerManagerInstaller.vdproj index ea525b4..1fee4e7 100644 --- a/Dead Matter Server Manager/DeadMatterServerManagerInstaller/DeadMatterServerManagerInstaller.vdproj +++ b/Dead Matter Server Manager/DeadMatterServerManagerInstaller/DeadMatterServerManagerInstaller.vdproj @@ -39,12 +39,6 @@ } "Entry" { - "MsmKey" = "8:_832B6CC763924BF2AE42191B0C8F1F89" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_884AA8BE0C34A4448A660EDFEC8B34EF" "OwnerKey" = "8:_262D2683AA2142C289BFC824DDFCD381" "MsmSig" = "8:_UNDEFINED" @@ -287,26 +281,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_832B6CC763924BF2AE42191B0C8F1F89" - { - "SourcePath" = "8:..\\Dead Matter Server Manager\\windows-kill.exe" - "TargetName" = "8:windows-kill.exe" - "Tag" = "8:" - "Folder" = "8:_12EB296AC619417D8A628C01638EB039" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_884AA8BE0C34A4448A660EDFEC8B34EF" { "AssemblyRegister" = "3:1" @@ -529,15 +503,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Dead Matter Server Manager" - "ProductCode" = "8:{EDFCAA39-1F4E-4966-96CF-6061F15E0523}" - "PackageCode" = "8:{B92DE7C4-74A1-4F65-8ACD-3EAFEB0034E6}" + "ProductCode" = "8:{ECCEDDD5-6E51-4D29-9009-03A7F2E69EC8}" + "PackageCode" = "8:{0C1CBCDC-CF07-4272-9F6E-53FC71DE26F0}" "UpgradeCode" = "8:{BC345328-E944-4F2F-9559-E95043070B11}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.6.13" + "ProductVersion" = "8:1.6.14" "Manufacturer" = "8:winglessraven" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" diff --git a/Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManager.msi b/Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManagerInstaller.msi similarity index 76% rename from Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManager.msi rename to Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManagerInstaller.msi index 95843e7..1cf75f5 100644 Binary files a/Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManager.msi and b/Dead Matter Server Manager/DeadMatterServerManagerInstaller/Debug/DeadMatterServerManagerInstaller.msi differ