diff --git a/.gitmodules b/.gitmodules index e9dae76..9ebc035 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,3 +12,6 @@ [submodule "External/LibSQLite-ps4"] path = External/LibSQLite-ps4 url = https://github.com/bucanero/libSQLite-ps4 +[submodule "External/HexView"] + path = External/HexView + url = https://github.com/OSM-Made/HexView.Wpf diff --git a/External/HexView b/External/HexView new file mode 160000 index 0000000..e7a373f --- /dev/null +++ b/External/HexView @@ -0,0 +1 @@ +Subproject commit e7a373f06cf61548bf843bcbd20fa27b9a97b2d9 diff --git a/Orbis Suite 3.0.sln b/Orbis Suite 3.0.sln index 8ee958c..95811b2 100644 --- a/Orbis Suite 3.0.sln +++ b/Orbis Suite 3.0.sln @@ -47,7 +47,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OrbisLibAPI", "Playstation\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OrbisLibGeneralHelper", "Playstation\OrbisLibGeneralHelper\OrbisLibGeneralHelper.vcxproj", "{F0E3446E-D9D7-4F44-AC98-797C5124BE91}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrbisLib2", "Windows\Libraries\OrbisLib2\OrbisLib2.csproj", "{75BA171D-708A-40AA-A27D-57150E5DFB7B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrbisLib2", "Windows\Libraries\OrbisLib2\OrbisLib2.csproj", "{75BA171D-708A-40AA-A27D-57150E5DFB7B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrbisPeeknPoke", "Windows\OrbisPeeknPoke\OrbisPeeknPoke.csproj", "{90180080-9585-499C-99A8-6F4D1725CAF4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -237,6 +239,22 @@ Global {75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|x64.Build.0 = Release|Any CPU {75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|x86.ActiveCfg = Release|Any CPU {75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|x86.Build.0 = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Win32.ActiveCfg = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Win32.Build.0 = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x64.ActiveCfg = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x64.Build.0 = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x86.ActiveCfg = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x86.Build.0 = Debug|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Any CPU.Build.0 = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Win32.ActiveCfg = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Win32.Build.0 = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x64.ActiveCfg = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x64.Build.0 = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x86.ActiveCfg = Release|Any CPU + {90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -255,6 +273,7 @@ Global {22E600CA-B7A4-4FA1-A1DB-6BA4736E6121} = {8E8E4C8D-E3E1-4CB9-BD78-7ADAB2F2CF45} {F0E3446E-D9D7-4F44-AC98-797C5124BE91} = {8E8E4C8D-E3E1-4CB9-BD78-7ADAB2F2CF45} {75BA171D-708A-40AA-A27D-57150E5DFB7B} = {72E29C1E-8723-4885-A5ED-BD3A929D81B6} + {90180080-9585-499C-99A8-6F4D1725CAF4} = {8F0E1457-FB1E-47A4-9DA8-74A6B757CAA4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4B6EE1D0-5ADF-44A2-B6EE-E5C8E110EE47} diff --git a/Playstation/OrbisLibAPI/GeneralIPC.cpp b/Playstation/OrbisLibAPI/GeneralIPC.cpp index 881113f..de96d66 100644 --- a/Playstation/OrbisLibAPI/GeneralIPC.cpp +++ b/Playstation/OrbisLibAPI/GeneralIPC.cpp @@ -166,9 +166,15 @@ bool GeneralIPC::LoadLibrary(int pid, const char* Path, int* HandleOut) // Restore the jail. Jail(pid); + // Cleanup + free(Packet); + return false; } + // Cleanup + free(Packet); + // Recieve the result. if (!Sockets::RecvInt(sock, HandleOut)) { @@ -226,6 +232,27 @@ bool GeneralIPC::UnLoadLibrary(int pid, int Handle) return false; } + // Create next packet. + auto Packet = (LibPacket*)malloc(sizeof(LibPacket)); + Packet->Handle = Handle; + + // Send the packet. + if (sceNetSend(sock, Packet, sizeof(LibPacket), 0) < 0) + { + // Close the socket. + sceNetSocketClose(sock); + + // Cleanup + free(Packet); + + klog("[GeneralIPC] Failed to send LibPacket.\n"); + + return false; + } + + // Cleanup + free(Packet); + // Recieve the result. int result = 0; if (!Sockets::RecvInt(sock, &result)) diff --git a/Playstation/OrbisLibAPI/Version.h b/Playstation/OrbisLibAPI/Version.h index 302f62f..dbbfea1 100644 --- a/Playstation/OrbisLibAPI/Version.h +++ b/Playstation/OrbisLibAPI/Version.h @@ -1,11 +1,11 @@ -#pragma once -#define ORBISLIB_MAJOR 3 -#define ORBISLIB_MINOR 0 -#define ORBISLIB_BUILDVERSION 984 -#define stringify(a) stringify_(a) -#define stringify_(a) #a -#if defined(_DEBUG) -#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__) -#else -#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__) -#endif +#pragma once +#define ORBISLIB_MAJOR 3 +#define ORBISLIB_MINOR 0 +#define ORBISLIB_BUILDVERSION 995 +#define stringify(a) stringify_(a) +#define stringify_(a) #a +#if defined(_DEBUG) +#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__) +#else +#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__) +#endif diff --git a/Playstation/OrbisLibAPI/main.cpp b/Playstation/OrbisLibAPI/main.cpp index a053fe5..7c3341b 100644 --- a/Playstation/OrbisLibAPI/main.cpp +++ b/Playstation/OrbisLibAPI/main.cpp @@ -82,7 +82,7 @@ int main() } #endif -// #define KILLSHELLUI + //#define KILLSHELLUI #ifdef KILLSHELLUI sceSystemServiceKillApp(sceLncUtilGetAppId("NPXS20001"), -1, 0, 0); #endif diff --git a/Windows/Installer/BootstrapperSetup/Version.wxi b/Windows/Installer/BootstrapperSetup/Version.wxi index ef60836..af84147 100644 --- a/Windows/Installer/BootstrapperSetup/Version.wxi +++ b/Windows/Installer/BootstrapperSetup/Version.wxi @@ -2,5 +2,5 @@ - + diff --git a/Windows/Installer/DummyInstaller/Generated/OrbisNeighborhood.wxs b/Windows/Installer/DummyInstaller/Generated/OrbisNeighborhood.wxs index e2849a9..19e3338 100644 --- a/Windows/Installer/DummyInstaller/Generated/OrbisNeighborhood.wxs +++ b/Windows/Installer/DummyInstaller/Generated/OrbisNeighborhood.wxs @@ -7,175 +7,175 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -202,169 +202,169 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -519,136 +519,136 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1739,1412 +1739,1421 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -3299,136 +3308,136 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -4519,1244 +4528,1244 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5866,6 +5875,11 @@ + + + + + @@ -5941,6 +5955,16 @@ + + + + + + + + + + diff --git a/Windows/Installer/DummyInstaller/Generated/OrbisSuiteService.wxs b/Windows/Installer/DummyInstaller/Generated/OrbisSuiteService.wxs index 92372f0..aa4050e 100644 --- a/Windows/Installer/DummyInstaller/Generated/OrbisSuiteService.wxs +++ b/Windows/Installer/DummyInstaller/Generated/OrbisSuiteService.wxs @@ -7,16 +7,16 @@ - + - + - + - + @@ -43,73 +43,73 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -264,101 +264,101 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -385,34 +385,34 @@ - + - + - + - + - + - + - + - + - + - + @@ -983,266 +983,280 @@ - + - + - + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + @@ -1428,6 +1442,11 @@ + + + + + @@ -1503,6 +1522,11 @@ + + + + + diff --git a/Windows/OrbisLibraryManager/OrbisLibraryManager.csproj b/Windows/OrbisLibraryManager/OrbisLibraryManager.csproj index 7296203..17187d6 100644 --- a/Windows/OrbisLibraryManager/OrbisLibraryManager.csproj +++ b/Windows/OrbisLibraryManager/OrbisLibraryManager.csproj @@ -32,12 +32,6 @@ - - - - - - diff --git a/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml b/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml index 7749ee0..39daa03 100644 --- a/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml +++ b/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml @@ -8,7 +8,8 @@ xmlns:controls="clr-namespace:OrbisLibraryManager.Controls" xmlns:valueConverters="clr-namespace:OrbisLibraryManager.ValueConverters" mc:Ignorable="d" - Title="LibraryManager" Height="640" Width="980" + Title="LibraryManager" + Height="640" Width="980" MinHeight="640" MinWidth="980" MaxHeight="640" MaxWidth="980" ResizeMode="CanMinimize"> @@ -50,7 +51,7 @@ @@ -202,8 +203,8 @@ - - + + diff --git a/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml.cs b/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml.cs index cf43f26..1fdfb18 100644 --- a/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml.cs +++ b/Windows/OrbisLibraryManager/OrbisLibraryManager.xaml.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using System.Windows; using System.Linq; using System.Threading; +using static OrbisLib2.General.TargetStateChangedEvent; namespace OrbisLibraryManager { @@ -25,6 +26,8 @@ namespace OrbisLibraryManager Events.ProcDetach += Events_ProcDetach; Events.ProcDie += Events_ProcDie; Events.TargetStateChanged += Events_TargetStateChanged; + Events.DBTouched += Events_DBTouched; + Events.SelectedTargetChanged += Events_SelectedTargetChanged; // Update State Task.Run(() => EnableTargetOptions(TargetManager.SelectedTarget.Info.Status == TargetStatusType.APIAvailable)); @@ -139,6 +142,18 @@ namespace OrbisLibraryManager } } + private void Events_DBTouched(object? sender, DBTouchedEvent e) + { + var currentTarget = TargetManager.SelectedTarget; + EnableTargetOptions(currentTarget.Info.Status == TargetStatusType.APIAvailable); + } + + private void Events_SelectedTargetChanged(object? sender, SelectedTargetChangedEvent e) + { + var currentTarget = TargetManager.SelectedTarget; + EnableTargetOptions(currentTarget.Info.Status == TargetStatusType.APIAvailable); + } + #endregion #region Context Menu @@ -153,9 +168,11 @@ namespace OrbisLibraryManager var selectedLibrary = LibraryList.SelectedItems.Cast().FirstOrDefault(); if(selectedLibrary != null) { + var Handle = (int)selectedLibrary.Handle; + Task.Run(() => { - TargetManager.SelectedTarget.Debug.UnloadLibrary((int)selectedLibrary.Handle); + TargetManager.SelectedTarget.Debug.UnloadLibrary(Handle); Dispatcher.Invoke(() => RefreshLibraryList()); }); } @@ -166,11 +183,14 @@ namespace OrbisLibraryManager var selectedLibrary = LibraryList.SelectedItems.Cast().FirstOrDefault(); if (selectedLibrary != null) { + var Handle = (int)selectedLibrary.Handle; + var Path = selectedLibrary.Path; + Task.Run(() => { - TargetManager.SelectedTarget.Debug.UnloadLibrary((int)selectedLibrary.Handle); + TargetManager.SelectedTarget.Debug.UnloadLibrary(Handle); Thread.Sleep(2000); - TargetManager.SelectedTarget.Debug.LoadLibrary(selectedLibrary.Path); + TargetManager.SelectedTarget.Debug.LoadLibrary(Path); Dispatcher.Invoke(() => RefreshLibraryList()); }); } @@ -188,7 +208,9 @@ namespace OrbisLibraryManager { Task.Run(() => { - TargetManager.SelectedTarget.Debug.LoadLibrary(SPRXPath.FieldText); + string Path = string.Empty; + Dispatcher.Invoke(() => Path = SPRXPath.FieldText); + TargetManager.SelectedTarget.Debug.LoadLibrary(Path); Dispatcher.Invoke(() => RefreshLibraryList()); }); } @@ -204,9 +226,11 @@ namespace OrbisLibraryManager var library = libraryList.Find(x => x.Path == SPRXPath.FieldText); if (library != null) { + var Handle = (int)library.Handle; + Task.Run(() => { - TargetManager.SelectedTarget.Debug.UnloadLibrary((int)library.Handle); + TargetManager.SelectedTarget.Debug.UnloadLibrary(Handle); Dispatcher.Invoke(() => RefreshLibraryList()); }); } @@ -222,11 +246,14 @@ namespace OrbisLibraryManager var library = libraryList.Find(x => x.Path == SPRXPath.FieldText); if (library != null) { + var Handle = (int)library.Handle; + var Path = library.Path; + Task.Run(() => { - TargetManager.SelectedTarget.Debug.UnloadLibrary((int)library.Handle); + TargetManager.SelectedTarget.Debug.UnloadLibrary(Handle); Thread.Sleep(2000); - TargetManager.SelectedTarget.Debug.LoadLibrary(library.Path); + TargetManager.SelectedTarget.Debug.LoadLibrary(Path); Dispatcher.Invoke(() => RefreshLibraryList()); }); } diff --git a/Windows/OrbisNeighborHood/MVVM/View/DashboardView.xaml b/Windows/OrbisNeighborHood/MVVM/View/DashboardView.xaml index 97fb88d..fa93085 100644 --- a/Windows/OrbisNeighborHood/MVVM/View/DashboardView.xaml +++ b/Windows/OrbisNeighborHood/MVVM/View/DashboardView.xaml @@ -213,7 +213,7 @@ Click="LaunchDebugger_Click"/> diff --git a/Windows/OrbisNeighborHood/Resources/BuildNumber.txt b/Windows/OrbisNeighborHood/Resources/BuildNumber.txt index 42dfd9d..3d212cf 100644 --- a/Windows/OrbisNeighborHood/Resources/BuildNumber.txt +++ b/Windows/OrbisNeighborHood/Resources/BuildNumber.txt @@ -1 +1 @@ -2371 +2415 diff --git a/Windows/OrbisNeighborHood/Resources/BuildString.txt b/Windows/OrbisNeighborHood/Resources/BuildString.txt index ff9132f..441d891 100644 --- a/Windows/OrbisNeighborHood/Resources/BuildString.txt +++ b/Windows/OrbisNeighborHood/Resources/BuildString.txt @@ -1 +1 @@ -Version 3.0.2371 Debug Build Saturday January 07 2023 8:48 PM +Version 3.0.2415 Debug Build Sunday January 15 2023 5:32 PM diff --git a/Windows/OrbisPeeknPoke/App.xaml b/Windows/OrbisPeeknPoke/App.xaml new file mode 100644 index 0000000..897a6e8 --- /dev/null +++ b/Windows/OrbisPeeknPoke/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/Windows/OrbisPeeknPoke/App.xaml.cs b/Windows/OrbisPeeknPoke/App.xaml.cs new file mode 100644 index 0000000..3bcd0ec --- /dev/null +++ b/Windows/OrbisPeeknPoke/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace OrbisPeeknPoke +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Windows/OrbisPeeknPoke/AssemblyInfo.cs b/Windows/OrbisPeeknPoke/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/Windows/OrbisPeeknPoke/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[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) +)] diff --git a/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml b/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml new file mode 100644 index 0000000..4c4296b --- /dev/null +++ b/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml.cs b/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml.cs new file mode 100644 index 0000000..f107d78 --- /dev/null +++ b/Windows/OrbisPeeknPoke/Controls/CurrentTargetDisplay.xaml.cs @@ -0,0 +1,118 @@ +using OrbisLib2.Common.Database.Types; +using OrbisLib2.General; +using OrbisLib2.Targets; +using System; +using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace OrbisPeeknPoke.Controls +{ + /// + /// Interaction logic for CurrentTargetDisplay.xaml + /// + public partial class CurrentTargetDisplay : UserControl + { + public CurrentTargetDisplay() + { + InitializeComponent(); + + Events.DBTouched += Events_DBTouched; + Events.TargetStateChanged += Events_TargetStateChanged; + Events.SelectedTargetChanged += Events_SelectedTargetChanged; + + RefreshTarget(); + } + + private void Events_SelectedTargetChanged(object? sender, SelectedTargetChangedEvent e) + { + Dispatcher.Invoke(() => { RefreshTarget(); }); + } + + private void Events_TargetStateChanged(object? sender, TargetStateChangedEvent e) + { + Dispatcher.Invoke(() => { RefreshTarget(); }); + } + + private void Events_DBTouched(object? sender, DBTouchedEvent e) + { + Dispatcher.Invoke(() => { RefreshTarget(); }); + } + + private void RefreshTarget() + { + var CurrentTarget = TargetManager.SelectedTarget; + + if (CurrentTarget != null) + { + switch (CurrentTarget.Info.Status) + { + case TargetStatusType.Offline: + CurrentTargetState.Fill = new SolidColorBrush(Color.FromRgb(255, 0, 0)); + CurrentTargetState.ToolTip = "Offline"; + break; + + case TargetStatusType.Online: + CurrentTargetState.Fill = new SolidColorBrush(Color.FromRgb(255, 140, 0)); + CurrentTargetState.ToolTip = "Online"; + break; + + case TargetStatusType.APIAvailable: + CurrentTargetState.Fill = new SolidColorBrush(Color.FromRgb(0, 128, 0)); + CurrentTargetState.ToolTip = "Online & API Available"; + break; + + default: + CurrentTargetState.Fill = new SolidColorBrush(Color.FromRgb(255, 0, 0)); + CurrentTargetState.ToolTip = "Unknown"; + break; + } + + CurrentTargetName.Text = CurrentTarget.IsDefault ? $"★{CurrentTarget.Name}" : CurrentTarget.Name; + + if (CurrentTarget.Info.BigAppTitleID == null || !Regex.IsMatch(CurrentTarget.Info.BigAppTitleID, @"CUSA\d{5}")) + { + CurrentTargetTitleName.Text = "Unknown Title"; + CurrentTargetTitleId.Text = "-"; + CurrentTargetTitleImage.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisPeeknPoke;component/Images/DefaultTitleIcon.png")); + } + else + { + var Title = new TMDB(CurrentTarget.Info.BigAppTitleID); + Regex rgx = new Regex(@"[^0-9a-zA-Z +.:']"); + CurrentTargetTitleName.Text = Title.Names.First(); + CurrentTargetTitleId.Text = Title.NPTitleID; + var test = Title.BGM; + CurrentTargetTitleImage.Source = new BitmapImage(new Uri(Title.Icons.First())); + } + } + } + + private void CurrentTargetTitleImage_MouseDown(object sender, MouseButtonEventArgs e) + { + var CurrentTarget = TargetManager.SelectedTarget; + + if (CurrentTarget != null && CurrentTarget.Info.BigAppTitleID != null && Regex.IsMatch(CurrentTarget.Info.BigAppTitleID, @"CUSA\d{5}")) + { + var Title = new TMDB(CurrentTarget.Info.BigAppTitleID); + var url = $"https://store.playstation.com/product/{Title.ContentID}/"; + + System.Diagnostics.Process.Start(new ProcessStartInfo + { + FileName = url, + UseShellExecute = true + }); + } + } + + private void CurrentTargetName_MouseDown(object sender, MouseButtonEventArgs e) + { + OrbisLib2.Dialog.SelectTarget.ShowDialog(Window.GetWindow(this)); + } + } +} diff --git a/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml b/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml new file mode 100644 index 0000000..862d175 --- /dev/null +++ b/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml.cs b/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml.cs new file mode 100644 index 0000000..05b32f7 --- /dev/null +++ b/Windows/OrbisPeeknPoke/Controls/ImageButton.xaml.cs @@ -0,0 +1,56 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Imaging; + +namespace OrbisPeeknPoke.Controls +{ + /// + /// Interaction logic for ImageButton.xaml + /// + public partial class ImageButton : UserControl + { + public event EventHandler? Click; + + public ImageButton() + { + InitializeComponent(); + } + + public string ImageSource + { + get { return (string)GetValue(ImageSourceProperty); } + set { SetValue(ImageSourceProperty, value); } + } + + public static readonly DependencyProperty ImageSourceProperty = + DependencyProperty.Register("ImageSource", typeof(string), typeof(ImageButton), new PropertyMetadata(string.Empty, ImageSource_Changed)); + + private static void ImageSource_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var currentControl = (ImageButton)d; + currentControl.ButtonImage.Source = new BitmapImage(new Uri($"pack://application:,,,{(string)e.NewValue}")); + currentControl.ButtonImage.Opacity = currentControl.IsEnabled ? 1 : 0.5; + } + + public int ImageMargin + { + get { return (int)GetValue(ImageMarginProperty); } + set { SetValue(ImageMarginProperty, value); } + } + + public static readonly DependencyProperty ImageMarginProperty = + DependencyProperty.Register("ImageMargin", typeof(int), typeof(ImageButton), new PropertyMetadata(0)); + + private void ImageButtonElement_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) + { + ButtonImage.Source = new BitmapImage(new Uri($"pack://application:,,,{ImageSource}")); + ButtonImage.Opacity = IsEnabled ? 1 : 0.5; + } + + private void SimpleButton_Click(object sender, RoutedEventArgs e) + { + Click?.Invoke(sender, e); + } + } +} diff --git a/Windows/OrbisPeeknPoke/Images/Attached.png b/Windows/OrbisPeeknPoke/Images/Attached.png new file mode 100644 index 0000000..8a0429a Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/Attached.png differ diff --git a/Windows/OrbisPeeknPoke/Images/DefaultTitleIcon.png b/Windows/OrbisPeeknPoke/Images/DefaultTitleIcon.png new file mode 100644 index 0000000..089293a Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/DefaultTitleIcon.png differ diff --git a/Windows/OrbisPeeknPoke/Images/Detached.png b/Windows/OrbisPeeknPoke/Images/Detached.png new file mode 100644 index 0000000..9dc8e78 Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/Detached.png differ diff --git a/Windows/OrbisPeeknPoke/Images/KillProcess.png b/Windows/OrbisPeeknPoke/Images/KillProcess.png new file mode 100644 index 0000000..202ef8b Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/KillProcess.png differ diff --git a/Windows/OrbisPeeknPoke/Images/RestMode.png b/Windows/OrbisPeeknPoke/Images/RestMode.png new file mode 100644 index 0000000..c0d42be Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/RestMode.png differ diff --git a/Windows/OrbisPeeknPoke/Images/Restart.png b/Windows/OrbisPeeknPoke/Images/Restart.png new file mode 100644 index 0000000..44fb5d3 Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/Restart.png differ diff --git a/Windows/OrbisPeeknPoke/Images/Send.png b/Windows/OrbisPeeknPoke/Images/Send.png new file mode 100644 index 0000000..2272ca5 Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/Send.png differ diff --git a/Windows/OrbisPeeknPoke/Images/Shutdown.png b/Windows/OrbisPeeknPoke/Images/Shutdown.png new file mode 100644 index 0000000..bf3aae0 Binary files /dev/null and b/Windows/OrbisPeeknPoke/Images/Shutdown.png differ diff --git a/Windows/OrbisPeeknPoke/OrbisPeeknPoke.csproj b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.csproj new file mode 100644 index 0000000..38e1a81 --- /dev/null +++ b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.csproj @@ -0,0 +1,75 @@ + + + + WinExe + net6.0-windows + enable + true + + OrbisPeeknPoke.ico + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + ..\..\External\SimpleUI\SimpleUI\bin\Debug\net6.0-windows\Microsoft.Expression.Drawing.dll + + + ..\..\External\SimpleUI\SimpleUI\bin\Debug\net6.0-windows\SimpleUI.dll + + + C:\Users\grego\.nuget\packages\wpfhexaeditor\2.1.7\lib\net5.0-windows7.0\WPFHexaEditor.dll + + + + + + + + + + + + diff --git a/Windows/OrbisPeeknPoke/OrbisPeeknPoke.ico b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.ico new file mode 100644 index 0000000..d9f5f16 Binary files /dev/null and b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.ico differ diff --git a/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml new file mode 100644 index 0000000..2b4ff62 --- /dev/null +++ b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Address: 0x400000 + + + + + Offset: 0x100 + + + + + + + + + + + + diff --git a/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml.cs b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml.cs new file mode 100644 index 0000000..ca66387 --- /dev/null +++ b/Windows/OrbisPeeknPoke/OrbisPeeknPoke.xaml.cs @@ -0,0 +1,238 @@ +using OrbisLib2.Common.Database.Types; +using OrbisLib2.Common.Dispatcher; +using OrbisLib2.Dialog; +using OrbisLib2.General; +using OrbisLib2.Targets; +using SimpleUI.Controls; +using System.IO; +using System.Windows; +using WpfHexaEditor; + +namespace OrbisPeeknPoke +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : SimpleWindow + { + public MainWindow() + { + InitializeComponent(); + DispatcherClient.Subscribe(); + + Events.ProcAttach += Events_ProcAttach; + Events.ProcDetach += Events_ProcDetach; + Events.ProcDie += Events_ProcDie; + Events.TargetStateChanged += Events_TargetStateChanged; + Events.DBTouched += Events_DBTouched; + Events.SelectedTargetChanged += Events_SelectedTargetChanged; + + + } + + public byte[] testData = + { + 0x2F, 0x6C, 0x69, 0x62, 0x65, 0x78, 0x65, 0x63, 0x2F, 0x6C, 0x64, 0x2D, + 0x65, 0x6C, 0x66, 0x2E, 0x73, 0x6F, 0x2E, 0x31, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x48, 0x89, 0xE5, + 0x41, 0x57, 0x41, 0x56, 0x53, 0x50, 0x48, 0x8D, 0x1D, 0x0F, 0x7E, 0x62, + 0x01, 0x4C, 0x8D, 0x35, 0xE8, 0x7D, 0x62, 0x01, 0x48, 0x3B, 0x1D, 0x59, + 0x08, 0x60, 0x01, 0x73, 0x33, 0x4C, 0x8D, 0x3D, 0xF8, 0x7D, 0x62, 0x01, + 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x8B, 0x03, 0x48, + 0x85, 0xC0, 0x74, 0x02, 0xFF, 0xD0, 0x48, 0x83, 0xC3, 0x08, 0x4C, 0x39, + 0xFB, 0x72, 0xED, 0xEB, 0x0F, 0x66, 0x66, 0x2E, 0x0F, 0x1F, 0x84, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x49, 0x83, 0xC6, 0xF8, 0x49, 0x8B, 0x06, 0x48, + 0x85, 0xC0, 0x74, 0xF4, 0x48, 0x83, 0xF8, 0xFF, 0x74, 0x04, 0xFF, 0xD0, + 0xEB, 0xEA, 0x48, 0x83, 0xC4, 0x08, 0x5B, 0x41, 0x5E, 0x41, 0x5F, 0x5D, + 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x48, 0x89, 0xE5, 0x41, 0x57, 0x41, 0x56, + 0x53, 0x50, 0x44, 0x8B, 0x37, 0x48, 0x89, 0xF3, 0x4C, 0x8D, 0x7F, 0x08, + 0xE8, 0xC7, 0xC7, 0x21, 0x01, 0x48, 0x89, 0xDF, 0xE8, 0xCF, 0xC7, 0x21, + 0x01, 0x48, 0x8D, 0x3D, 0xA8, 0xE2, 0x20, 0x01, 0xE8, 0xC3, 0xC7, 0x21, + 0x01, 0xE8, 0x4E, 0xFF, 0xFF, 0xFF, 0x31, 0xD2, 0x44, 0x89, 0xF7, 0x4C, + 0x89, 0xFE, 0xE8, 0x21, 0xB4, 0xEC, 0x00, 0x89, 0xC3, 0x89, 0xDF, 0xE8, + 0xB8, 0xC7, 0x21, 0x01, 0x89, 0xDF, 0xE8, 0x41, 0xB2, 0x21, 0x01, 0x0F, + 0x0B, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, + 0x90, 0x90, 0x90, 0x90, 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10, + 0x89, 0x4C, 0x24, 0x08, 0x48, 0x89, 0x14, 0x24, 0xBA, 0x08, 0x00, 0x00, + 0x00, 0xB9, 0x0F, 0x00, 0x00, 0x00, 0x41, 0xB8, 0x08, 0x00, 0x00, 0x00, + 0x45, 0x31, 0xC9, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x10, + 0x5D, 0xC3, 0x66, 0x90, 0x55, 0x48, 0x89, 0xE5, 0x41, 0x57, 0x41, 0x56, + 0x41, 0x55, 0x41, 0x54, 0x53, 0x48, 0x83, 0xEC, 0x18, 0x45, 0x89, 0xC4, + 0x49, 0x89, 0xFD, 0x48, 0x8B, 0x45, 0x10, 0x41, 0xBE, 0xFA, 0xFF, 0xFF, + 0xFF, 0x48, 0x85, 0xC0, 0x0F, 0x84, 0x17, 0x03, 0x00, 0x00, 0x0F, 0xB6, + 0x00, 0x83, 0xF8, 0x31, 0x0F, 0x85, 0x0B, 0x03, 0x00, 0x00, 0x83, 0x7D, + 0x18, 0x70, 0x0F, 0x85, 0x01, 0x03, 0x00, 0x00, 0x41, 0xBE, 0xFE, 0xFF, + 0xFF, 0xFF, 0x4D, 0x85, 0xED, 0x0F, 0x84, 0xF2, 0x02, 0x00, 0x00, 0x49, + 0xC7, 0x45, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x8B, 0x45, 0x40, 0x48, + 0x85, 0xC0, 0x75, 0x13, 0x48, 0x8D, 0x05, 0x19, 0x84, 0x00, 0x00, 0x49, + 0x89, 0x45, 0x40, 0x49, 0xC7, 0x45, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x83, 0x7D, 0x48, 0x00, 0x75, 0x0B, 0x48, 0x8D, 0x3D, 0x0F, 0x84, 0x00, + 0x00, 0x49, 0x89, 0x7D, 0x48, 0x83, 0xFE, 0xFF, 0xBF, 0x06, 0x00, 0x00, + 0x00, 0x0F, 0x45, 0xFE, 0x85, 0xC9, 0x78, 0x15, 0x8D, 0x71, 0xF0, 0x83, + 0xF9, 0x0F, 0x0F, 0x9F, 0xC3, 0x0F, 0x4E, 0xF1, 0x0F, 0xB6, 0xDB, 0xFF, + 0xC3, 0x89, 0xF1, 0xEB, 0x04, 0xF7, 0xD9, 0x31, 0xDB, 0x41, 0x8D, 0x74, + 0x24, 0xFF, 0x83, 0xFE, 0x08, 0x0F, 0x87, 0x86, 0x02, 0x00, 0x00, 0x83, + 0xFA, 0x08, 0x0F, 0x85, 0x7D, 0x02, 0x00, 0x00, 0x83, 0xF9, 0x08, 0x0F, + 0x8C, 0x74, 0x02, 0x00, 0x00, 0x83, 0xF9, 0x0F + }; + + + #region Events + + private void EnableProgram(bool Attached) + { + if (Attached) + { + // Try to load memory window. + } + else + { + // Clear memory window. + } + + DetachProcess.IsEnabled = Attached; + KillProcess.IsEnabled = Attached; + } + + private void EnableTargetOptions(bool state) + { + Dispatcher.Invoke(() => + { + AttachProcess.IsEnabled = state; + DetachProcess.IsEnabled = state; + LoadSomething.IsEnabled = state; + RestartTarget.IsEnabled = state; + ShutdownTarget.IsEnabled = state; + + EnableProgram(TargetManager.SelectedTarget.Debug.IsDebugging); + }); + } + + private void Events_TargetStateChanged(object? sender, TargetStateChangedEvent e) + { + EnableTargetOptions(e.State == TargetStateChangedEvent.TargetState.APIAvailable); + } + + private void Events_ProcDie(object? sender, ProcDieEvent e) + { + if (e.SendingTarget.IPAddress == TargetManager.SelectedTarget.IPAddress) + { + Dispatcher.Invoke(() => + { + CurrentDebuggingProccess.FieldText = "N/A"; + EnableProgram(false); + }); + } + } + + private void Events_ProcDetach(object? sender, ProcDetachEvent e) + { + if (e.SendingTarget.IPAddress == TargetManager.SelectedTarget.IPAddress) + { + Dispatcher.Invoke(() => + { + CurrentDebuggingProccess.FieldText = "N/A"; + EnableProgram(false); + }); + } + } + + private void Events_ProcAttach(object? sender, ProcAttachEvent e) + { + if (e.SendingTarget.IPAddress == TargetManager.SelectedTarget.IPAddress) + { + var processList = TargetManager.SelectedTarget.Process.GetList(); + var proc = processList.Find(x => x.ProcessId == e.NewProcessId); + if (proc != null) + { + Dispatcher.Invoke(() => + { + CurrentDebuggingProccess.FieldText = $"{proc.Name}({e.NewProcessId})"; + EnableProgram(true); + }); + } + } + } + + private void Events_DBTouched(object? sender, DBTouchedEvent e) + { + var currentTarget = TargetManager.SelectedTarget; + EnableTargetOptions(currentTarget.Info.Status == TargetStatusType.APIAvailable); + } + + private void Events_SelectedTargetChanged(object? sender, SelectedTargetChangedEvent e) + { + var currentTarget = TargetManager.SelectedTarget; + EnableTargetOptions(currentTarget.Info.Status == TargetStatusType.APIAvailable); + } + + #endregion + + #region Buttons + + private void SelectBase_Click(object sender, RoutedEventArgs e) + { + + } + + private void Peek_Click(object sender, RoutedEventArgs e) + { + HexBox.DataSource = new BinaryReader(new MemoryStream(testData)); + //HexBox.DataContext = new BinaryReader(new MemoryStream(testData)); + //HexBox.a = 0x400000; + } + + private void Poke_Click(object sender, RoutedEventArgs e) + { + + } + + private void AttachProcess_Click(object sender, RoutedEventArgs e) + { + SelectProcess.ShowDialog(GetWindow(this)); + } + + private void DetachProcess_Click(object sender, RoutedEventArgs e) + { + TargetManager.SelectedTarget.Debug.Detach(); + } + + private void LoadSomething_Click(object sender, RoutedEventArgs e) + { + + } + + private void KillProcess_Click(object sender, RoutedEventArgs e) + { + var currentTarget = TargetManager.SelectedTarget; + var processList = TargetManager.SelectedTarget.Process.GetList(); + var process = processList.Find(x => x.ProcessId == currentTarget.Debug.GetCurrentProcessId()); + if (process != null) + { + if (process.AppId > 0) + { + currentTarget.Application.Stop(process.TitleId); + } + else + { + SimpleMessageBox.ShowError(Window.GetWindow(this), $"Could not kill process \"{process.Name}\" because Orbis Suite doesnt currently support killing processes with out an appId.", "Error: Could not kill this process."); + } + } + } + + private void RestartTarget_Click(object sender, RoutedEventArgs e) + { + TargetManager.SelectedTarget.Reboot(); + } + + private void ShutdownTarget_Click(object sender, RoutedEventArgs e) + { + TargetManager.SelectedTarget.Shutdown(); + } + + #endregion + + + } +}