优化了中断功能。

This commit is contained in:
fengjiayi
2024-09-22 17:37:32 +08:00
parent c930c870a6
commit b63a5f4c62
45 changed files with 4821 additions and 174 deletions

View File

@@ -8,7 +8,7 @@
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<!--<RowDefinition Height="Auto" />-->
<!-- 按钮 -->
<RowDefinition Height="*" />
<!-- 树视图 -->
@@ -19,11 +19,11 @@
Click="TimerRefreshButton_Click"-->
<!--<Button Grid.Row="0" HorizontalAlignment="Left" Margin="4,2,4,2" Content="刷新" Width="100" Height="20" Name="RefreshButton"/>-->
<!--<Button Grid.Row="0" HorizontalAlignment="Left" Margin="14,2,4,2" Content="监视" Width="100" Height="20" Name="TimerRefreshButton"/>-->
<Button Grid.Row="0" HorizontalAlignment="Left" Margin="14,2,4,2" Content="添加监视表达式" Width="100" Height="20" Name="AddMonitorExpressionButton" Click="AddMonitorExpressionButton_Click"/>
<!--<Button Grid.Row="0" HorizontalAlignment="Left" Margin="14,2,4,2" Content="添加监视表达式" Width="100" Height="20" Name="AddMonitorExpressionButton" Click="AddMonitorExpressionButton_Click"/>-->
</StackPanel>
<!-- 刷新按钮 -->
<!-- 树视图,用于显示对象属性 -->
<TreeView FontSize="13" x:Name="ObjectTreeView" Grid.Row="1" />
<TreeView FontSize="13" x:Name="ObjectTreeView" Grid.Row="0" />
</Grid>
</UserControl>

View File

@@ -1,4 +1,5 @@
using Serein.NodeFlow.Base;
using Serein.Library.Api;
using Serein.NodeFlow.Base;
using Serein.NodeFlow.Tool.SereinExpression;
using System;
using System.Collections.Generic;
@@ -55,6 +56,7 @@ namespace Serein.WorkBench.Themes
{
private object _objectInstance;
public string NodeGuid { get;set; }
public IFlowEnvironment FlowEnvironment { get;set; }
// private NodeModelBase _nodeFlowData;
@@ -79,9 +81,28 @@ namespace Serein.WorkBench.Themes
}
/// <summary>
/// 添加表达式
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AddMonitorExpressionButton_Click(object sender, RoutedEventArgs e)
{
//string fullPath = GetNodeFullPath(memberNode);
//Clipboard.SetDataObject(fullPath);
OpenInputDialog((exp) =>
{
FlowEnvironment.AddInterruptExpression(NodeGuid, exp);
//if (node.DebugSetting.InterruptExpression.Contains(exp))
//{
// Console.WriteLine("表达式已存在");
//}
//else
//{
// node.DebugSetting.InterruptExpression.Add(exp);
//}
});
}