mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
新增了对NodeaAction特性标记方法中,对params可变参数的支持
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using Serein.Library;
|
||||
using Serein.Workbench.Node;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Serein.Workbench.Themes
|
||||
{
|
||||
@@ -15,10 +17,12 @@ namespace Serein.Workbench.Themes
|
||||
{
|
||||
if (isEnabled)
|
||||
{
|
||||
// 返回文本框
|
||||
if (valueType == typeof(string) || valueType == typeof(int) || valueType == typeof(double))
|
||||
{
|
||||
return "TextBoxTemplate";
|
||||
}
|
||||
// 返回可选列表框
|
||||
else if (typeof(IEnumerable).IsAssignableFrom(valueType))
|
||||
{
|
||||
return "ComboBoxTemplate";
|
||||
@@ -44,23 +48,43 @@ namespace Serein.Workbench.Themes
|
||||
static MethodDetailsControl()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MethodDetailsControl), new FrameworkPropertyMetadata(typeof(MethodDetailsControl)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region 绑定的方法信息
|
||||
public MethodDetails MethodDetails
|
||||
{
|
||||
get { return (MethodDetails)GetValue(MethodDetailsProperty); }
|
||||
set { SetValue(MethodDetailsProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty MethodDetailsProperty = DependencyProperty.Register("MethodDetails", typeof(MethodDetails),
|
||||
public static readonly DependencyProperty MethodDetailsProperty = DependencyProperty.Register(nameof(MethodDetails), typeof(MethodDetails),
|
||||
typeof(MethodDetailsControl), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChange)));
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
static void OnPropertyChange(DependencyObject sender, DependencyPropertyChangedEventArgs args)
|
||||
{
|
||||
|
||||
var MethodDetails = (MethodDetails)args.NewValue;
|
||||
//var MethodDetails = (MethodDetails)args.NewValue;
|
||||
//MethodDetails.ExplicitDatas[0].
|
||||
}
|
||||
|
||||
|
||||
public ICommand CommandAddParams { get; }
|
||||
|
||||
public MethodDetailsControl()
|
||||
{
|
||||
CommandAddParams = new RelayCommand(ExecuteAddParams);
|
||||
}
|
||||
|
||||
private void ExecuteAddParams(object parameter)
|
||||
{
|
||||
// 方法逻辑
|
||||
this.MethodDetails.AddParamsArg();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user