123456789101112131415161718192021222324252627282930 |
- using Prism.Ioc;
- using Prism.Modularity;
- using Prism.Regions;
- using S7NetModule.Services;
- using S7NetModule.ViewModels;
- using S7NetModule.Views;
- namespace S7NetModule
- {
- public class S7NetModuleModule : IModule
- {
- public void OnInitialized(IContainerProvider containerProvider)
- {
- var regionManager = containerProvider.Resolve<RegionManager>();
- regionManager.RegisterViewWithRegion("EditRegion", typeof(S7NetView));
- regionManager.RegisterViewWithRegion("EditRegion", typeof(S7ReadlView));
- regionManager.RegisterViewWithRegion("EditRegion", typeof(S7WriteView));
- }
- public void RegisterTypes(IContainerRegistry containerRegistry)
- {
- containerRegistry.RegisterSingleton<S7ReadlView>();
- containerRegistry.RegisterSingleton<S7WriteView>();
- containerRegistry.RegisterSingleton<S7NetView>();
- containerRegistry.RegisterSingleton<S7NetViewModel>();
- }
- }
- }
|