mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-07 02:00:50 +08:00
@@ -27,7 +27,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
|
||||
public ScriptViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType)
|
||||
{
|
||||
|
||||
Init(true);
|
||||
}
|
||||
|
||||
public ScriptViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
||||
@@ -61,8 +61,8 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
ConsoleLogViewModel logNode = new ConsoleLogViewModel(DiagramViewModel) { Name = "Log", Left = 150, Top = 420 };
|
||||
DiagramViewModel.Add(logNode);
|
||||
|
||||
IntScriptViewModel intNode = new IntScriptViewModel(DiagramViewModel) { Name = "Int", Left = 40, Top = 220 };
|
||||
DiagramViewModel.Add(intNode);
|
||||
IntScriptViewModel intLog = new IntScriptViewModel(DiagramViewModel) { Name = "Int", Left = 40, Top = 220 };
|
||||
DiagramViewModel.Add(intLog);
|
||||
|
||||
ColorBoxFactoryScriptViewModel factoryNode = new ColorBoxFactoryScriptViewModel(DiagramViewModel) { Name = "ColorBoxFactory", Left = 150, Top = 150 };
|
||||
DiagramViewModel.Add(factoryNode);
|
||||
@@ -111,7 +111,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
collectorNode7.Tag = new ColorBoxModel("紫色|六边形", "M 0,20 L 10,0 H 50 L 60,20 L 50,40 H10 Z", Colors.Purple);
|
||||
DiagramViewModel.Add(collectorNode7);
|
||||
|
||||
ConnectionViewModel int_factoryConnector = new ConnectionViewModel(DiagramViewModel, intNode.Output[0], factoryNode.Input[0], DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
ConnectionViewModel int_factoryConnector = new ConnectionViewModel(DiagramViewModel, intLog.Output[0], factoryNode.Input[0], DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
DiagramViewModel.Add(int_factoryConnector);
|
||||
|
||||
ConnectionViewModel bool_switchConnector = new ConnectionViewModel(DiagramViewModel, boolNode.Output[0], switchNode.Input[0], DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
@@ -191,9 +191,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
{
|
||||
item.Execute();
|
||||
}
|
||||
|
||||
if (readDataTimer != null)
|
||||
readDataTimer.Start();
|
||||
readDataTimer.Start();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
@@ -202,7 +200,6 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
|
||||
readDataTimer.Stop();
|
||||
readDataTimer.Dispose();
|
||||
readDataTimer = null;
|
||||
|
||||
foreach (var item in DiagramViewModel.Items.OfType<LogicalGateItemViewModelBase>().OrderBy(p => p.OrderNumber).ToList())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user