aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
index 689ac7b38..9a8a6bc96 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
@@ -10,6 +10,7 @@ using Tango.Core;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Authentication;
using Tango.MachineStudio.Common.Modules;
+using Tango.MachineStudio.Stubs;
namespace Tango.MachineStudio.UI.Modules
{
@@ -49,6 +50,10 @@ namespace Tango.MachineStudio.UI.Modules
{
if (!_loaded)
{
+ //Preloaded
+ AllModules.Add(new StubsModule());
+ //Preloaded
+
AllModules.Clear();
string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
@@ -63,8 +68,11 @@ namespace Tango.MachineStudio.UI.Modules
{
foreach (var moduleType in moduleAssembly.GetTypes().Where(x => !x.IsInterface && typeof(IStudioModule).IsAssignableFrom(x)))
{
- var module = Activator.CreateInstance(moduleType) as IStudioModule;
- AllModules.Add(module);
+ if (!AllModules.ToList().Exists(x => x.GetType() == moduleType))
+ {
+ var module = Activator.CreateInstance(moduleType) as IStudioModule;
+ AllModules.Add(module);
+ }
}
}
}