mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-03 07:36:35 +08:00
整理序列化
This commit is contained in:
@@ -4,20 +4,57 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ConnectorItem
|
||||
/// <summary>
|
||||
/// 连接点
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[XmlInclude(typeof(ConnectorItem))]
|
||||
public class ConnectorItem : SelectableItemBase
|
||||
{
|
||||
public Guid ParentId { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public ConnectorItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ConnectorItem(FullyCreatedConnectorInfo viewmodel) : base(viewmodel)
|
||||
{
|
||||
XRatio = viewmodel.XRatio;
|
||||
YRatio = viewmodel.YRatio;
|
||||
ConnectorWidth = viewmodel.ConnectorWidth;
|
||||
ConnectorHeight = viewmodel.ConnectorHeight;
|
||||
Orientation = viewmodel.Orientation;
|
||||
IsInnerPoint = viewmodel.IsInnerPoint;
|
||||
ValueTypePoint = viewmodel.ValueTypePoint;
|
||||
ConnectorValue = viewmodel.ConnectorValue;
|
||||
}
|
||||
|
||||
|
||||
[XmlAttribute]
|
||||
public double XRatio { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public double YRatio { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public double ConnectorWidth { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public double ConnectorHeight { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public ConnectorOrientation Orientation { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public bool IsInnerPoint { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public ValueTypePoint ValueTypePoint { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public double ConnectorValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user