TcpClientModuleModule.cs 948 B

123456789101112131415161718192021222324252627
  1. using Prism.Ioc;
  2. using Prism.Modularity;
  3. using Prism.Regions;
  4. using System.Configuration;
  5. using TcpClientModule.Views;
  6. namespace TcpClientModule
  7. {
  8. public class TcpClientModuleModule : IModule
  9. {
  10. public void OnInitialized(IContainerProvider containerProvider)
  11. {
  12. var regionManager = containerProvider.Resolve<RegionManager>();
  13. regionManager.RegisterViewWithRegion("EditRegion", typeof(TcpClientView));
  14. regionManager.RegisterViewWithRegion("EditRegion", typeof(TcpClientSendView));
  15. regionManager.RegisterViewWithRegion("EditRegion", typeof(TcpClientRcvView));
  16. }
  17. public void RegisterTypes(IContainerRegistry containerRegistry)
  18. {
  19. containerRegistry.RegisterSingleton<TcpClientView>();
  20. containerRegistry.RegisterSingleton<TcpClientSendView>();
  21. containerRegistry.RegisterSingleton<TcpClientRcvView>();
  22. }
  23. }
  24. }