aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-15 01:09:46 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-15 01:09:46 +0200
commit4cabb5aabc490156b50cd02592926539d48a7af8 (patch)
tree0458fd87417eb06a89c1b15e65d1e0368518fd95 /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication
parent51151796efb23162ca0b3d6701d90dfb6d3baeb9 (diff)
downloadTango-4cabb5aabc490156b50cd02592926539d48a7af8.tar.gz
Tango-4cabb5aabc490156b50cd02592926539d48a7af8.zip
Implmented InternalModule navigation for PPC.
Fixed issue with TangoIOC.GetAllInstancedByBase. Implemented PowerOff Screen.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index 206aa112b..149fb549f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -328,6 +328,8 @@ namespace Tango.PPC.UI.PPCApplication
}
}
+ var internalModules = this.GetType().Assembly.GetTypes().Where(xx => typeof(PPCModuleBase).IsAssignableFrom(xx)).ToList();
+
LogManager.Log("Waiting for IPPCModuleLoader instance injection...");
TangoIOC.Default.GetInstanceWhenAvailable<IPPCModuleLoader>((loader) =>
{
@@ -355,6 +357,19 @@ namespace Tango.PPC.UI.PPCApplication
}
}
}
+
+ //Adding internal modules.
+ LogManager.Log("Loading internal modules...");
+ foreach (var type in internalModules)
+ {
+ var module = Activator.CreateInstance(type) as IPPCModule;
+ LogManager.Log("Loading module view " + module.Name + "...");
+ FrameworkElement view = Activator.CreateInstance(module.MainViewType) as FrameworkElement;
+ SharedUI.Controls.NavigationControl.SetNavigationName(view, module.Name);
+ Views.LayoutView.Instance.NavigationControl.Elements.Add(view);
+ _moduleLoader.AllModules.Add(module);
+ _moduleLoader.UserModules.Add(module);
+ }
});
LogManager.Log($"{loader.UserModules.Count} modules loaded.");