mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-02 23:26:35 +08:00
整理一下项目文件
This commit is contained in:
34
AIStudio.Wpf.DiagramDesigner/Models/ImageDesignerItem.cs
Normal file
34
AIStudio.Wpf.DiagramDesigner/Models/ImageDesignerItem.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ImageDesignerItem : DesignerItemBase
|
||||
{
|
||||
public ImageDesignerItem()
|
||||
{
|
||||
|
||||
}
|
||||
public ImageDesignerItem(ImageItemViewModel item) : base(item)
|
||||
{
|
||||
Icon = item.Icon;
|
||||
Connectors = new List<ConnectorItem>();
|
||||
foreach (var fullyCreatedConnectorInfo in item.Connectors)
|
||||
{
|
||||
ConnectorItem connector = new ConnectorItem()
|
||||
{
|
||||
XRatio = fullyCreatedConnectorInfo.XRatio,
|
||||
YRatio = fullyCreatedConnectorInfo.YRatio,
|
||||
ConnectorWidth = fullyCreatedConnectorInfo.ConnectorWidth,
|
||||
ConnectorHeight = fullyCreatedConnectorInfo.ConnectorHeight,
|
||||
Orientation = fullyCreatedConnectorInfo.Orientation
|
||||
};
|
||||
Connectors.Add(connector);
|
||||
}
|
||||
}
|
||||
|
||||
[XmlArray]
|
||||
public List<ConnectorItem> Connectors { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user