台架8改台架3
This commit is contained in:
@@ -1,18 +1,30 @@
|
||||
using DeviceCommand.Base;
|
||||
using DeviceCommand.Devices;
|
||||
using MainModule.Views;
|
||||
using System.Reflection;
|
||||
using UIShare.GlobalVariable;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
|
||||
namespace MainModule
|
||||
{
|
||||
[Module(OnDemand=true)]
|
||||
[Module(OnDemand = true)]
|
||||
public class MainModule : IModule
|
||||
{
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
IRegionManager regionManager = containerProvider.Resolve<IRegionManager>();
|
||||
|
||||
// 1. 加载主界面
|
||||
regionManager.RegisterViewWithRegion("ShellViewManager", typeof(MainView));
|
||||
|
||||
// 2. 给 3 个台架分别注入测试视图
|
||||
// 当你点击 "台架 1" 的 Tab 时,就会显示这个 AutomatedTestingView
|
||||
regionManager.RegisterViewWithRegion("TestCell1", typeof(AutomatedTestingView));
|
||||
|
||||
// 当你点击 "台架 2" 的 Tab 时,就会显示这个 AutomatedTestingView
|
||||
regionManager.RegisterViewWithRegion("TestCell2", typeof(AutomatedTestingView));
|
||||
|
||||
// 当你点击 "台架 3" 的 Tab 时,就会显示这个 AutomatedTestingView
|
||||
regionManager.RegisterViewWithRegion("TestCell3", typeof(AutomatedTestingView));
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
@@ -22,4 +34,4 @@ namespace MainModule
|
||||
containerRegistry.RegisterForNavigation<ProtocolStartView>("ProtocolStartView");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user