动画完成

This commit is contained in:
艾竹
2023-05-01 13:17:26 +08:00
parent 48555edbc6
commit 4a1fc12c52
4 changed files with 30 additions and 14 deletions

View File

@@ -730,28 +730,28 @@ namespace AIStudio.Wpf.DiagramDesigner
SinkConnectorInfo = sink;
}
public void SetPathGeneratorParameter(double smoothMargin, double smoothAutoSlope, double orthogonalShapeMargin, double orthogonalGlobalBoundsMargin)
public void SetPathGeneratorParameter(double? smoothMargin, double? smoothAutoSlope, double? orthogonalShapeMargin, double? orthogonalGlobalBoundsMargin)
{
bool hasChanged = false;
if (SmoothMargin != smoothMargin)
if (smoothMargin != null && SmoothMargin != smoothMargin)
{
hasChanged = true;
SmoothMargin = smoothMargin;
SmoothMargin = smoothMargin.Value;
}
if (SmoothAutoSlope != smoothAutoSlope)
if (smoothAutoSlope != null && SmoothAutoSlope != smoothAutoSlope)
{
hasChanged = true;
SmoothAutoSlope = smoothAutoSlope;
SmoothAutoSlope = smoothAutoSlope.Value;
}
if (OrthogonalShapeMargin != orthogonalShapeMargin)
if (orthogonalShapeMargin != null && OrthogonalShapeMargin != orthogonalShapeMargin)
{
hasChanged = true;
OrthogonalShapeMargin = orthogonalShapeMargin;
OrthogonalShapeMargin = orthogonalShapeMargin.Value;
}
if (OrthogonalGlobalBoundsMargin != orthogonalGlobalBoundsMargin)
if (orthogonalGlobalBoundsMargin != null && OrthogonalGlobalBoundsMargin != orthogonalGlobalBoundsMargin)
{
hasChanged = true;
OrthogonalGlobalBoundsMargin = orthogonalGlobalBoundsMargin;
OrthogonalGlobalBoundsMargin = orthogonalGlobalBoundsMargin.Value;
}
if (hasChanged)
{

View File

@@ -109,6 +109,11 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
public bool InitValue
{
get; set;
}
public bool ConnectorChanged
{
get; set;
@@ -119,7 +124,7 @@ namespace AIStudio.Wpf.DiagramDesigner
if (IsLoaded == false) { return; }
switch (e.PropertyName)
{
{
case nameof(ConnectorValue):
case nameof(ConnectorString):
case nameof(ConnectorValueType):
@@ -128,7 +133,7 @@ namespace AIStudio.Wpf.DiagramDesigner
RaisePropertyChanged(nameof(ConnectorChanged));
break;
}
}
public override bool CanAttachTo(FullyCreatedConnectorInfo port)

View File

@@ -716,6 +716,10 @@ namespace AIStudio.Wpf.DiagramDesigner
public IShape GetShape() => ShapeDefiner(this);
public override string ToString()
{
return $"{Id}-{Name}-{Text}-({Left},{Top},{ItemWidth},{ItemHeight})";
}
#endregion
}
}