refactor: 将Framework库和RT、UI放在同一个解决方案中。

This commit is contained in:
SL
2026-06-01 17:48:28 +08:00
parent 1948f4290d
commit b73d39a6b1
4331 changed files with 506148 additions and 49363 deletions
+49
View File
@@ -0,0 +1,49 @@
using System.Collections.ObjectModel;
using Aitex.Core.UI.MVVM;
using SicSimulator.Instances;
using MECF.Framework.Common.IOCore;
using MECF.Framework.Simulator.Core.IoProviders;
namespace SicSimulator.Views
{
public class IoViewModel : TimerViewModelBase
{
public SimulatorModulePlc PlcModule { get; set; }
public SimulatorIO PlcSystem { get; set; }
public ObservableCollection<NotifiableIoItem> DIList { get; set; }
public ObservableCollection<NotifiableIoItem> DOList { get; set; }
public ObservableCollection<NotifiableIoItem> AIList { get; set; }
public ObservableCollection<NotifiableIoItem> AOList { get; set; }
public IoViewModel(int port, string source, string ioMapPathFile, string module) : base(nameof(IoViewModel))
{
if (string.IsNullOrEmpty(module) || module == "TM")
{
PlcSystem = new SimulatorIO(port, source, ioMapPathFile);
DIList = PlcSystem.DiItemList;
DOList = PlcSystem.DoItemList;
AIList = PlcSystem.AiItemList;
AOList = PlcSystem.AoItemList;
}
else
{
PlcModule = new SimulatorModulePlc(port, source, ioMapPathFile, module);
DIList = PlcModule.DiItemList;
DOList = PlcModule.DoItemList;
AIList = PlcModule.AiItemList;
AOList = PlcModule.AoItemList;
}
}
protected override void Poll()
{
}
}
}