mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-07 17:56:35 +08:00
xx
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
@@ -37,31 +39,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.SinkInnerPoint = viewmodel.SinkConnectorInfoFully.IsInnerPoint;
|
||||
this.RouterMode = viewmodel.RouterMode;
|
||||
this.PathMode = viewmodel.PathMode;
|
||||
this.Vertices = viewmodel.Vertices.Select(p => (Point)p.MiddlePosition).ToList();
|
||||
}
|
||||
|
||||
//public ConnectionItem(Guid sourceId, ConnectorOrientation sourceOrientation, Type sourceType, double sourceXRatio, double sourceYRatio, bool sourceInnerPoint,
|
||||
// Guid sinkId, ConnectorOrientation sinkOrientation, Type sinkType, double sinkXRatio, double sinkYRatio, bool sinkInnerPoint, ConnectorViewModel viewmodel) : base(viewmodel)
|
||||
//{
|
||||
|
||||
|
||||
// this.SourceId = sourceId;
|
||||
// this.SourceOrientation = sourceOrientation;
|
||||
// this.SourceType = sourceType;
|
||||
// this.SourceTypeName = sourceType.FullName;
|
||||
// this.SourceXRatio = sourceXRatio;
|
||||
// this.SourceYRatio = sourceYRatio;
|
||||
// this.SourceInnerPoint = sourceInnerPoint;
|
||||
|
||||
// this.SinkId = sinkId;
|
||||
// this.SinkOrientation = sinkOrientation;
|
||||
// this.SinkType = sinkType;
|
||||
// this.SinkTypeName = sinkType.FullName;
|
||||
// this.SinkXRatio = sinkXRatio;
|
||||
// this.SinkYRatio = sinkYRatio;
|
||||
// this.SinkInnerPoint = sinkInnerPoint;
|
||||
// this.RouterMode = viewmodel.RouterMode;
|
||||
// this.DrawMode = viewmodel.DrawMode;
|
||||
//}
|
||||
|
||||
[XmlAttribute]
|
||||
public Guid SourceId { get; set; }
|
||||
@@ -116,5 +96,25 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public List<Point> Vertices
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlAttribute("Vertices")]
|
||||
public string XmlVertices
|
||||
{
|
||||
get
|
||||
{
|
||||
return SerializeHelper.SerializePointList(Vertices);
|
||||
}
|
||||
set
|
||||
{
|
||||
Vertices = SerializeHelper.DeserializePointList(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user