From ca50e0c8fc88acd06d6e1932e9412464bff95edb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 12 Jun 2018 19:04:09 +0300 Subject: Working on PPC modules and loading. --- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index cc64f82f5..168df019a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -3,12 +3,33 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.Core.DI; +using Tango.PPC.Common; +using Tango.PPC.Common.Modules; +using Tango.PPC.UI.ViewsContracts; using Tango.SharedUI; namespace Tango.PPC.UI.ViewModels { - public class LayoutViewVM : ViewModel + public class LayoutViewVM : PPCViewModel { + [TangoInject] + public IPPCModuleLoader ModuleLoader { get; set; } + public override void OnApplicationStarted() + { + base.OnApplicationStarted(); + ModuleLoader.ModulesLoaded += ModuleLoader_ModulesLoaded; + } + + private void ModuleLoader_ModulesLoaded(object sender, EventArgs e) + { + View.ApplyModules(ModuleLoader.UserModules); + } + + public override void OnViewAttached() + { + + } } } -- cgit v1.3.1