1. 在 AppSettings 类中添加了 DefaultPollingInterval 属性,用于存储全局默认轮询间隔值
2. 更新了 SettingViewModel 以包含对轮询间隔设置的支持,允许用户在设置页面中修改该值 3. 修改了 VariableItemViewModel,使其在初始化时从 AppSettings 加载默认轮询间隔值 4. 更新了 SettingView.xaml,在设置页面的"通用设置"部分添加了轮询间隔配置项
This commit is contained in:
@@ -8,6 +8,7 @@ using System;
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
using DMS.Application.Services;
|
||||
using DMS.Infrastructure.Configurations;
|
||||
using DMS.WPF.Helper;
|
||||
using DMS.WPF.Interfaces;
|
||||
using DMS.WPF.Views;
|
||||
@@ -26,18 +27,20 @@ public partial class SplashViewModel : ObservableObject
|
||||
private readonly IInitializeService _initializeService;
|
||||
private readonly IDataEventService _dataEventService;
|
||||
private readonly IAppDataCenterService _appDataCenterService;
|
||||
private readonly AppSettings _appSettings;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _loadingMessage = "正在加载...";
|
||||
|
||||
public SplashViewModel(ILogger<SplashViewModel> logger,IServiceProvider serviceProvider, IInitializeService initializeService,IDataEventService dataEventService,
|
||||
IAppDataCenterService appDataCenterService)
|
||||
IAppDataCenterService appDataCenterService,AppSettings appSettings)
|
||||
{
|
||||
_logger = logger;
|
||||
_serviceProvider = serviceProvider;
|
||||
_initializeService = initializeService;
|
||||
_dataEventService = dataEventService;
|
||||
this._appDataCenterService = appDataCenterService;
|
||||
_appSettings = appSettings;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,6 +55,8 @@ public partial class SplashViewModel : ObservableObject
|
||||
_initializeService.InitializeTables();
|
||||
_initializeService.InitializeMenus();
|
||||
LoadingMessage = "正在加载系统配置...";
|
||||
|
||||
|
||||
await _appDataCenterService.DataLoaderService.LoadAllDataToMemoryAsync();
|
||||
|
||||
// 可以在这里添加加载配置的逻辑
|
||||
|
||||
Reference in New Issue
Block a user