using Common.DevicesModels; using Common.Models; using CommunityToolkit.Mvvm.ComponentModel; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Xml.Serialization; namespace Common { [Serializable] public class ProjectProperty : ObservableObject { private SampleBottleTypeEnum sampleBottleType = SampleBottleTypeEnum._5mL; public SampleBottleTypeEnum SampleBottleType { get => sampleBottleType; set => SetProperty(ref sampleBottleType, value); } private ObservableCollection _tansferArea = new ObservableCollection(); /// /// 投料站 7个传送工装位置 /// [XmlArray("TransferArea")] // 序列化后的XML节点名 [XmlArrayItem("BaseBottleBox", Type = typeof(BaseBottleBox))] // 基类元素 [XmlArrayItem("SampleBottleBoxModel", Type = typeof(SampleBottleBoxModel))] // 派生类元素 [XmlArrayItem("SourceLiquidBottleBoxModel", Type = typeof(SourceLiquidBottleBoxModel))] [XmlArrayItem("SourcePowderBottleBoxModel", Type = typeof(SourcePowderBottleBoxModel))] [XmlArrayItem("SourcePowderBottleBoxModel_125ml", Type = typeof(SourcePowderBottleBoxModel_125ml))] [XmlArrayItem("TipBoxModel", Type = typeof(TipBoxModel))] public ObservableCollection TransferArea { get => _tansferArea; set => SetProperty(ref _tansferArea, value); } private ObservableCollection _fixtureCacheArea=new ObservableCollection(); /// /// 投料站8个治具缓存区 ,目前2,6由于干涉取消,但是程序里还保留 /// [XmlArray("FixtureCacheArea")] // 序列化后的XML节点名 [XmlArrayItem("BaseBottleBox", Type = typeof(BaseBottleBox))] // 基类元素 [XmlArrayItem("SampleBottleBoxModel", Type = typeof(SampleBottleBoxModel))] // 派生类元素 [XmlArrayItem("SourceLiquidBottleBoxModel", Type = typeof(SourceLiquidBottleBoxModel))] [XmlArrayItem("SourcePowderBottleBoxModel", Type = typeof(SourcePowderBottleBoxModel))] [XmlArrayItem("SourcePowderBottleBoxModel_125ml", Type = typeof(SourcePowderBottleBoxModel_125ml))] [XmlArrayItem("TipBoxModel", Type = typeof(TipBoxModel))] public ObservableCollection FixtureCacheArea { get => _fixtureCacheArea; set { SetProperty(ref _fixtureCacheArea, value); } } private ObservableCollection powderheadcacheArea = new ObservableCollection(); /// /// 投料站粉末头缓存区 10个位置 /// [XmlArray("PowderHeaderCacheArea")] [XmlArrayItem("SourcePowderBottleModel")] public ObservableCollection PowderHeaderCacheArea { get { return powderheadcacheArea; } set { SetProperty(ref powderheadcacheArea, value); } } private ObservableCollection tipHeadArea = new ObservableCollection(); /// /// 投料站 TIP头放置区域 3个位置 /// [XmlArray("TipHeadArea")] [XmlArrayItem("TipBoxModel")] public ObservableCollection TipHeadArea { get { return tipHeadArea; } set { SetProperty(ref tipHeadArea, value); } } private bool bnouseBS; /// /// 不启用BS false:启用BS true:不启用BS /// public bool bNoUseBS { get { return bnouseBS; } set { SetProperty(ref bnouseBS, value); } } #region 反应工站料架 private List<_2mlBottleBox_Outer> _2mlbottlebox_outer = new List<_2mlBottleBox_Outer>(); /// /// 料架上第五层的 2ml外瓶工装集合 /// public List<_2mlBottleBox_Outer> Rack_2mlBottleBox_OuterList { get { return _2mlbottlebox_outer; } set { _2mlbottlebox_outer = value; } } private List<_2mlBottleBox_Inner> _2mlbottlebox_inner = new List<_2mlBottleBox_Inner>(); /// /// 料架上第四层的 2ml滤芯工装集合 /// public List<_2mlBottleBox_Inner> Rack_2mlBottleBox_InnerList { get { return _2mlbottlebox_inner; } set { _2mlbottlebox_inner = value; } } private List _5mlsamplebottlebox = new List(); /// /// 料架上第三层的 5ml样品工装集合 /// public List Rack_5mlSampleBottleBoxList { get { return _5mlsamplebottlebox; } set { _5mlsamplebottlebox = value; } } private List _12mlsamplebottlebox = new List(); /// /// 料架上第二层的 12ml样品工装集合 /// public List Rack_12mlSampleBottleBoxList { get { return _12mlsamplebottlebox; } set { _12mlsamplebottlebox = value; } } private List _tipbox = new List(); /// /// 料架上第一层的 Tip工装集合 /// public List Rack_TipBoxList { get { return _tipbox; } set { _tipbox = value; } } private List sourceLiquidBottleBoxs = new List(); /// /// 料架上第一层的 原液工装集合 /// public List Rack_SourceLiquidBottlesBoxList { get { return sourceLiquidBottleBoxs; } set { sourceLiquidBottleBoxs = value; } } #endregion private string lastOpenProject = string.Empty; /// /// 关闭软件最后一次打开的项目 /// public string LastOpenProject { get => lastOpenProject; set => SetProperty(ref lastOpenProject, value); } private string nowOpenProjectFile; public string NowOpenProjectFile { get => nowOpenProjectFile; set => SetProperty(ref nowOpenProjectFile, value); } private string Dose_ct = string.Empty; [XmlIgnore] public string Dose_CT { get => Dose_ct; set => SetProperty(ref Dose_ct, value); } private string react_ct = string.Empty; [XmlIgnore] public string React_CT { get => react_ct; set => SetProperty(ref react_ct, value); } public ProjectProperty() { } } }