mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
序列化继续整理
This commit is contained in:
@@ -48,7 +48,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private void LineControl_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is ConnectorViewModel connector)
|
||||
if (this.DataContext is ConnectionViewModel connector)
|
||||
{
|
||||
connector.PropertyChanged -= Connector_PropertyChanged;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private async void PathAnimation_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is ConnectorViewModel connector)
|
||||
if (this.DataContext is ConnectionViewModel connector)
|
||||
{
|
||||
connector.PropertyChanged -= Connector_PropertyChanged;
|
||||
connector.PropertyChanged += Connector_PropertyChanged;
|
||||
@@ -70,8 +70,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
switch (e.PropertyName)
|
||||
{
|
||||
case nameof(ConnectorViewModel.LineAnimation):
|
||||
case nameof(ConnectorViewModel.PathGeneratorResult):
|
||||
case nameof(ConnectionViewModel.LineAnimation):
|
||||
case nameof(ConnectionViewModel.PathGeneratorResult):
|
||||
await DoAnimation();
|
||||
break;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private async Task DoAnimation()
|
||||
{
|
||||
if (this.DataContext is ConnectorViewModel connector && connector.IsFullConnection)
|
||||
if (this.DataContext is ConnectionViewModel connector && connector.IsFullConnection)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Delay(100);
|
||||
switch (connector.LineAnimation)
|
||||
|
||||
Reference in New Issue
Block a user