2021-07-23 09:42:22 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
2022-10-28 22:45:39 +08:00
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
public class LogicalGateDesignerItemBase : DesignerItemBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public LogicalGateDesignerItemBase()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-05-03 20:29:12 +08:00
|
|
|
|
public LogicalGateDesignerItemBase(LogicalGateItemViewModelBase item, string reserve = null) : base(item, reserve)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
this.OrderNumber = item.OrderNumber;
|
|
|
|
|
|
this.LogicalType = item.LogicalType;
|
|
|
|
|
|
this.Value = item.Value;
|
|
|
|
|
|
this.IsEnabled = item.IsEnabled;
|
2023-04-16 12:21:51 +08:00
|
|
|
|
LogicalConnectors = new List<LogicalConnectorInfoItem>(item.Connectors.OfType<LogicalConnectorInfo>().Select(p => new LogicalConnectorInfoItem(p)));
|
2021-07-23 09:42:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlArray]
|
2023-04-16 12:21:51 +08:00
|
|
|
|
public List<LogicalConnectorInfoItem> LogicalConnectors
|
|
|
|
|
|
{
|
|
|
|
|
|
get; set;
|
|
|
|
|
|
}
|
2021-07-23 09:42:22 +08:00
|
|
|
|
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public int OrderNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public double Value { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public LogicalType LogicalType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public bool IsEnabled { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|