diff --git a/Project-Aurora/Project-Aurora/Profiles/DeadCells/Control_DeadCells.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/DeadCells/Control_DeadCells.xaml.cs index c64d0d42e..664bad2b9 100644 --- a/Project-Aurora/Project-Aurora/Profiles/DeadCells/Control_DeadCells.xaml.cs +++ b/Project-Aurora/Project-Aurora/Profiles/DeadCells/Control_DeadCells.xaml.cs @@ -1,4 +1,5 @@ using Aurora.Settings; +using Aurora.Utils; using System; using System.IO; using System.Windows; @@ -29,7 +30,17 @@ private void SetSettings() private void patch_button_Click(object sender, RoutedEventArgs e) { - if (InstallWrapper()) + bool success = false; + + var installpath = SteamUtils.GetGamePath(588650); + if (!String.IsNullOrWhiteSpace(installpath)) + success = InstallWrapper(installpath); + + installpath = GOGUtils.GetGamePath(1237807960); + if (!String.IsNullOrWhiteSpace(installpath)) + success = InstallWrapper(installpath); + + if (success) MessageBox.Show("Aurora Wrapper Patch installed successfully."); else MessageBox.Show("Aurora Wrapper Patch could not be installed.\r\nGame is not installed."); @@ -37,7 +48,17 @@ private void patch_button_Click(object sender, RoutedEventArgs e) private void unpatch_button_Click(object sender, RoutedEventArgs e) { - if (UninstallWrapper()) + bool success = false; + + var installpath = SteamUtils.GetGamePath(588650); + if (!String.IsNullOrWhiteSpace(installpath)) + success = UninstallWrapper(installpath); + + installpath = GOGUtils.GetGamePath(1237807960); + if (!String.IsNullOrWhiteSpace(installpath)) + success = UninstallWrapper(installpath); + + if (success) MessageBox.Show("Aurora Wrapper Patch uninstalled successfully."); else MessageBox.Show("Aurora Wrapper Patch could not be uninstalled.\r\nGame is not installed."); @@ -58,12 +79,8 @@ private void patch_button_manually_Click(object sender, RoutedEventArgs e) private int GameID = 588650; - private bool InstallWrapper(string installpath = "") + private bool InstallWrapper(string installpath) { - if (String.IsNullOrWhiteSpace(installpath)) - installpath = Utils.SteamUtils.GetGamePath(this.GameID); - - if (!String.IsNullOrWhiteSpace(installpath)) { using (BinaryWriter razer_wrapper_86 = new BinaryWriter(new FileStream(System.IO.Path.Combine(installpath, "RzChromaSDK.dll"), FileMode.Create))) @@ -84,9 +101,8 @@ private bool InstallWrapper(string installpath = "") } } - private bool UninstallWrapper() + private bool UninstallWrapper(string installpath) { - String installpath = Utils.SteamUtils.GetGamePath(this.GameID); if (!String.IsNullOrWhiteSpace(installpath)) { string path = System.IO.Path.Combine(installpath, "RzChromaSDK.dll"); diff --git a/Project-Aurora/Project-Aurora/Profiles/Factorio/Control_Factorio.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/Factorio/Control_Factorio.xaml.cs index f8ffa6e6a..a7b17d02f 100644 --- a/Project-Aurora/Project-Aurora/Profiles/Factorio/Control_Factorio.xaml.cs +++ b/Project-Aurora/Project-Aurora/Profiles/Factorio/Control_Factorio.xaml.cs @@ -1,4 +1,5 @@ using Aurora.Settings; +using Aurora.Utils; using System; using System.IO; using System.Windows; @@ -29,7 +30,17 @@ private void SetSettings() private void patch_button_Click(object sender, RoutedEventArgs e) { - if (InstallWrapper()) + bool success = false; + + var installpath = SteamUtils.GetGamePath(427520); + if (!String.IsNullOrWhiteSpace(installpath)) + success = InstallWrapper(installpath); + + installpath = GOGUtils.GetGamePath(1238653230); + if (!String.IsNullOrWhiteSpace(installpath)) + success = InstallWrapper(installpath); + + if (success) MessageBox.Show("Aurora Wrapper Patch installed successfully."); else MessageBox.Show("Aurora Wrapper Patch could not be installed.\r\nGame is not installed."); @@ -37,7 +48,17 @@ private void patch_button_Click(object sender, RoutedEventArgs e) private void unpatch_button_Click(object sender, RoutedEventArgs e) { - if (UninstallWrapper()) + bool success = false; + + var installpath = SteamUtils.GetGamePath(427520); + if (!String.IsNullOrWhiteSpace(installpath)) + success = UninstallWrapper(installpath); + + installpath = GOGUtils.GetGamePath(1238653230); + if (!String.IsNullOrWhiteSpace(installpath)) + success = UninstallWrapper(installpath); + + if (success) MessageBox.Show("Aurora Wrapper Patch uninstalled successfully."); else MessageBox.Show("Aurora Wrapper Patch could not be uninstalled.\r\nGame is not installed."); @@ -56,14 +77,8 @@ private void patch_button_manually_Click(object sender, RoutedEventArgs e) } } - private int GameID = 427520; - - private bool InstallWrapper(string installpath = "") + private bool InstallWrapper(string installpath) { - if (String.IsNullOrWhiteSpace(installpath)) - installpath = Utils.SteamUtils.GetGamePath(this.GameID); - - if (!String.IsNullOrWhiteSpace(installpath)) { using (BinaryWriter razer_wrapper_86 = new BinaryWriter(new FileStream(System.IO.Path.Combine(installpath, "bin" ,"x64" , "RzChromaSDK.dll"), FileMode.Create))) @@ -84,9 +99,8 @@ private bool InstallWrapper(string installpath = "") } } - private bool UninstallWrapper() + private bool UninstallWrapper(string installpath) { - String installpath = Utils.SteamUtils.GetGamePath(this.GameID); if (!String.IsNullOrWhiteSpace(installpath)) { string path = System.IO.Path.Combine(installpath, "bin", "x64", "RzChromaSDK.dll"); diff --git a/Project-Aurora/Project-Aurora/Profiles/HotlineMiami/Control_HM.xaml b/Project-Aurora/Project-Aurora/Profiles/HotlineMiami/Control_HM.xaml index b0255638f..626b8d87a 100644 --- a/Project-Aurora/Project-Aurora/Profiles/HotlineMiami/Control_HM.xaml +++ b/Project-Aurora/Project-Aurora/Profiles/HotlineMiami/Control_HM.xaml @@ -24,7 +24,7 @@ - +