mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-04 16:16:34 +08:00
序列化继续整理
This commit is contained in:
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ConnectingLineBoundary : IPathGenerator
|
||||
{
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
return PathGenerators.Boundary(_, link, route, source, target);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ConnectingLineCorner : IPathGenerator
|
||||
{
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
return PathGenerators.Corner(_, link, route, source, target);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ConnectingLineSmooth : IPathGenerator
|
||||
{
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
return PathGenerators.Smooth(_, link, route, source, target);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ConnectingLineStraight : IPathGenerator
|
||||
{
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public PathGeneratorResult Get(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
return PathGenerators.Straight(_, link, route, source, target);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public interface IPathGenerator
|
||||
{
|
||||
PathGeneratorResult Get(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target);
|
||||
PathGeneratorResult Get(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public static partial class PathGenerators
|
||||
{
|
||||
public static PathGeneratorResult Boundary(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public static PathGeneratorResult Boundary(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
route = ConcatRouteAndSourceAndTarget(route, source, target);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return new PathGeneratorResult(paths, sourceAngle, route[0], targetAngle, route[route.Length - 1]);
|
||||
}
|
||||
|
||||
private static PointBase[] GetRouteWithMiddlePoints(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route)
|
||||
private static PointBase[] GetRouteWithMiddlePoints(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
var middle = GetMiddlePoints(
|
||||
link.SourceConnectorInfo.MiddlePosition,
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public static partial class PathGenerators
|
||||
{
|
||||
public static PathGeneratorResult Corner(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public static PathGeneratorResult Corner(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
route = ConcatRouteAndSourceAndTarget(route, source, target);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private const int const_margin = 20;
|
||||
|
||||
private static PointBase[] GetRouteWithFullConnectionLine(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route)
|
||||
private static PointBase[] GetRouteWithFullConnectionLine(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
var sourceInnerPoint = link.SourceConnectorInfo.IsInnerPoint;
|
||||
PointBase sourcePoint = link.SourceConnectorInfo.MiddlePosition;
|
||||
@@ -240,7 +240,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return linePoints.ToArray();
|
||||
}
|
||||
|
||||
private static PointBase[] GetRouteWithPartConnectionLine(IDiagramViewModel diagramViewModel, ConnectorViewModel link, PointBase[] route)
|
||||
private static PointBase[] GetRouteWithPartConnectionLine(IDiagramViewModel diagramViewModel, ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
var sourceInnerPoint = link.SourceConnectorInfo.IsInnerPoint;
|
||||
PointBase sourcePoint = link.SourceConnectorInfo.MiddlePosition;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
private const double _margin = 125;
|
||||
|
||||
public static PathGeneratorResult Smooth(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public static PathGeneratorResult Smooth(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
route = ConcatRouteAndSourceAndTarget(route, source, target);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return new PathGeneratorResult(new[] { path }, sourceAngle, route[0], targetAngle, route[route.Length - 1]);
|
||||
}
|
||||
|
||||
private static PathGeneratorResult CurveThroughPoints(PointBase[] route, ConnectorViewModel link)
|
||||
private static PathGeneratorResult CurveThroughPoints(PointBase[] route, ConnectionViewModel link)
|
||||
{
|
||||
double sourceAngle = SourceMarkerAdjustement(route, link.ColorViewModel.LeftArrowSize);
|
||||
double targetAngle = TargetMarkerAdjustement(route, link.ColorViewModel.RightArrowSize);
|
||||
@@ -50,7 +50,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return new PathGeneratorResult(paths, sourceAngle, route[0], targetAngle, route[route.Length - 1]);
|
||||
}
|
||||
|
||||
private static PointBase[] GetRouteWithCurvePoints(ConnectorViewModel link, PointBase[] route)
|
||||
private static PointBase[] GetRouteWithCurvePoints(ConnectionViewModel link, PointBase[] route)
|
||||
{
|
||||
if (link.IsPortless)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public static partial class PathGenerators
|
||||
{
|
||||
public static PathGeneratorResult Straight(IDiagramViewModel _, ConnectorViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
public static PathGeneratorResult Straight(IDiagramViewModel _, ConnectionViewModel link, PointBase[] route, PointBase source, PointBase target)
|
||||
{
|
||||
route = ConcatRouteAndSourceAndTarget(route, source, target);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void DoShift(PointBase[] points, ConnectorViewModel link)
|
||||
private static void DoShift(PointBase[] points, ConnectionViewModel link)
|
||||
{
|
||||
double left = link.Area.Left;
|
||||
double top = link.Area.Top;
|
||||
|
||||
Reference in New Issue
Block a user