using Logger; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using UIShare.UIViewModel; namespace UIShare.GlobalVariable { public class SystemConfig { [JsonIgnore] public string SystemPath { get; set; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ADP"); [JsonIgnore] public string DLLFilePath { get; set; } = @"D:\ADP\指令\"; [JsonIgnore] public string TSMasterName { get; set; } = "ADP测试上位机"; public string SubProgramFilePath { get; set; } = @"D:\ADP\子程序\"; public string Title { get; set; } = string.Empty; public int PerformanceLevel { get; set; } = 50; public string DefaultProgramFilePath { get; set; } = ""; public string DefaultBLFFilePath { get; set; } = ""; public string DefaultDBCFilePath { get; set; } = ""; public ObservableCollection DeviceList { get; set; } = new() { new DeviceInfoModel { DeviceName = "DAQ_001", DeviceType = "数据采集卡", Remark = "8 通道电压采集", IsEnabled = true, IsConnected = false }, new DeviceInfoModel { DeviceName = "PSU_002", DeviceType = "可编程电源", Remark = "0-30V / 0-5A", IsEnabled = true, IsConnected = false }, new DeviceInfoModel { DeviceName = "CAN_003", DeviceType = "CAN 通讯卡", Remark = "双通道 CAN-FD", IsEnabled = false, IsConnected = false }, new DeviceInfoModel { DeviceName = "IO_004", DeviceType = "数字 I/O", Remark = "16 进 16 出", IsEnabled = true, IsConnected = false }, new DeviceInfoModel { DeviceName = "Serial_005", DeviceType = "串口", Remark = "RS232 / RS485", IsEnabled = true, IsConnected = false }, }; } }