Skip to content

Commit d44b74f

Browse files
committed
for save in file
1 parent afb31a6 commit d44b74f

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

SimpleStateMachineNodeEditor/View/ViewRightConnector.xaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
<RowDefinition />
1616
</Grid.RowDefinitions>
1717
<TextBox Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,0,5,3" Name="Text" TextWrapping="NoWrap" BorderThickness="0,0,0,0" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{DynamicResource ColorRightConnectorText}" Style="{DynamicResource RightConnectorTextBoxStyle}"/>
18-
<Ellipse Grid.Row="0" Grid.Column="1" Margin="0,0,-7,0" HorizontalAlignment="Right" VerticalAlignment="Center" Name="Form" Height="12" Width="12" AllowDrop="True" StrokeThickness="1" Style="{DynamicResource RightConnectorEllipseStyle}" >
19-
<!--<Ellipse.Fill>
20-
21-
</Ellipse.Fill>-->
22-
23-
</Ellipse>
18+
<Ellipse Grid.Row="0" Grid.Column="1" Margin="0,0,-7,0" HorizontalAlignment="Right" VerticalAlignment="Center" Name="Form" Height="12" Width="12" AllowDrop="True" StrokeThickness="1" Style="{DynamicResource RightConnectorEllipseStyle}" />
2419
</Grid>
2520
</Border>
2621
<UserControl.RenderTransform>

SimpleStateMachineNodeEditor/ViewModel/ViewModelNodesCanvas.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ private void ValidateConnectName(ValidateObjectProperty<ViewModelConnector, stri
387387
}
388388
private bool ConnectExist(string nameConnect)
389389
{
390-
var t = this.Nodes.SelectMany(x => x.Transitions);
391390
return this.Nodes.SelectMany(x=>x.Transitions).Any(x=>x.Name == nameConnect);
392391
}
393392

@@ -469,7 +468,7 @@ bool WithError<T>(string errorMessage, Action<T> action, T obj)
469468
void Error(string errorMessage)
470469
{
471470
LogError("File is not valid: " + errorMessage);
472-
SetupStartState();
471+
New();
473472
}
474473
}
475474
private void Save(string fileName)
@@ -491,14 +490,8 @@ private void Save(string fileName)
491490

492491
XElement transitions = new XElement("Transitions");
493492
stateMachineXElement.Add(transitions);
494-
//List<ViewModelConnector> connectors = new List<ViewModelConnector>():
495-
496-
497-
498-
//Nodes.Select(x => x.Transitions.Where(y => !string.IsNullOrEmpty(y.Name))).SelectMany(list => list
499493
foreach (var transition in Nodes.SelectMany(x => x.Transitions.Where(y => !string.IsNullOrEmpty(y.Name))).Reverse())
500494
{
501-
502495
transitions.Add(transition.ToXElement());
503496
}
504497

0 commit comments

Comments
 (0)