From ea07f0db3a4a1db6e75f09712cd1b6ac304811cc Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Wed, 21 Jan 2026 21:26:05 +0100 Subject: [PATCH] Show loading indicator during plugin creation --- .../Plugins/PluginManager.xaml.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/DesktopMagic/Plugins/PluginManager.xaml.cs b/src/DesktopMagic/Plugins/PluginManager.xaml.cs index 22bee25..a37a331 100644 --- a/src/DesktopMagic/Plugins/PluginManager.xaml.cs +++ b/src/DesktopMagic/Plugins/PluginManager.xaml.cs @@ -476,6 +476,8 @@ public partial class PluginManager : Page return; } + pluginManagerDataContext.IsLoading = true; + PluginMetadata pluginMetadata = new(pluginName, pluginId); _ = Directory.CreateDirectory(pluginPath); @@ -588,18 +590,22 @@ public class {pluginSafeName}Plugin : Plugin { App.Logger.LogInfo($"Opening plugin project in Explorer: {pluginProjectPath}", source: "PluginManager"); _ = Process.Start("explorer.exe", pluginProjectPath); - return; + } + else + { + App.Logger.LogInfo($"Opening plugin project in IDE: {associatedProgram}", source: "PluginManager"); + ProcessStartInfo psi = new ProcessStartInfo + { + FileName = associatedProgram, + Arguments = csprojPath, + }; + + _ = Process.Start(psi); } - App.Logger.LogInfo($"Opening plugin project in IDE: {associatedProgram}", source: "PluginManager"); - ProcessStartInfo psi = new ProcessStartInfo - { - FileName = associatedProgram, - Arguments = csprojPath, - }; - - _ = Process.Start(psi); App.Logger.LogInfo($"Successfully created plugin: {pluginName}", source: "PluginManager"); + + pluginManagerDataContext.IsLoading = false; } private async void LogInButton_Click(object sender, RoutedEventArgs e)