mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
优化了Workbench上的操作。
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--<nodeView:NetScriptNodeControl x:Name="NetScriptNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>-->
|
||||
<nodeView:FlowCallNodeControl MaxWidth="250" MaxHeight="100" x:Name="FlowCallNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ScriptNodeControl MaxWidth="250" MaxHeight="100" x:Name="ScriptNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:GlobalDataControl MaxWidth="250" MaxHeight="100" x:Name="GlobalDataControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ExpOpNodeControl MaxWidth="250" MaxHeight="100" x:Name="ExpOpNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ConditionNodeControl MaxWidth="250" MaxHeight="100" x:Name="ConditionNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:FlowCallNodeControl MaxWidth="110" MaxHeight="160" x:Name="FlowCallNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ScriptNodeControl MaxWidth="110" MaxHeight="160" x:Name="ScriptNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:GlobalDataControl MaxWidth="110" MaxHeight="160" x:Name="GlobalDataControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ExpOpNodeControl MaxWidth="110" MaxHeight="160" x:Name="ExpOpNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<nodeView:ConditionNodeControl MaxWidth="110" MaxHeight="160" x:Name="ConditionNodeControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>
|
||||
<!--<nodeView:ConditionRegionControl x:Name="ConditionRegionControl" Margin="10" AllowDrop="True" PreviewMouseMove="BaseNodeControl_PreviewMouseMove"/>-->
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<UserControl x:Class="Serein.Workbench.Views.CanvasInfoView"
|
||||
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.Views"
|
||||
xmlns:vm="clr-namespace:Serein.Workbench.ViewModels"
|
||||
xmlns:converter="clr-namespace:Serein.Workbench.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="300"
|
||||
d:DataContext="{d:DesignInstance vm:CanvasInfoViewModel}">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
|
||||
<Style x:Key="InfoTipsTextBlock" TargetType="TextBlock">
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="MinWidth" Value="70"/>
|
||||
<Setter Property="MaxHeight" Value="70"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="InfoValueTextBox" TargetType="TextBox">
|
||||
<Setter Property="Width" Value="170"/>
|
||||
<Setter Property="MinWidth" Value="170"/>
|
||||
<Setter Property="MaxHeight" Value="170"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="10" >
|
||||
<TextBlock Text="公开节点" HorizontalAlignment="Left"/>
|
||||
<ListBox ItemsSource="{Binding Model.PublicNodes}"
|
||||
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Margin="10">
|
||||
<TextBlock Text="流程节点" HorizontalAlignment="Left"/>
|
||||
<ListBox ItemsSource="{Binding Model.Nodes}"
|
||||
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="0" Margin="10">
|
||||
<TextBlock Text="画布信息" HorizontalAlignment="Left"/>
|
||||
<!--<StackPanel Margin="2" Orientation="Horizontal">
|
||||
<TextBlock Text="GUID" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Guid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>-->
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="画布名称" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="尺寸宽度" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="尺寸高度" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="预览位置X" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.ViewX, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="预览位置Y" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.ViewY, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -40,6 +40,7 @@ using MouseEventArgs = System.Windows.Input.MouseEventArgs;
|
||||
using UserControl = System.Windows.Controls.UserControl;
|
||||
using Clipboard = System.Windows.Clipboard;
|
||||
using TextDataFormat = System.Windows.TextDataFormat;
|
||||
using System.Windows.Media.Animation;
|
||||
|
||||
namespace Serein.Workbench.Views
|
||||
{
|
||||
@@ -119,7 +120,7 @@ namespace Serein.Workbench.Views
|
||||
private readonly TranslateTransform translateTransform;
|
||||
#endregion
|
||||
|
||||
#region 初始化以及相关事件
|
||||
#region 初始化
|
||||
|
||||
public FlowCanvasView(FlowCanvasDetails model)
|
||||
{
|
||||
@@ -128,12 +129,13 @@ namespace Serein.Workbench.Views
|
||||
this.DataContext = vm;
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
flowEnvironment = App.GetService<IFlowEnvironment>();
|
||||
flowNodeService = App.GetService<FlowNodeService>();
|
||||
keyEventService = App.GetService<IKeyEventService>();
|
||||
flowEEForwardingService = App.GetService<IFlowEEForwardingService>();
|
||||
flowNodeService.OnCreateNode += OnCreateNode;
|
||||
keyEventService.OnKeyDown += KeyEventService_OnKeyDown;
|
||||
|
||||
|
||||
//flowEEForwardingService.OnProjectLoaded += FlowEEForwardingService_OnProjectLoaded;
|
||||
|
||||
// 缩放平移容器
|
||||
@@ -144,17 +146,10 @@ namespace Serein.Workbench.Views
|
||||
canvasTransformGroup.Children.Add(translateTransform);
|
||||
FlowChartCanvas.RenderTransform = canvasTransformGroup;
|
||||
SetBinding(model);
|
||||
|
||||
InitEvent();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void FlowEEForwardingService_OnProjectLoaded(ProjectLoadedEventArgs eventArgs)
|
||||
{
|
||||
RefreshAllLine();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置绑定
|
||||
/// </summary>
|
||||
@@ -162,12 +157,12 @@ namespace Serein.Workbench.Views
|
||||
private void SetBinding(FlowCanvasDetails canvasModel)
|
||||
{
|
||||
Binding bindingScaleX = new(nameof(canvasModel.ScaleX)) { Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
BindingOperations.SetBinding(scaleTransform, ScaleTransform.ScaleXProperty, bindingScaleX);
|
||||
BindingOperations.SetBinding(scaleTransform, ScaleTransform.ScaleXProperty, bindingScaleX);
|
||||
|
||||
Binding bindingScaleY = new(nameof(canvasModel.ScaleY)){ Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
Binding bindingScaleY = new(nameof(canvasModel.ScaleY)) { Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
BindingOperations.SetBinding(scaleTransform, ScaleTransform.ScaleYProperty, bindingScaleY);
|
||||
|
||||
Binding bindingX = new(nameof(canvasModel.ViewX)) { Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
Binding bindingX = new(nameof(canvasModel.ViewX)) { Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
BindingOperations.SetBinding(translateTransform, TranslateTransform.XProperty, bindingX);
|
||||
|
||||
Binding bindingY = new(nameof(canvasModel.ViewY)) { Source = canvasModel, Mode = BindingMode.TwoWay };
|
||||
@@ -176,17 +171,114 @@ namespace Serein.Workbench.Views
|
||||
}
|
||||
|
||||
|
||||
private void InitEvent()
|
||||
{
|
||||
flowNodeService.OnCreateNode += OnCreateNode;
|
||||
keyEventService.OnKeyDown += KeyEventService_OnKeyDown;
|
||||
flowEEForwardingService.OnNodeLocated += FlowEEForwardingService_OnNodeLocated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 节点需要定位
|
||||
/// </summary>
|
||||
/// <param name="eventArgs"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void FlowEEForwardingService_OnNodeLocated(NodeLocatedEventArgs eventArgs)
|
||||
{
|
||||
if(!ViewModel.NodeControls.TryGetValue(eventArgs.NodeGuid,out var nodeControl))
|
||||
{
|
||||
return;
|
||||
}
|
||||
/*if (nodeControl.FlowCanvas.Guid.Equals(Guid)) // 防止事件传播到其它画布
|
||||
{
|
||||
return;
|
||||
}*/
|
||||
|
||||
// 获取控件在 FlowChartCanvas 上的相对位置
|
||||
#if false
|
||||
Rect controlBounds = VisualTreeHelper.GetDescendantBounds(nodeControl);
|
||||
Point controlPosition = nodeControl.TransformToAncestor(FlowChartCanvas).Transform(new Point(0, 0));
|
||||
|
||||
// 获取控件在画布上的中心点
|
||||
double controlCenterX = controlPosition.X + controlBounds.Width / 2;
|
||||
double controlCenterY = controlPosition.Y + controlBounds.Height / 2;
|
||||
|
||||
// 考虑缩放因素计算目标位置的中心点
|
||||
double scaledCenterX = controlCenterX * scaleTransform.ScaleX;
|
||||
double scaledCenterY = controlCenterY * scaleTransform.ScaleY;
|
||||
|
||||
// 计算平移偏移量,使得控件在可视区域的中心
|
||||
double translateX = scaledCenterX - this.FlowChartStackPanel.ActualWidth / 2;
|
||||
double translateY = scaledCenterY - FlowChartStackPanel.ActualHeight / 2;
|
||||
|
||||
var translate = this.translateTransform;
|
||||
// 应用平移变换
|
||||
translate.X = 0;
|
||||
translate.Y = 0;
|
||||
translate.X -= translateX;
|
||||
translate.Y -= translateY;
|
||||
#endif
|
||||
|
||||
// 设置RenderTransform以实现移动效果
|
||||
TranslateTransform translateTransform = new TranslateTransform();
|
||||
nodeControl.RenderTransform = translateTransform;
|
||||
ElasticAnimation(nodeControl, translateTransform, 6, 0.5, 0.5);
|
||||
}
|
||||
/// <summary>
|
||||
/// 控件抖动
|
||||
/// 来源:https://www.cnblogs.com/RedSky/p/17705411.html
|
||||
/// 作者:HotSky
|
||||
/// </summary>
|
||||
/// <param name="translate"></param>
|
||||
/// <param name="nodeControl">需要抖动的控件</param>
|
||||
/// <param name="power">抖动第一下偏移量</param>
|
||||
/// <param name="range">减弱幅度(小于等于power,大于0)</param>
|
||||
/// <param name="speed">持续系数(大于0),越大时间越长,</param>
|
||||
private static void ElasticAnimation(NodeControlBase nodeControl, TranslateTransform translate, double power, double range = 1, double speed = 1)
|
||||
{
|
||||
DoubleAnimationUsingKeyFrames animation1 = new DoubleAnimationUsingKeyFrames();
|
||||
for (double i = power, j = 1; i >= 0; i -= range)
|
||||
{
|
||||
animation1.KeyFrames.Add(new LinearDoubleKeyFrame(-i, TimeSpan.FromMilliseconds(j++ * 100 * speed)));
|
||||
animation1.KeyFrames.Add(new LinearDoubleKeyFrame(i, TimeSpan.FromMilliseconds(j++ * 100 * speed)));
|
||||
}
|
||||
translate.BeginAnimation(TranslateTransform.YProperty, animation1);
|
||||
DoubleAnimationUsingKeyFrames animation2 = new DoubleAnimationUsingKeyFrames();
|
||||
for (double i = power, j = 1; i >= 0; i -= range)
|
||||
{
|
||||
animation2.KeyFrames.Add(new LinearDoubleKeyFrame(-i, TimeSpan.FromMilliseconds(j++ * 100 * speed)));
|
||||
animation2.KeyFrames.Add(new LinearDoubleKeyFrame(i, TimeSpan.FromMilliseconds(j++ * 100 * speed)));
|
||||
}
|
||||
translate.BeginAnimation(TranslateTransform.XProperty, animation2);
|
||||
|
||||
animation2.Completed += (s, e) =>
|
||||
{
|
||||
nodeControl.RenderTransform = null; // 或者重新设置为默认值
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载完成后刷新显示
|
||||
/// </summary>
|
||||
/// <param name="eventArgs"></param>
|
||||
private void FlowEEForwardingService_OnProjectLoaded(ProjectLoadedEventArgs eventArgs)
|
||||
{
|
||||
RefreshAllLine();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前画布创建了节点
|
||||
/// </summary>
|
||||
/// <param name="nodeControl"></param>
|
||||
private void OnCreateNode(NodeControlBase nodeControl)
|
||||
{
|
||||
if (!nodeControl.FlowCanvas.Guid.Equals(Guid))
|
||||
{
|
||||
// 防止事件传播到其它画布
|
||||
return;
|
||||
}
|
||||
if (!nodeControl.FlowCanvas.Guid.Equals(Guid)) // 防止事件传播到其它画布
|
||||
{
|
||||
return;
|
||||
}
|
||||
var p = nodeControl.ViewModel.NodeModel.Position;
|
||||
PositionOfUI position = new PositionOfUI(p.X, p.Y);
|
||||
if (TryPlaceNodeInRegion(nodeControl, position, out var regionControl)) // 判断添加到区域容器
|
||||
@@ -223,14 +315,14 @@ namespace Serein.Workbench.Views
|
||||
// 准备放置条件表达式控件
|
||||
if (nodeControl.ViewModel.NodeModel.ControlType == NodeControlType.ExpCondition)
|
||||
{
|
||||
/* ConditionRegionControl? conditionRegion = WpfFuncTool.GetParentOfType<ConditionRegionControl>(hitElement);
|
||||
if (conditionRegion is not null)
|
||||
{
|
||||
targetNodeControl = conditionRegion;
|
||||
//// 如果存在条件区域容器
|
||||
//conditionRegion.AddCondition(nodeControl);
|
||||
return true;
|
||||
}*/
|
||||
/* ConditionRegionControl? conditionRegion = WpfFuncTool.GetParentOfType<ConditionRegionControl>(hitElement);
|
||||
if (conditionRegion is not null)
|
||||
{
|
||||
targetNodeControl = conditionRegion;
|
||||
//// 如果存在条件区域容器
|
||||
//conditionRegion.AddCondition(nodeControl);
|
||||
return true;
|
||||
}*/
|
||||
}
|
||||
|
||||
else
|
||||
@@ -246,11 +338,13 @@ namespace Serein.Workbench.Views
|
||||
}
|
||||
targetNodeControl = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 画布接口实现
|
||||
|
||||
|
||||
|
||||
#region 接口实现
|
||||
private IFlowCanvas Api => this;
|
||||
|
||||
public string Guid
|
||||
@@ -273,7 +367,7 @@ namespace Serein.Workbench.Views
|
||||
}
|
||||
void IFlowCanvas.Add(NodeControlBase nodeControl)
|
||||
{
|
||||
|
||||
|
||||
ViewModel.NodeControls.TryAdd(nodeControl.ViewModel.NodeModel.Guid, nodeControl);
|
||||
|
||||
FlowChartCanvas.Dispatcher.Invoke(() =>
|
||||
@@ -356,7 +450,7 @@ namespace Serein.Workbench.Views
|
||||
//}
|
||||
}
|
||||
}
|
||||
void IFlowCanvas.CreateArgConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl,ConnectionArgSourceType type, int index)
|
||||
void IFlowCanvas.CreateArgConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl, ConnectionArgSourceType type, int index)
|
||||
{
|
||||
if (fromNodeControl is not INodeJunction IFormJunction || toNodeControl is not INodeJunction IToJunction)
|
||||
{
|
||||
@@ -377,7 +471,8 @@ namespace Serein.Workbench.Views
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(100);
|
||||
await App.UIContextOperation.InvokeAsync(() => {
|
||||
await App.UIContextOperation.InvokeAsync(() =>
|
||||
{
|
||||
Api.CreateArgConnection(fromNodeControl, toNodeControl, type, index);
|
||||
});
|
||||
});
|
||||
@@ -651,7 +746,7 @@ namespace Serein.Workbench.Views
|
||||
if (e.Data.GetData(MouseNodeType.CreateDllNodeInCanvas) is MoveNodeModel nodeModel)
|
||||
{
|
||||
flowNodeService.CurrentNodeControlType = nodeModel.NodeControlType; // 设置基础节点类型
|
||||
flowNodeService.CurrentDragMdInfo = nodeModel.MethodDetailsInfo; // 基础节点不需要参数信息
|
||||
flowNodeService.CurrentMethodDetailsInfo = nodeModel.MethodDetailsInfo; // 基础节点不需要参数信息
|
||||
flowNodeService.CurrentMouseLocation = position; // 设置当前鼠标为止
|
||||
flowNodeService.CreateNode(); // 创建来自DLL加载的方法节点
|
||||
}
|
||||
@@ -674,7 +769,7 @@ namespace Serein.Workbench.Views
|
||||
if (nodeControlType != NodeControlType.None)
|
||||
{
|
||||
flowNodeService.CurrentNodeControlType = nodeControlType; // 设置基础节点类型
|
||||
flowNodeService.CurrentDragMdInfo = null; // 基础节点不需要参数信息
|
||||
flowNodeService.CurrentMethodDetailsInfo = null; // 基础节点不需要参数信息
|
||||
flowNodeService.CurrentMouseLocation = position; // 设置当前鼠标为止
|
||||
flowNodeService.CreateNode(); // 创建基础节点
|
||||
|
||||
@@ -1095,6 +1190,10 @@ namespace Serein.Workbench.Views
|
||||
}
|
||||
if (selectNodeControls.Count == 1)
|
||||
{
|
||||
var nodeConotrol = selectNodeControls[0];
|
||||
// 选取了控件
|
||||
flowNodeService.CurrentSelectNodeControl = nodeConotrol; // 更新选取节点显示
|
||||
App.GetService<FlowNodeService>().CurrentMethodDetailsInfo = nodeConotrol.ViewModel.NodeModel.MethodDetails.ToInfo();
|
||||
// ChangeViewerObjOfNode(selectNodeControls[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="1.3*"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -31,16 +31,34 @@
|
||||
<!--<RowDefinition Height="3"></RowDefinition>-->
|
||||
<!--<RowDefinition Height="3*"></RowDefinition>-->
|
||||
</Grid.RowDefinitions>
|
||||
<local:BaseNodesView Grid.Row="0" Grid.ColumnSpan="1" Margin="0,0,0,15"/>
|
||||
<local:FlowLibrarysView Grid.Row="1" Grid.ColumnSpan="1" Margin="0,0,0,15" />
|
||||
<local:BaseNodesView Grid.Row="0" Grid.ColumnSpan="1" Margin="5,2,5,2"/>
|
||||
<local:FlowLibrarysView Grid.Row="1" Grid.ColumnSpan="1" Margin="5,2,5,2" />
|
||||
</Grid>
|
||||
<!--功能区和编辑区的分割线-->
|
||||
<GridSplitter Grid.Row="1" Grid.Column="1" Width="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="#CCD5F0" />
|
||||
<GridSplitter Grid.Row="1" Grid.Column="1" Width="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="#E7F0F6" />
|
||||
<!--流程编辑区-->
|
||||
<local:FlowEditView Grid.Row="1" Grid.Column="2"/>
|
||||
<local:FlowEditView Grid.Row="1" Grid.Column="2" Margin="5,2,5,2"/>
|
||||
<!--编辑区和视图区的分割线-->
|
||||
<GridSplitter Grid.Row="1" Grid.Column="3" Width="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="#CCD5F0" />
|
||||
<GridSplitter Grid.Row="1" Grid.Column="3" Width="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Background="#E7F0F6" />
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" MaxHeight="400"/>
|
||||
<RowDefinition Height="auto" MaxHeight="400"/>
|
||||
<RowDefinition Height="auto" MaxHeight="400"/>
|
||||
<RowDefinition Height="*" MaxHeight="400"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<local:ViewCanvasInfoView Grid.Row="0" Margin="5,2,5,2"/>
|
||||
<local:ViewNodeInfoView Grid.Row="1" Margin="5,2,5,2"/>
|
||||
<local:ViewNodeMethodInfoView Grid.Row="2" Margin="5,2,5,2"/>
|
||||
</Grid>
|
||||
|
||||
<local:CanvasInfoView Grid.Row="1" Grid.Column="4" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
116
Workbench/Views/ViewCanvasInfoView.xaml
Normal file
116
Workbench/Views/ViewCanvasInfoView.xaml
Normal file
@@ -0,0 +1,116 @@
|
||||
<UserControl x:Class="Serein.Workbench.Views.ViewCanvasInfoView"
|
||||
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.Views"
|
||||
xmlns:vm="clr-namespace:Serein.Workbench.ViewModels"
|
||||
xmlns:converter="clr-namespace:Serein.Workbench.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="300"
|
||||
d:DataContext="{d:DesignInstance vm:ViewCanvasInfoViewModel}">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
|
||||
<Style x:Key="InfoTipsTextBlock" TargetType="TextBlock">
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="MinWidth" Value="70"/>
|
||||
<Setter Property="MaxHeight" Value="70"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="InfoValueTextBox" TargetType="TextBox">
|
||||
<Setter Property="Width" Value="170"/>
|
||||
<Setter Property="MinWidth" Value="170"/>
|
||||
<Setter Property="MaxHeight" Value="170"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="10" >
|
||||
<TextBlock Text="公开节点" HorizontalAlignment="Left"/>
|
||||
<ListBox ItemsSource="{Binding Model.PublicNodes}"
|
||||
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid PreviewMouseLeftButtonDown="Grid_PreviewMouseLeftButtonDown">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding ControlType}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding DisplayName}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Margin="10">
|
||||
<TextBlock Text="流程节点" HorizontalAlignment="Left"/>
|
||||
<ListBox ItemsSource="{Binding Model.Nodes}"
|
||||
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid PreviewMouseLeftButtonDown="Grid_PreviewMouseLeftButtonDown">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding ControlType}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding DisplayName}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="0" Margin="10">
|
||||
<TextBlock Text="画布信息" HorizontalAlignment="Left"/>
|
||||
<!--<StackPanel Margin="2" Orientation="Horizontal">
|
||||
<TextBlock Text="GUID" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Guid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>-->
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="画布名称" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="尺寸宽度" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="尺寸高度" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="预览位置X" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.ViewX, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="预览位置Y" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding Model.ViewY, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource InfoValueTextBox}"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
51
Workbench/Views/ViewCanvasInfoView.xaml.cs
Normal file
51
Workbench/Views/ViewCanvasInfoView.xaml.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Serein.Library;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Workbench.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Serein.Workbench.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// CanvasNodeTreeView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ViewCanvasInfoView : UserControl
|
||||
{
|
||||
private readonly ViewCanvasInfoViewModel ViewModel;
|
||||
private readonly ViewNodeInfoViewModel NodeInfoViewModel;
|
||||
public ViewCanvasInfoView()
|
||||
{
|
||||
this.ViewModel = App.GetService<ViewCanvasInfoViewModel>();
|
||||
this.NodeInfoViewModel = App.GetService<ViewNodeInfoViewModel>();
|
||||
this.DataContext = this.ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is Grid grid && grid.DataContext is NodeModelBase nodeModel)
|
||||
{
|
||||
NodeInfoViewModel.ViewNodeModel = nodeModel;
|
||||
App.GetService<IFlowEnvironment>().NodeLocated(nodeModel.Guid);
|
||||
}
|
||||
|
||||
// 定位节点
|
||||
//if (e.ClickCount == 2)
|
||||
//{
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Workbench/Views/ViewNodeInfoView.xaml
Normal file
46
Workbench/Views/ViewNodeInfoView.xaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<UserControl x:Class="Serein.Workbench.Views.ViewNodeInfoView"
|
||||
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.Views"
|
||||
xmlns:converter="clr-namespace:Serein.Workbench.Converters"
|
||||
xmlns:vm="clr-namespace:Serein.Workbench.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="300"
|
||||
d:DataContext="{d:DesignInstance vm:ViewNodeInfoViewModel}">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
|
||||
<Style x:Key="InfoTipsTextBlock" TargetType="TextBlock">
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="MinWidth" Value="70"/>
|
||||
<Setter Property="MaxHeight" Value="70"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="InfoValueTextBox" TargetType="TextBox">
|
||||
<Setter Property="Width" Value="170"/>
|
||||
<Setter Property="MinWidth" Value="170"/>
|
||||
<Setter Property="MaxHeight" Value="170"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<!--<ContentControl />-->
|
||||
|
||||
<StackPanel Grid.Row="0" Margin="10">
|
||||
<TextBlock Text="节点信息" HorizontalAlignment="Left"/>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="节点Guid" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding ViewNodeModel.Guid, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="节点名称" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding ViewNodeModel.DisplayName, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -17,15 +17,16 @@ using System.Windows.Shapes;
|
||||
namespace Serein.Workbench.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// CanvasNodeTreeView.xaml 的交互逻辑
|
||||
/// NodeInfoView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CanvasInfoView : UserControl
|
||||
public partial class ViewNodeInfoView : UserControl
|
||||
{
|
||||
private readonly CanvasInfoViewModel ViewModel;
|
||||
public CanvasInfoView()
|
||||
private readonly ViewNodeInfoViewModel ViewModel;
|
||||
public ViewNodeInfoView()
|
||||
{
|
||||
this.ViewModel = App.GetService<CanvasInfoViewModel>();
|
||||
this.DataContext = this.ViewModel;
|
||||
|
||||
ViewModel = App.GetService<Locator>().NodeInfoViewModel;
|
||||
this.DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
75
Workbench/Views/ViewNodeMethodInfoView.xaml
Normal file
75
Workbench/Views/ViewNodeMethodInfoView.xaml
Normal file
@@ -0,0 +1,75 @@
|
||||
<UserControl x:Class="Serein.Workbench.Views.ViewNodeMethodInfoView"
|
||||
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.Views"
|
||||
xmlns:vm="clr-namespace:Serein.Workbench.ViewModels"
|
||||
xmlns:converter="clr-namespace:Serein.Workbench.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="350"
|
||||
d:DataContext="{d:DesignInstance vm:ViewNodeMethodInfoViewModel}">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
|
||||
<Style x:Key="InfoTipsTextBlock" TargetType="TextBlock">
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="MinWidth" Value="70"/>
|
||||
<Setter Property="MaxHeight" Value="70"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="InfoValueTextBox" TargetType="TextBox">
|
||||
<Setter Property="Width" Value="170"/>
|
||||
<Setter Property="MinWidth" Value="170"/>
|
||||
<Setter Property="MaxHeight" Value="170"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<!--<ContentControl />-->
|
||||
|
||||
<StackPanel Grid.Row="0" Margin="10">
|
||||
<TextBlock Text="方法信息" HorizontalAlignment="Left"/>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="程序集" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding MdInfo.AssemblyName}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<TextBlock Text="方法名称" Style="{StaticResource InfoTipsTextBlock}" />
|
||||
<TextBox Text="{Binding MdInfo.MethodName}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
|
||||
</StackPanel>
|
||||
|
||||
<ListBox ItemsSource="{Binding MdInfo.ParameterDetailsInfos}"
|
||||
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding}"/>
|
||||
</Grid>-->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--参数索引提示-->
|
||||
<TextBlock Text="{Binding Index, StringFormat=[{0}]}" Margin="2,0,2,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Name}" Margin="2,0,2,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text=" : " Margin="2,0,2,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding DataTypeFullName}" Margin="2,0,2,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding IsParams, StringFormat=[param:{0}]}" Margin="2,0,2,0" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
33
Workbench/Views/ViewNodeMethodInfoView.xaml.cs
Normal file
33
Workbench/Views/ViewNodeMethodInfoView.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Serein.Workbench.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Serein.Workbench.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// NodeMethodInfoView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ViewNodeMethodInfoView : UserControl
|
||||
{
|
||||
private readonly ViewNodeMethodInfoViewModel ViewModel;
|
||||
|
||||
public ViewNodeMethodInfoView()
|
||||
{
|
||||
ViewModel = App.GetService<Locator>().ViewNodeMethodInfoViewModel;
|
||||
this.DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user