修改暂存一下

This commit is contained in:
艾竹
2023-01-12 23:02:53 +08:00
parent 5d7717cc2b
commit 6a4c31106a
58 changed files with 776 additions and 468 deletions

View File

@@ -17,10 +17,33 @@ namespace AIStudio.Wpf.DiagramDesigner
{
}
//public ConnectionItem(Guid id, Guid sourceId, ConnectorOrientation sourceOrientation, Type sourceType, double sourceXRatio, double sourceYRatio, bool sourceInnerPoint,
// Guid sinkId, ConnectorOrientation sinkOrientation, Type sinkType, double sinkXRatio, double sinkYRatio, bool sinkInnerPoint,
// int zIndex, bool isGroup, Guid parentId, DrawMode vectorLineDrawMode, ColorViewModel colorViewModel, FontViewModel fontViewModel) : base(id, zIndex, isGroup, parentId, colorViewModel, fontViewModel)
public ConnectionItem(ConnectorViewModel viewmodel) : base(viewmodel)
{
this.SourceId = viewmodel.SourceConnectorInfo.DataItem.Id;
this.SourceOrientation = viewmodel.SourceConnectorInfo.Orientation;
this.SourceType = viewmodel.SourceConnectorInfo.DataItem.GetType();
this.SourceTypeName = viewmodel.SourceConnectorInfo.DataItem.GetType().FullName;
this.SourceXRatio = viewmodel.SourceConnectorInfo.GetXRatioFromConnector();
this.SourceYRatio = viewmodel.SourceConnectorInfo.GetYRatioFromConnector();
this.SourceInnerPoint = viewmodel.SourceConnectorInfo.IsInnerPoint;
this.SinkId = viewmodel.SinkConnectorInfoFully.DataItem.Id;
this.SinkOrientation = viewmodel.SinkConnectorInfoFully.Orientation;
this.SinkType = viewmodel.SinkConnectorInfoFully.DataItem.GetType();
this.SinkTypeName = viewmodel.SinkConnectorInfoFully.DataItem.GetType().FullName;
this.SinkXRatio = viewmodel.SinkConnectorInfoFully.GetXRatioFromConnector();
this.SinkYRatio = viewmodel.SinkConnectorInfoFully.GetYRatioFromConnector();
this.SinkInnerPoint = viewmodel.SinkConnectorInfoFully.IsInnerPoint;
this.RouterMode = viewmodel.RouterMode;
this.PathMode = viewmodel.PathMode;
}
//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;
@@ -31,35 +54,15 @@ namespace AIStudio.Wpf.DiagramDesigner
// this.SinkId = sinkId;
// this.SinkOrientation = sinkOrientation;
// this.SinkType = sinkType;
// this.SinkType = sinkType;
// this.SinkTypeName = sinkType.FullName;
// this.SinkXRatio = sinkXRatio;
// this.SinkYRatio = sinkYRatio;
// this.SinkInnerPoint = sinkInnerPoint;
// this.VectorLineDrawMode = vectorLineDrawMode;
// this.RouterMode = viewmodel.RouterMode;
// this.DrawMode = viewmodel.DrawMode;
//}
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.VectorLineDrawMode = viewmodel.VectorLineDrawMode;
}
[XmlAttribute]
public Guid SourceId { get; set; }
@@ -103,6 +106,15 @@ namespace AIStudio.Wpf.DiagramDesigner
public bool SinkInnerPoint { get; set; }
[XmlAttribute]
public DrawMode VectorLineDrawMode { get; set; }
public string RouterMode
{
get; set;
}
[XmlAttribute]
public string PathMode
{
get; set;
}
}
}