设备列表

This commit is contained in:
hsc
2026-06-10 16:27:35 +08:00
parent 2e07c0c446
commit 420ca0ffd6
12 changed files with 189 additions and 38 deletions

View File

@@ -47,7 +47,7 @@ namespace MainModule.ViewModels
public ICommand RefreshCommand { get; set; }
public ICommand BackToProtocolCommand { get; set; }
public AutomatedTestingViewModel(IContainerProvider container) : base(container)
public AutomatedTestingViewModel(IContainerExtension container) : base(container)
{
// 每个 AutomatedTestingViewModel 实例创建独立的容器作用域
_scope = container.CreateScope();
@@ -55,7 +55,7 @@ namespace MainModule.ViewModels
// 在该作用域内解析 ScopedContext —— 当前作用域唯一
_scopedContext = _scope.Resolve<ScopedContext>();
_stepRunning = _scope.Resolve<StepRunning>();
_systemConfig = _scope.Resolve<SystemConfig>();;
_systemConfig = _scope.Resolve<SystemConfig>();
// 关键:从同一个 _scope 解析 5 个子 VMDI 会把同一个 ScopedContext 注入它们
CommandTreeVM = _scope.Resolve<CommandTreeViewModel>();
StepsManagerVM = _scope.Resolve<StepsManagerViewModel>();
@@ -64,7 +64,6 @@ namespace MainModule.ViewModels
ParametersManagerVM = _scope.Resolve<ParametersManagerViewModel>();
RefreshCommand = new DelegateCommand(OnRefresh);
BackToProtocolCommand = new DelegateCommand(OnBackToProtocol);
}
public void Dispose()