From e528e98507e3822edb20390d95716f0385c5b826 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 13 Jul 2025 13:51:53 +0300 Subject: Fixed module loading issue. --- .../Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs index 14f9db927..668188901 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Modules/DefaultPPCModuleLoader.cs @@ -16,6 +16,7 @@ using Tango.PPC.Jobs; using System.Windows.Data; using Tango.Core.DI; using Tango.Settings; +using System.Threading; namespace Tango.PPC.UI.Modules { @@ -89,18 +90,18 @@ namespace Tango.PPC.UI.Modules if (!_loaded) { - //Preloaded - if (settings.UseJobsModuleV2) - { - LogManager.Log(String.Format("Loading module '{0}'...", nameof(JobsV2Module))); - AllModules.Add(new JobsV2Module()); - } - else - { - //LogManager.Log(String.Format("Loading module '{0}'...", nameof(JobsModule))); - //AllModules.Add(new JobsModule()); - } - //Preloaded + ////Preloaded + //if (settings.UseJobsModuleV2) + //{ + // LogManager.Log(String.Format("Loading module '{0}'...", nameof(JobsV2Module))); + // AllModules.Add(new JobsV2Module()); + //} + //else + //{ + // //LogManager.Log(String.Format("Loading module '{0}'...", nameof(JobsModule))); + // //AllModules.Add(new JobsModule()); + //} + ////Preloaded AllModules.Clear(); string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); @@ -162,6 +163,8 @@ namespace Tango.PPC.UI.Modules UserModules = AllModules.ToObservableCollection(); } + Thread.Sleep(1000); + ModulesLoaded?.Invoke(this, new EventArgs()); } -- cgit v1.3.1