aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2017-12-26 21:16:15 +0200
committerRoy <roy.mail.net@gmail.com>2017-12-26 21:16:15 +0200
commit2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc (patch)
treea21ff27fff08876e835df82c5242def1f0d09c17 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
parent6450fc175114a6f8d0b75cb21386d1bb0c902711 (diff)
downloadTango-2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc.tar.gz
Tango-2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc.zip
MERGE
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);
+ }
}
}
}