使用新框架与技术代替旧框架与技术,实现涂装车间后道标签扫码程序
This commit is contained in:
32
RIZO_Application.Modules.LogModule/LogModule.cs
Normal file
32
RIZO_Application.Modules.LogModule/LogModule.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Prism.Regions;
|
||||
using RIZO_Application.Core;
|
||||
using System.Reflection;
|
||||
using RIZO_Application.Core.Infrastructure.CustomExtensions;
|
||||
|
||||
namespace RIZO_Application.Modules.LogModule
|
||||
{
|
||||
public class LogModule : IModule
|
||||
{
|
||||
private readonly IRegionManager _regionManager;
|
||||
|
||||
public LogModule(IRegionManager regionManager)
|
||||
{
|
||||
_regionManager = regionManager;
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
_regionManager.RequestNavigate(RegionNames.LogRegion, "SystemLog");
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
// 自动注册当前程序集中所有带 [AppService] 的类
|
||||
containerRegistry.AutoRegisterServices(Assembly.GetExecutingAssembly());
|
||||
// 自动注册当前程序集的所有带 [AutoRegisterView] 的视图
|
||||
containerRegistry.AutoRegisterViews(Assembly.GetExecutingAssembly());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user