From 7ebd370bb90391cdd299982ea4757a721a1ccdb3 Mon Sep 17 00:00:00 2001 From: urdenster <77160546+urdenster@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:17:00 +0300 Subject: [PATCH 1/2] Update MainWindow.xaml.cs --- src/XIVLauncher/Windows/MainWindow.xaml.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/XIVLauncher/Windows/MainWindow.xaml.cs b/src/XIVLauncher/Windows/MainWindow.xaml.cs index f77e54d3b..cc411366c 100644 --- a/src/XIVLauncher/Windows/MainWindow.xaml.cs +++ b/src/XIVLauncher/Windows/MainWindow.xaml.cs @@ -312,7 +312,23 @@ public void Initialize() App.Settings.AutologinEnabled = false; AutoLoginCheckBox.IsChecked = false; } - + + if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control) && Keyboard.Modifiers.HasFlag(ModifierKeys.Alt)) + { + List directoriesToDelete = new List(); + directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "installedPlugins"))); + directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "addon", "Hooks"))); + directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "dalamudAssets"))); + directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "pluginConfigs"))); + directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "dalamudAssets"))); + foreach (var directory in directoriesToDelete) + { + if (directory.Exists) + directory.Delete(true); + } + CustomMessageBox.Show("Dalamud files, installed plugins and their configuration files were deleted.", "Dalamud cleanup."); + } + if (App.Settings.GamePath?.Exists != true) { var setup = new FirstTimeSetup(); @@ -578,4 +594,4 @@ private void RadioButton_MouseLeave(object sender, MouseEventArgs e) _bannerChangeTimer.Start(); } } -} \ No newline at end of file +} From c878fffcae757b3d207b5529c796d0d4aad8714d Mon Sep 17 00:00:00 2001 From: urdenster <77160546+urdenster@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:49:07 +0300 Subject: [PATCH 2/2] Update MainWindow.xaml.cs --- src/XIVLauncher/Windows/MainWindow.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/XIVLauncher/Windows/MainWindow.xaml.cs b/src/XIVLauncher/Windows/MainWindow.xaml.cs index cc411366c..c2d2665d7 100644 --- a/src/XIVLauncher/Windows/MainWindow.xaml.cs +++ b/src/XIVLauncher/Windows/MainWindow.xaml.cs @@ -320,7 +320,6 @@ public void Initialize() directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "addon", "Hooks"))); directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "dalamudAssets"))); directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "pluginConfigs"))); - directoriesToDelete.Add(new DirectoryInfo(Path.Combine(Paths.RoamingPath, "dalamudAssets"))); foreach (var directory in directoriesToDelete) { if (directory.Exists)