diff --git a/SettingModule/ViewModels/SettingViewModel.cs b/SettingModule/ViewModels/SettingViewModel.cs index f4999bd..38c0da9 100644 --- a/SettingModule/ViewModels/SettingViewModel.cs +++ b/SettingModule/ViewModels/SettingViewModel.cs @@ -8,7 +8,13 @@ using UIShare.ViewModelBase; namespace SettingModule.ViewModels { - + /// + /// 设置界面 VM —— 复用与 RecordView/MonitorView 相同的范式: + /// - ScopedContext 隔离(每工位独立一份) + /// - 双击展开(ExpandViewEvent + GlobalInfo.CurrentScope) + /// - OnNavigatedTo 取 Name 参数作为工位标题 + /// 设备数据来源:注入的 SystemConfig.DeviceList(Scoped 注入,每工位一份)。 + /// public class SettingViewModel : NavigateViewModelBase, IRegionMemberLifetime, IDisposable { #region 私有字段 @@ -16,6 +22,14 @@ namespace SettingModule.ViewModels private readonly SystemConfig _systemConfig; #endregion + #region 系统参数(暴露给 XAML 绑定) + /// + /// 公开 SystemConfig 实例供 XAML 绑定(Tab 2"系统参数"页用)。 + /// 这是 Scoped 实例,每个工位一份,互不影响。 + /// + public SystemConfig SystemConfig => _systemConfig; + #endregion + #region 隔离 / 标题 public bool KeepAlive => true; public ScopedContext _scopedContext { get; } diff --git a/SettingModule/Views/SettingView.xaml b/SettingModule/Views/SettingView.xaml index 84a2ed7..62c2887 100644 --- a/SettingModule/Views/SettingView.xaml +++ b/SettingModule/Views/SettingView.xaml @@ -16,18 +16,14 @@ - - - - - - - - - - - - - - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + +