using SettingModule.Views;
using SettingModule.Views.Dialogs;
using System.Reflection;

namespace SettingModule
{
    [Module(OnDemand = true)]
    public class SettingModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            IRegionManager regionManager = containerProvider.Resolve<IRegionManager>();
            regionManager.RegisterViewWithRegion("ShellViewManager", typeof(SettingView));
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<SettingView>("SettingView");

            // 设备连接配置弹窗
            containerRegistry.RegisterDialog<TCPConfigView>("TCPConfig");
            containerRegistry.RegisterDialog<SerialPortConfigView>("SerialPortConfig");
            containerRegistry.RegisterDialog<CANConfigView>("CANConfig");
        }
    }
}
