Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramDesigner/Models/Serializables/Connector/ConnectorInfoItemBase.cs

56 lines
1.2 KiB
C#
Raw Normal View History

2023-01-24 16:20:39 +08:00
using System;
using System.Collections.Generic;
2023-01-24 23:10:57 +08:00
using System.IO;
2023-01-24 16:20:39 +08:00
using System.Text;
2023-01-24 23:10:57 +08:00
using System.Xml;
2023-01-24 16:20:39 +08:00
using System.Xml.Serialization;
2023-02-11 23:51:48 +08:00
using Newtonsoft.Json;
2023-01-24 16:20:39 +08:00
namespace AIStudio.Wpf.DiagramDesigner
2023-01-24 17:53:04 +08:00
{
2023-01-24 16:20:39 +08:00
/// <summary>
2023-01-24 17:53:04 +08:00
/// 连接点
2023-01-24 16:20:39 +08:00
/// </summary>
[Serializable]
2023-01-24 17:53:04 +08:00
[XmlInclude(typeof(ConnectorInfoItemBase))]
public class ConnectorInfoItemBase : SelectableItemBase
2023-01-24 16:20:39 +08:00
{
2023-01-24 17:53:04 +08:00
public ConnectorInfoItemBase()
2023-01-24 16:20:39 +08:00
{
}
2023-01-24 17:53:04 +08:00
public ConnectorInfoItemBase(ConnectorInfoBase viewmodel) : base(viewmodel)
2023-01-24 16:20:39 +08:00
{
2023-02-11 22:20:24 +08:00
PhysicalConnectorWidth = viewmodel.PhysicalConnectorWidth;
PhysicalConnectorHeight = viewmodel.PhysicalConnectorHeight;
2023-01-24 17:53:04 +08:00
Orientation = viewmodel.Orientation;
2023-01-24 16:20:39 +08:00
}
2023-02-11 23:51:48 +08:00
[JsonProperty(PropertyName = "ConnectorWidth")]
[XmlAttribute("ConnectorWidth")]
2023-02-11 22:20:24 +08:00
public double PhysicalConnectorWidth
2023-01-24 16:20:39 +08:00
{
2023-01-24 17:53:04 +08:00
get; set;
2023-01-24 16:20:39 +08:00
}
2023-02-11 23:51:48 +08:00
[JsonProperty(PropertyName = "ConnectorHeight")]
[XmlAttribute("ConnectorHeight")]
2023-02-11 22:20:24 +08:00
public double PhysicalConnectorHeight
2023-01-24 16:20:39 +08:00
{
get; set;
}
[XmlAttribute]
2023-01-24 17:53:04 +08:00
public ConnectorOrientation Orientation
2023-01-24 16:20:39 +08:00
{
get; set;
}
2023-02-11 22:20:24 +08:00
2023-01-24 23:10:57 +08:00
2023-01-24 16:20:39 +08:00
}
}