mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-19 16:06:33 +08:00
修改了很多
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Serein.Workbench
|
||||
void LoadLocalProject()
|
||||
{
|
||||
#if DEBUG
|
||||
if (1 == 1)
|
||||
if (1 == 11)
|
||||
{
|
||||
string filePath;
|
||||
filePath = @"F:\临时\project\linux\project.dnf";
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
<Window x:Class="Serein.Workbench.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Serein.Workbench"
|
||||
xmlns:tool="clr-namespace:Serein.Workbench.Tool.Converters"
|
||||
xmlns:nodeView="clr-namespace:Serein.Workbench.Node.View"
|
||||
xmlns:themes="clr-namespace:Serein.Workbench.Themes"
|
||||
xmlns:converters="clr-namespace:Serein.Workbench.Tool.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:MainWindowViewModel}"
|
||||
Title="Dynamic Node Flow" Height="900" Width="1400"
|
||||
AllowDrop="True" Drop="Window_Drop" DragOver="Window_DragOver"
|
||||
AllowDrop="True"
|
||||
Drop="Window_Drop"
|
||||
DragOver="Window_DragOver"
|
||||
Loaded="Window_Loaded"
|
||||
ContentRendered="Window_ContentRendered"
|
||||
PreviewKeyDown="Window_PreviewKeyDown"
|
||||
Closing="Window_Closing">
|
||||
|
||||
<Window.Resources>
|
||||
<converters:InvertableBooleanToVisibilityConverter x:Key="InvertedBoolConverter"/>
|
||||
<tool:RightThumbPositionConverter x:Key="RightThumbPositionConverter" />
|
||||
<tool:BottomThumbPositionConverter x:Key="BottomThumbPositionConverter" />
|
||||
<tool:VerticalCenterThumbPositionConverter x:Key="VerticalCenterThumbPositionConverter" />
|
||||
@@ -35,7 +43,7 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Menu DockPanel.Dock="Top" Grid.Row="0" Height="20">
|
||||
<Menu DockPanel.Dock="Top" Grid.Row="0" Grid.ColumnSpan="5" Height="20">
|
||||
<MenuItem Header="项目">
|
||||
<!--菜单项为MenuItem,文字使用属性 Header-->
|
||||
<MenuItem Header="保存项目" Click="ButtonSaveFile_Click" ></MenuItem>
|
||||
@@ -99,7 +107,7 @@
|
||||
<GridSplitter Grid.Row="1" Grid.Column="1" Width="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="Gray" />
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" x:Name="FlowChartStackGrid">
|
||||
|
||||
|
||||
<StackPanel x:Name="FlowChartStackPanel"
|
||||
|
||||
ClipToBounds="True">
|
||||
@@ -199,6 +207,25 @@ Canvas.Top="{Binding ActualHeight, ElementName=FlowChartCanvas, Mode=OneWay, Con
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<StackPanel x:Name="CreateNodeInvoke"
|
||||
Margin="14" Width="auto" HorizontalAlignment="Left" Background="White" Opacity="0.7"
|
||||
Visibility="{Binding IsConnectionInvokeNode,
|
||||
Converter={StaticResource InvertedBoolConverter},ConverterParameter=Normal}" >
|
||||
<TextBlock Margin="8,2,8,0" Foreground="#FF2727" FontSize="14" Text="正在设置调用关系"/>
|
||||
<TextBlock Margin="8,0,8,0" Foreground="#4A82E4" FontSize="14" Text=" 按 1 切换:上游分支"/>
|
||||
<TextBlock Margin="8,0,8,0" Foreground="#04FC10" FontSize="14" Text=" 按 2 切换:Succeed 分支"/>
|
||||
<TextBlock Margin="8,0,8,0" Foreground="#F18905" FontSize="14" Text=" 按 3 切换:Fail 分支"/>
|
||||
<TextBlock Margin="8,0,8,2" Foreground="#FE1343" FontSize="14" Text=" 按 4 切换:异常分支"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="14" Width="auto" HorizontalAlignment="Left" Background="White" Opacity="0.9"
|
||||
Visibility="{Binding IsConnectionArgSourceNode,
|
||||
Converter={StaticResource InvertedBoolConverter},ConverterParameter=Normal}" >
|
||||
<TextBlock Margin="8,2,8,0" Foreground="#FF2727" FontSize="14" Text="正在设置参数传递关系"/>
|
||||
<TextBlock Margin="8,0,8,0" Foreground="#56CEF6" FontSize="14" Text=" 按 1 切换:调用时获取指定节点的返回值"/>
|
||||
<TextBlock Margin="8,0,8,2" Foreground="#B06BBB" FontSize="14" Text=" 按 2 切换:调用时立刻调用指定节点,使用其返回值作为入参参数"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<GridSplitter Grid.Row="1" Grid.Column="3" Width="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="Gray" />
|
||||
<!--IOC容器属性-->
|
||||
|
||||
@@ -5,6 +5,7 @@ using Serein.Library.Api;
|
||||
using Serein.Library.Utils;
|
||||
using Serein.Library.Utils.SereinExpression;
|
||||
using Serein.NodeFlow.Tool;
|
||||
using Serein.Workbench.Extension;
|
||||
using Serein.Workbench.Node;
|
||||
using Serein.Workbench.Node.View;
|
||||
using Serein.Workbench.Node.ViewModel;
|
||||
@@ -83,7 +84,7 @@ namespace Serein.Workbench
|
||||
/// <summary>
|
||||
/// 标记是否正在进行连接操作
|
||||
/// </summary>
|
||||
private bool IsConnecting;
|
||||
//private bool IsConnecting;
|
||||
/// <summary>
|
||||
/// 标记是否正在拖动控件
|
||||
/// </summary>
|
||||
@@ -116,7 +117,7 @@ namespace Serein.Workbench
|
||||
/// <summary>
|
||||
/// 记录开始连接的文本块
|
||||
/// </summary>
|
||||
private NodeControlBase? startConnectNodeControl;
|
||||
//private NodeControlBase? startConnectNodeControl;
|
||||
/// <summary>
|
||||
/// 当前正在绘制的连接线
|
||||
/// </summary>
|
||||
@@ -124,7 +125,7 @@ namespace Serein.Workbench
|
||||
/// <summary>
|
||||
/// 当前正在绘制的真假分支属性
|
||||
/// </summary>
|
||||
private ConnectionInvokeType currentConnectionType;
|
||||
//private ConnectionInvokeType currentConnectionType;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -144,36 +145,38 @@ namespace Serein.Workbench
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = new MainWindowViewModel(this);
|
||||
this.DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
EnvDecorator = ViewModel.FlowEnvironment;
|
||||
|
||||
ViewObjectViewer.FlowEnvironment = EnvDecorator;
|
||||
IOCObjectViewer.FlowEnvironment = EnvDecorator;
|
||||
IOCObjectViewer.SelectObj += ViewObjectViewer.LoadObjectInformation;
|
||||
|
||||
|
||||
//this.FlowEnvironment.SetConsoleOut((msg) => LogOutWindow.AppendText(msg), () => LogOutWindow.Clear()); // 设置输出
|
||||
InitFlowEnvironmentEvent(); // 配置环境事件
|
||||
|
||||
|
||||
|
||||
#region 缩放平移容器
|
||||
canvasTransformGroup = new TransformGroup();
|
||||
scaleTransform = new ScaleTransform();
|
||||
translateTransform = new TranslateTransform();
|
||||
|
||||
canvasTransformGroup.Children.Add(scaleTransform);
|
||||
canvasTransformGroup.Children.Add(translateTransform);
|
||||
|
||||
FlowChartCanvas.RenderTransform = canvasTransformGroup;
|
||||
#endregion
|
||||
|
||||
InitFlowEnvironmentEvent(); // 配置环境事件
|
||||
|
||||
if (App.FlowProjectData is not null)
|
||||
{
|
||||
EnvDecorator.LoadProject(new FlowEnvInfo { Project = App.FlowProjectData }, App.FileDataPath); // 加载项目
|
||||
}
|
||||
|
||||
|
||||
IOCObjectViewer.SelectObj += ViewObjectViewer.LoadObjectInformation;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化环境事件
|
||||
/// </summary>
|
||||
@@ -229,8 +232,6 @@ namespace Serein.Workbench
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 窗体加载方法
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -382,13 +383,14 @@ namespace Serein.Workbench
|
||||
JunctionControlBase startJunction = IFormJunction.NextStepJunction;
|
||||
JunctionControlBase endJunction = IToJunction.ExecuteJunction;
|
||||
|
||||
|
||||
// 添加连接
|
||||
var connection = new ConnectionControl(
|
||||
FlowChartCanvas,
|
||||
connectionType,
|
||||
startJunction,
|
||||
endJunction,
|
||||
() => EnvDecorator.RemoveConnectAsync(fromNodeGuid, toNodeGuid, connectionType)
|
||||
() => EnvDecorator.RemoveConnectInvokeAsync(fromNodeGuid, toNodeGuid, connectionType)
|
||||
);
|
||||
|
||||
if (toNodeControl is FlipflopNodeControl flipflopControl
|
||||
@@ -400,7 +402,7 @@ namespace Serein.Workbench
|
||||
Connections.Add(connection);
|
||||
fromNodeControl.AddCnnection(connection);
|
||||
toNodeControl.AddCnnection(connection);
|
||||
EndConnection();
|
||||
EndConnection(); // 环境触发了创建节点连接事件
|
||||
|
||||
|
||||
}
|
||||
@@ -440,7 +442,7 @@ namespace Serein.Workbench
|
||||
|
||||
JunctionControlBase startJunction = eventArgs.ConnectionArgSourceType switch
|
||||
{
|
||||
ConnectionArgSourceType.GetPreviousNodeData => IFormJunction.ExecuteJunction, // 自身节点
|
||||
ConnectionArgSourceType.GetPreviousNodeData => IFormJunction.ReturnDataJunction, // 自身节点
|
||||
ConnectionArgSourceType.GetOtherNodeData => IFormJunction.ReturnDataJunction, // 其它节点的返回值控制点
|
||||
ConnectionArgSourceType.GetOtherNodeDataOfInvoke => IFormJunction.ReturnDataJunction, // 其它节点的返回值控制点
|
||||
_ => throw new Exception("窗体事件 FlowEnvironment_NodeConnectChangeEvemt 创建/删除节点之间的参数传递关系 JunctionControlBase 枚举值错误 。非预期的枚举值。") // 应该不会触发
|
||||
@@ -448,11 +450,6 @@ namespace Serein.Workbench
|
||||
|
||||
JunctionControlBase endJunction = IToJunction.ArgDataJunction[eventArgs.ArgIndex];
|
||||
LineType lineType = LineType.Bezier;
|
||||
if(eventArgs.ConnectionArgSourceType == ConnectionArgSourceType.GetPreviousNodeData)
|
||||
{
|
||||
lineType = LineType.Semicircle;
|
||||
}
|
||||
|
||||
// 添加连接
|
||||
var connection = new ConnectionControl(
|
||||
lineType,
|
||||
@@ -461,19 +458,19 @@ namespace Serein.Workbench
|
||||
eventArgs.ConnectionArgSourceType,
|
||||
startJunction,
|
||||
endJunction,
|
||||
() => EnvDecorator.RemoveConnectAsync(fromNodeGuid, toNodeGuid, 0)
|
||||
() => EnvDecorator.RemoveConnectArgSourceAsync(fromNodeGuid, toNodeGuid, eventArgs.ArgIndex)
|
||||
);
|
||||
|
||||
if (toNodeControl is FlipflopNodeControl flipflopControl
|
||||
&& flipflopControl?.ViewModel?.NodeModel is NodeModelBase nodeModel) // 某个节点连接到了触发器,尝试从全局触发器视图中移除该触发器
|
||||
{
|
||||
NodeTreeViewer.RemoteGlobalFlipFlop(nodeModel); // 从全局触发器树树视图中移除
|
||||
}
|
||||
//if (toNodeControl is FlipflopNodeControl flipflopControl
|
||||
// && flipflopControl?.ViewModel?.NodeModel is NodeModelBase nodeModel) // 某个节点连接到了触发器,尝试从全局触发器视图中移除该触发器
|
||||
//{
|
||||
// NodeTreeViewer.RemoteGlobalFlipFlop(nodeModel); // 从全局触发器树树视图中移除
|
||||
//}
|
||||
connection.RefreshLine(); // 添加贝塞尔曲线显示
|
||||
Connections.Add(connection);
|
||||
fromNodeControl.AddCnnection(connection);
|
||||
toNodeControl.AddCnnection(connection);
|
||||
EndConnection();
|
||||
EndConnection(); // 环境触发了创建节点连接事件
|
||||
|
||||
|
||||
}
|
||||
@@ -481,20 +478,27 @@ namespace Serein.Workbench
|
||||
{
|
||||
// 需要移除连接
|
||||
var removeConnections = Connections.Where(c => c.Start.MyNode.Guid.Equals(fromNodeGuid)
|
||||
&& c.End.MyNode.Guid.Equals(toNodeGuid))
|
||||
.ToList();
|
||||
&& c.End.MyNode.Guid.Equals(toNodeGuid))
|
||||
.ToList(); // 获取这两个节点之间的所有连接关系
|
||||
|
||||
|
||||
|
||||
foreach (var connection in removeConnections)
|
||||
{
|
||||
connection.DeleteConnection();
|
||||
Connections.Remove(connection);
|
||||
fromNodeControl.RemoveCnnection(connection);
|
||||
toNodeControl.RemoveCnnection(connection);
|
||||
if (NodeControls.TryGetValue(connection.End.MyNode.Guid, out var control))
|
||||
if(connection.End is ArgJunctionControl junctionControl && junctionControl.ArgIndex == eventArgs.ArgIndex)
|
||||
{
|
||||
JudgmentFlipFlopNode(control); // 连接关系变更时判断
|
||||
// 找到符合删除条件的连接线
|
||||
connection.DeleteConnection(); // 从UI层面上移除
|
||||
Connections.Remove(connection); // 从本地记录中移除
|
||||
fromNodeControl.RemoveCnnection(connection); // 从节点持有的记录移除
|
||||
toNodeControl.RemoveCnnection(connection); // 从节点持有的记录移除
|
||||
}
|
||||
|
||||
|
||||
//if (NodeControls.TryGetValue(connection.End.MyNode.Guid, out var control))
|
||||
//{
|
||||
// JudgmentFlipFlopNode(control); // 连接关系变更时判断
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1044,15 +1048,17 @@ namespace Serein.Workbench
|
||||
{
|
||||
if ((s is MenuItem menuItem) && menuItem is not null)
|
||||
{
|
||||
if (nodeControl?.ViewModel?.NodeModel?.DebugSetting?.InterruptClass == InterruptClass.None)
|
||||
if (nodeControl?.ViewModel?.NodeModel?.DebugSetting?.IsInterrupt == true)
|
||||
{
|
||||
await EnvDecorator.SetNodeInterruptAsync(nodeGuid, InterruptClass.Branch);
|
||||
await EnvDecorator.SetNodeInterruptAsync(nodeGuid,false);
|
||||
nodeControl.ViewModel.IsInterrupt = false;
|
||||
|
||||
menuItem.Header = "取消中断";
|
||||
}
|
||||
else
|
||||
{
|
||||
await EnvDecorator.SetNodeInterruptAsync(nodeGuid, InterruptClass.None);
|
||||
nodeControl!.ViewModel!.IsInterrupt = true;
|
||||
await EnvDecorator.SetNodeInterruptAsync(nodeGuid, true);
|
||||
menuItem.Header = "在此中断";
|
||||
|
||||
}
|
||||
@@ -1166,7 +1172,7 @@ namespace Serein.Workbench
|
||||
|
||||
#endregion
|
||||
|
||||
#region 与流程图与节点相关
|
||||
#region 与流程图/节点相关
|
||||
|
||||
/// <summary>
|
||||
/// 鼠标在画布移动。
|
||||
@@ -1176,36 +1182,28 @@ namespace Serein.Workbench
|
||||
/// </summary>
|
||||
private void FlowChartCanvas_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var myData = GlobalJunctionData.MyGlobalConnectingData;
|
||||
if (myData.IsCreateing && e.LeftButton == MouseButtonState.Pressed)
|
||||
{
|
||||
|
||||
if (myData.Type == JunctionOfConnectionType.Invoke)
|
||||
{
|
||||
ViewModel.IsConnectionInvokeNode = true; // 正在连接节点的调用关系
|
||||
|
||||
if (e.LeftButton == MouseButtonState.Pressed && GlobalJunctionData.MyGlobalConnectingData is not null)
|
||||
{
|
||||
// 正在连接节点
|
||||
//var controlPointPosition = GlobalJunctionData.MyGlobalConnectingData.StartPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel.IsConnectionArgSourceNode = true; // 正在连接节点的调用关系
|
||||
}
|
||||
var currentPoint = e.GetPosition(FlowChartCanvas);
|
||||
GlobalJunctionData.MyGlobalConnectingData.UpdatePoint(currentPoint);
|
||||
|
||||
|
||||
//virtualLine.VirtualLine.UpdatePoints(currentPoint);
|
||||
|
||||
//virtualLine.VirtualLine.X1 = controlPointPosition.X;
|
||||
//virtualLine.VirtualLine.Y1 = controlPointPosition.Y;
|
||||
//virtualLine.VirtualLine.X2 = currentPoint.X;
|
||||
//virtualLine.VirtualLine.Y2 = currentPoint.Y;
|
||||
currentPoint.X -= 2;
|
||||
currentPoint.Y -= 2;
|
||||
myData.UpdatePoint(currentPoint);
|
||||
return;
|
||||
}
|
||||
//if (IsConnecting) // 正在连接节点
|
||||
//{
|
||||
// Point position = e.GetPosition(FlowChartCanvas);
|
||||
// if (currentLine is null || startConnectNodeControl is null)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// currentLine.X1 = Canvas.GetLeft(startConnectNodeControl) + startConnectNodeControl.ActualWidth / 2;
|
||||
// currentLine.Y1 = Canvas.GetTop(startConnectNodeControl) + startConnectNodeControl.ActualHeight / 2;
|
||||
// currentLine.X2 = position.X;
|
||||
// currentLine.Y2 = position.Y;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
if (IsCanvasDragging && e.MiddleButton == MouseButtonState.Pressed) // 正在移动画布(按住中键)
|
||||
{
|
||||
Point currentMousePosition = e.GetPosition(this);
|
||||
@@ -1399,8 +1397,6 @@ namespace Serein.Workbench
|
||||
/// </summary>
|
||||
private void Block_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (IsConnecting)
|
||||
return;
|
||||
if (IsCanvasDragging)
|
||||
return;
|
||||
if (IsSelectControl)
|
||||
@@ -1465,8 +1461,8 @@ namespace Serein.Workbench
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 改变对象树?
|
||||
private void ChangeViewerObjOfNode(NodeControlBase nodeControl)
|
||||
{
|
||||
@@ -1475,7 +1471,9 @@ namespace Serein.Workbench
|
||||
if (node is not null && node.MethodDetails?.ReturnType != typeof(void))
|
||||
{
|
||||
var key = node.Guid;
|
||||
var instance = node.GetFlowData(); // 对象预览树视图获取(后期更改)
|
||||
object instance = null;
|
||||
//Console.WriteLine("WindowXaml 后台代码中 ChangeViewerObjOfNode 需要重新设计");
|
||||
//var instance = node.GetFlowData(); // 对象预览树视图获取(后期更改)
|
||||
if(instance is not null)
|
||||
{
|
||||
ViewObjectViewer.LoadObjectInformation(key, instance);
|
||||
@@ -1505,12 +1503,12 @@ namespace Serein.Workbench
|
||||
EnvDecorator.SetMonitorObjState(key, true); // 通知环境,该节点的数据更新后需要传到UI
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UI连接控件操作
|
||||
|
||||
/// <summary>
|
||||
/// 控件的鼠标左键松开事件,结束拖动操作,创建连线
|
||||
/// 控件的鼠标左键松开事件,结束拖动操作
|
||||
/// </summary>
|
||||
private void Block_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
@@ -1534,52 +1532,18 @@ namespace Serein.Workbench
|
||||
//GlobalJunctionData.OK();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主窗口的KeyDown事件处理,用于在连接操作中按下Esc键取消连接。
|
||||
/// </summary>
|
||||
private void MainWindow_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Escape && IsConnecting)
|
||||
{
|
||||
this.KeyDown -= MainWindow_KeyDown;
|
||||
EndConnection();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 结束连接操作,清理状态并移除虚线。
|
||||
/// </summary>
|
||||
private void EndConnection()
|
||||
{
|
||||
IsConnecting = false;
|
||||
startConnectNodeControl = null;
|
||||
// 移除虚线
|
||||
//if (currentLine != null)
|
||||
//{
|
||||
// FlowChartCanvas.Children.Remove(currentLine);
|
||||
// currentLine = null;
|
||||
//}
|
||||
Mouse.OverrideCursor = null; // 恢复视觉效果
|
||||
ViewModel.IsConnectionArgSourceNode = false;
|
||||
ViewModel.IsConnectionInvokeNode = false;
|
||||
GlobalJunctionData.OK();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新与指定控件相关的所有连接的位置。
|
||||
/// </summary>
|
||||
//private void UpdateConnections(NodeControlBase nodeControl)
|
||||
//{
|
||||
// nodeControl.UpdateLocationConnections();
|
||||
// //foreach (var connection in Connections)
|
||||
// //{
|
||||
// // if (connection.Start.MyNode.Guid == nodeControl.ViewModel.NodeModel.Guid
|
||||
// // || connection.End.MyNode.Guid == nodeControl.ViewModel.NodeModel.Guid)
|
||||
// // {
|
||||
// // connection.RefreshLine(); // 主动更新某个控件相关的所有连接线
|
||||
// // //connection.RemoveFromCanvas();
|
||||
// // //BezierLineDrawer.UpdateBezierLine(FlowChartCanvas, connection.Start, connection.End, connection.BezierPath, connection.ArrowPath);
|
||||
// // }
|
||||
// //}
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 拖动画布实现缩放平移效果
|
||||
private void FlowChartCanvas_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
@@ -1607,7 +1571,7 @@ namespace Serein.Workbench
|
||||
// if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||
{
|
||||
if (e.Delta < 0 && scaleTransform.ScaleX < 0.05) return;
|
||||
if (e.Delta > 0 && scaleTransform.ScaleY > 1.5) return;
|
||||
if (e.Delta > 0 && scaleTransform.ScaleY > 2.0) return;
|
||||
// 获取鼠标在 Canvas 内的相对位置
|
||||
var mousePosition = e.GetPosition(FlowChartCanvas);
|
||||
|
||||
@@ -1781,7 +1745,7 @@ namespace Serein.Workbench
|
||||
/// <param name="e"></param>
|
||||
private void FlowChartCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (GlobalJunctionData.MyGlobalConnectingData is not null)
|
||||
if (GlobalJunctionData.MyGlobalConnectingData.IsCreateing)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1835,36 +1799,52 @@ namespace Serein.Workbench
|
||||
// 释放鼠标捕获
|
||||
FlowChartCanvas.ReleaseMouseCapture();
|
||||
}
|
||||
|
||||
|
||||
// 创建连线
|
||||
if (GlobalJunctionData.MyGlobalConnectingData is not null)
|
||||
if (GlobalJunctionData.MyGlobalConnectingData is ConnectingData myData && myData.IsCreateing)
|
||||
{
|
||||
var myData = GlobalJunctionData.MyGlobalConnectingData;
|
||||
GlobalJunctionData.OK();
|
||||
var canvas = this.FlowChartCanvas;
|
||||
|
||||
if (myData.IsCanConnected)
|
||||
{
|
||||
var canvas = this.FlowChartCanvas;
|
||||
var currentendPoint = e.GetPosition(canvas); // 当前鼠标落点
|
||||
var changingJunctionPosition = myData.CurrentJunction.TranslatePoint(new Point(0, 0), canvas);
|
||||
var changingJunctionRect = new Rect(changingJunctionPosition, new Size(myData.CurrentJunction.Width, myData.CurrentJunction.Height));
|
||||
|
||||
|
||||
if (changingJunctionRect.Contains(currentendPoint)) // 可以创建连接
|
||||
{
|
||||
var argIndex = 0;
|
||||
if(myData.StartJunction is ArgJunctionControl argJunction1)
|
||||
#region 方法调用关系创建
|
||||
if (myData.Type == JunctionOfConnectionType.Invoke)
|
||||
{
|
||||
argIndex = argJunction1.ArgIndex;
|
||||
this.EnvDecorator.ConnectInvokeNodeAsync(myData.StartJunction.MyNode.Guid, myData.CurrentJunction.MyNode.Guid,
|
||||
myData.StartJunction.JunctionType,
|
||||
myData.CurrentJunction.JunctionType,
|
||||
myData.ConnectionInvokeType);
|
||||
}
|
||||
#endregion
|
||||
#region 参数来源关系创建
|
||||
else if (myData.Type == JunctionOfConnectionType.Arg)
|
||||
{
|
||||
var argIndex = 0;
|
||||
if (myData.StartJunction is ArgJunctionControl argJunction1)
|
||||
{
|
||||
argIndex = argJunction1.ArgIndex;
|
||||
}
|
||||
else if (myData.CurrentJunction is ArgJunctionControl argJunction2)
|
||||
{
|
||||
argIndex = argJunction2.ArgIndex;
|
||||
}
|
||||
|
||||
this.EnvDecorator.ConnectArgSourceNodeAsync(myData.StartJunction.MyNode.Guid, myData.CurrentJunction.MyNode.Guid,
|
||||
myData.StartJunction.JunctionType,
|
||||
myData.CurrentJunction.JunctionType,
|
||||
myData.ConnectionArgSourceType,
|
||||
argIndex);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
else if (myData.CurrentJunction is ArgJunctionControl argJunction2)
|
||||
{
|
||||
argIndex = argJunction2.ArgIndex;
|
||||
}
|
||||
this.EnvDecorator.ConnectNodeAsync(myData.StartJunction.MyNode.Guid, myData.CurrentJunction.MyNode.Guid,
|
||||
myData.StartJunction.JunctionType,
|
||||
myData.CurrentJunction.JunctionType,
|
||||
ConnectionInvokeType.IsSucceed,argIndex);
|
||||
}
|
||||
EndConnection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2605,6 +2585,7 @@ namespace Serein.Workbench
|
||||
#region 顶部菜单栏 - 远程管理
|
||||
private async void ButtonStartRemoteServer_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
await this.EnvDecorator.StartRemoteServerAsync();
|
||||
}
|
||||
|
||||
@@ -2618,12 +2599,13 @@ namespace Serein.Workbench
|
||||
var windowEnvRemoteLoginView = new WindowEnvRemoteLoginView(async (addres, port, token) =>
|
||||
{
|
||||
ResetFlowEnvironmentEvent();// 移除事件
|
||||
(var isConnect, RemoteEnvControl remoteEnvControl) = await this.EnvDecorator.ConnectRemoteEnv(addres, port, token);
|
||||
InitFlowEnvironmentEvent(); // 重新添加时间(如果没有连接成功,那么依然是原本的环境)
|
||||
(var isConnect, var _) = await this.EnvDecorator.ConnectRemoteEnv(addres, port, token);
|
||||
InitFlowEnvironmentEvent(); // 重新添加事件(如果没有连接成功,那么依然是原本的环境)
|
||||
if (isConnect)
|
||||
{
|
||||
// 连接成功,加载远程项目
|
||||
var flowEnvInfo = await EnvDecorator.GetEnvInfoAsync();
|
||||
await Task.Delay(1000);
|
||||
EnvDecorator.LoadProject(flowEnvInfo, string.Empty);// 加载远程环境的项目
|
||||
}
|
||||
});
|
||||
@@ -2635,7 +2617,7 @@ namespace Serein.Workbench
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按键监听。esc取消操作
|
||||
/// 窗体按键监听。
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
@@ -2647,16 +2629,53 @@ namespace Serein.Workbench
|
||||
}
|
||||
|
||||
if (e.KeyStates == Keyboard.GetKeyStates(Key.Escape))
|
||||
//if (Keyboard.Modifiers == ModifierKeys.Shift)
|
||||
{
|
||||
IsConnecting = false;
|
||||
IsControlDragging = false;
|
||||
IsCanvasDragging = false;
|
||||
EndConnection();
|
||||
SelectionRectangle.Visibility = Visibility.Collapsed;
|
||||
CancelSelectNode();
|
||||
|
||||
EndConnection();
|
||||
}
|
||||
|
||||
if(GlobalJunctionData.MyGlobalConnectingData is ConnectingData myData && myData.IsCreateing)
|
||||
{
|
||||
if(myData.Type == JunctionOfConnectionType.Invoke)
|
||||
{
|
||||
ConnectionInvokeType connectionInvokeType = e.KeyStates switch
|
||||
{
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D1) => ConnectionInvokeType.Upstream,
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D2) => ConnectionInvokeType.IsSucceed,
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D3) => ConnectionInvokeType.IsFail,
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D4) => ConnectionInvokeType.IsError,
|
||||
_ => ConnectionInvokeType.None,
|
||||
};
|
||||
|
||||
if (connectionInvokeType != ConnectionInvokeType.None)
|
||||
{
|
||||
myData.ConnectionInvokeType = connectionInvokeType;
|
||||
myData.MyLine.Line.UpdateLineColor(connectionInvokeType.ToLineColor());
|
||||
}
|
||||
}
|
||||
else if (myData.Type == JunctionOfConnectionType.Arg)
|
||||
{
|
||||
ConnectionArgSourceType connectionArgSourceType = e.KeyStates switch
|
||||
{
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D1) => ConnectionArgSourceType.GetOtherNodeData,
|
||||
KeyStates k when k == Keyboard.GetKeyStates(Key.D2) => ConnectionArgSourceType.GetOtherNodeDataOfInvoke,
|
||||
_ => ConnectionArgSourceType.GetPreviousNodeData,
|
||||
};
|
||||
|
||||
if (connectionArgSourceType != ConnectionArgSourceType.GetPreviousNodeData)
|
||||
{
|
||||
myData.ConnectionArgSourceType = connectionArgSourceType;
|
||||
myData.MyLine.Line.UpdateLineColor(connectionArgSourceType.ToLineColor());
|
||||
}
|
||||
}
|
||||
myData.CurrentJunction.InvalidateVisual(); // 刷新目标节点控制点样式
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2705,12 +2724,13 @@ namespace Serein.Workbench
|
||||
}
|
||||
ObjDynamicCreateHelper.PrintObjectProperties(result!);
|
||||
Console.WriteLine( );
|
||||
var exp = "@set .Addresses[1].Street = qwq";
|
||||
var exp = "@set .Addresses[1].Street = 233";
|
||||
var data = SerinExpressionEvaluator.Evaluate(exp, result!, out bool isChange);
|
||||
exp = "@get .Addresses[1].Street";
|
||||
data = SerinExpressionEvaluator.Evaluate(exp,result!, out isChange);
|
||||
Console.WriteLine($"{exp} => {data}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载DLL文件,清空当前项目
|
||||
/// </summary>
|
||||
@@ -2719,9 +2739,8 @@ namespace Serein.Workbench
|
||||
private void UnloadAllButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
EnvDecorator.ClearAll();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载DLL文件,清空当前项目
|
||||
/// </summary>
|
||||
@@ -2732,23 +2751,10 @@ namespace Serein.Workbench
|
||||
Connections.Clear();
|
||||
NodeControls.Clear();
|
||||
//currentLine = null;
|
||||
startConnectNodeControl = null;
|
||||
//startConnectNodeControl = null;
|
||||
MessageBox.Show("所有DLL已卸载。", "信息", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region 创建两个控件之间的连接关系,在UI层面上显示为 带箭头指向的贝塞尔曲线
|
||||
|
||||
#region 拓展方法 Extension
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Utils;
|
||||
using Serein.NodeFlow.Env;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
|
||||
namespace Serein.Workbench
|
||||
@@ -9,9 +10,10 @@ namespace Serein.Workbench
|
||||
/// 工作台数据视图
|
||||
/// </summary>
|
||||
/// <param name="window"></param>
|
||||
public class MainWindowViewModel
|
||||
public class MainWindowViewModel: INotifyPropertyChanged
|
||||
{
|
||||
private readonly MainWindow window ;
|
||||
|
||||
/// <summary>
|
||||
/// 运行环境
|
||||
/// </summary>
|
||||
@@ -46,5 +48,54 @@ namespace Serein.Workbench
|
||||
}
|
||||
|
||||
|
||||
private bool _isConnectionInvokeNode = false;
|
||||
/// <summary>
|
||||
/// 是否正在连接节点的方法调用关系
|
||||
/// </summary>
|
||||
public bool IsConnectionInvokeNode { get => _isConnectionInvokeNode; set
|
||||
{
|
||||
if (_isConnectionInvokeNode != value)
|
||||
{
|
||||
SetProperty<bool>(ref _isConnectionInvokeNode, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isConnectionArgSouceNode = false;
|
||||
/// <summary>
|
||||
/// 是否正在连接节点的参数传递关系
|
||||
/// </summary>
|
||||
public bool IsConnectionArgSourceNode { get => _isConnectionArgSouceNode; set
|
||||
{
|
||||
if (_isConnectionArgSouceNode != value)
|
||||
{
|
||||
SetProperty<bool>(ref _isConnectionArgSouceNode, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 略
|
||||
/// <para>此事件为自动生成</para>
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
/// <summary>
|
||||
/// 通知属性变更
|
||||
/// </summary>
|
||||
/// <typeparam name="T">类型</typeparam>
|
||||
/// <param name="storage">绑定的变量</param>
|
||||
/// <param name="value">新的数据</param>
|
||||
/// <param name="propertyName"></param>
|
||||
protected void SetProperty<T>(ref T storage, T value, [System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (Equals(storage, value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
storage = value;
|
||||
PropertyChanged?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,26 +54,26 @@ namespace Serein.Workbench.Node.ViewModel
|
||||
|
||||
|
||||
|
||||
//private bool isInterrupt;
|
||||
/////// <summary>
|
||||
/////// 控制中断状态的视觉效果
|
||||
/////// </summary>
|
||||
//public bool IsInterrupt
|
||||
//{
|
||||
// get => NodeModel.DebugSetting.IsInterrupt;
|
||||
// set
|
||||
// {
|
||||
// NodeModel.DebugSetting.IsInterrupt = value;
|
||||
// OnPropertyChanged();
|
||||
// }
|
||||
//}
|
||||
private bool isInterrupt;
|
||||
///// <summary>
|
||||
///// 控制中断状态的视觉效果
|
||||
///// </summary>
|
||||
public bool IsInterrupt
|
||||
{
|
||||
get => NodeModel.DebugSetting.IsInterrupt;
|
||||
set
|
||||
{
|
||||
NodeModel.DebugSetting.IsInterrupt = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
//public event PropertyChangedEventHandler? PropertyChanged;
|
||||
//protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
//{
|
||||
// //Console.WriteLine(propertyName);
|
||||
// PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
//}
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
//Console.WriteLine(propertyName);
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Serein.Workbench.Node.View"
|
||||
xmlns:vm="clr-namespace:Serein.Workbench.Node.ViewModel"
|
||||
xmlns:Converters="clr-namespace:Serein.Workbench.Tool.Converters"
|
||||
xmlns:converters="clr-namespace:Serein.Workbench.Tool.Converters"
|
||||
xmlns:themes="clr-namespace:Serein.Workbench.Themes"
|
||||
d:DataContext="{d:DesignInstance vm:ActionNodeControlViewModel}"
|
||||
mc:Ignorable="d"
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<UserControl.Resources>
|
||||
<!--<BooleanToVisibilityConverter x:Key="BoolToVisConverter" />-->
|
||||
<Converters:InvertableBooleanToVisibilityConverter x:Key="InvertedBoolConverter"/>
|
||||
<converters:InvertableBooleanToVisibilityConverter x:Key="InvertedBoolConverter"/>
|
||||
<!--<ResourceDictionary Source="/Serein.Workbench;Node/View/NodeExecuteJunctionControl.xaml" x:Key="NodeExecuteJunctionControl"/>-->
|
||||
</UserControl.Resources>
|
||||
|
||||
@@ -27,15 +27,17 @@
|
||||
|
||||
|
||||
<!--<TextBlock Text="{Binding NodelModel.DebugSetting.IsInterrupt}}"></TextBlock>-->
|
||||
<Border x:Name="InterruptBorder">
|
||||
|
||||
<Border x:Name="InterruptBorder" DataContext="{Binding}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<!--默认无边框-->
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=NodeModel.DebugSetting.IsInterrupt}" Value="True">
|
||||
<!--NodeModel.DebugSetting.IsInterrupt-->
|
||||
<!--<DataTrigger Binding="{Binding DataContext.NodeModel.DebugSetting.IsInterrup, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">-->
|
||||
<DataTrigger Binding="{Binding IsInterrupt,Mode=OneTime}" Value="True">
|
||||
<!--<DataTrigger Binding="{Binding NodeModel.DebugSetting.IsInterrup}" Value="True">-->
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="Background" Value="#80000000" />
|
||||
@@ -53,8 +55,8 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<Grid Grid.Row="0" Background="#8DE9FD" >-->
|
||||
<Grid Grid.Row="0" >
|
||||
<Grid Grid.Row="0" Background="#8DE9FD" >
|
||||
<!--<Grid Grid.Row="0" >-->
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="3*"/>
|
||||
<RowDefinition/>
|
||||
@@ -64,6 +66,7 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<local:ExecuteJunctionControl Grid.Column="0" MyNode="{Binding NodeModel}" x:Name="ExecuteJunctionControl" HorizontalAlignment="Left" Grid.RowSpan="2"/>
|
||||
<StackPanel Grid.Column="1" Grid.RowSpan="2" >
|
||||
<TextBlock Text="{Binding NodeModel.MethodDetails.MethodTips, Mode=TwoWay}" HorizontalAlignment="Center"/>
|
||||
@@ -105,6 +108,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
@@ -114,6 +118,8 @@
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="是否使能" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding NodeModel.MethodDetails.IsProtectionParameter, Mode=TwoWay}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="参数保护" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding NodeModel.DebugSetting.IsInterrupt, Mode=TwoWay}"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="中断节点" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<Compile Remove="Node\FlipflopRegionControl.xaml.cs" />
|
||||
<Compile Remove="Node\Junction\NodeJunctionViewBase.cs" />
|
||||
<Compile Remove="Node\NodeBase.cs" />
|
||||
<Compile Remove="Node\View\ActionRegionControl.xaml.cs" />
|
||||
<Compile Remove="Themes\ConditionControl.xaml.cs" />
|
||||
<Compile Remove="Themes\ConditionControlModel.cs" />
|
||||
<Compile Remove="Themes\ConnectionControl.xaml.cs" />
|
||||
@@ -36,6 +37,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Page Remove="Node\FlipflopRegionControl.xaml" />
|
||||
<Page Remove="Node\View\ActionRegionControl.xaml" />
|
||||
<Page Remove="Themes\ConditionControl.xaml" />
|
||||
<Page Remove="Themes\ConnectionControl.xaml" />
|
||||
<Page Remove="Themes\ExplicitDataControl.xaml" />
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
<ItemsControl ItemsSource="{Binding MethodDetails.ParameterDetailss, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl Content="{Binding}">
|
||||
<Grid Background="#E3FDFD" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />
|
||||
<ContentControl Content="{Binding}" Grid.Column="1">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Style.Triggers>
|
||||
@@ -27,10 +33,8 @@
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />
|
||||
<Grid Background="#E3FDFD">
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
@@ -42,7 +46,7 @@
|
||||
<TextBlock Grid.Column="2" MinWidth="50" Text="{Binding Name}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="3" MinWidth="50" Text="无须指定参数"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
@@ -59,8 +63,8 @@
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />
|
||||
<Grid Background="#E3FDFD">
|
||||
<!--<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
@@ -90,8 +94,8 @@
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />
|
||||
<Grid Background="#E3FDFD">
|
||||
<!--<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
@@ -114,6 +118,7 @@
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
Reference in New Issue
Block a user