GIT练习

This commit is contained in:
fengjiayi
2024-08-05 10:11:58 +08:00
parent 1b7d61c390
commit 75333e621f
84 changed files with 11677 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using Serein.DynamicFlow;
using Serein.DynamicFlow.NodeModel;
using Serein.WorkBench.Node.View;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Serein.WorkBench.Node.ViewModel
{
public class ActionNodeControlViewModel : NodeControlViewModel
{
private readonly SingleActionNode node;
public ActionNodeControlViewModel(SingleActionNode node)
{
this.node = node;
MethodDetails = node.MethodDetails;
//if (node.MethodDetails.ExplicitDatas.Length == 0)
//{
// // 没有显式项
// IsExistExplicitData = false;
// ExplicitDatas = [];
//}
//else
//{
// explicitDatas = node.MethodDetails.ExplicitDatas;
// //ExplicitDatas = node.MethodDetails.ExplicitDatas;
// IsExistExplicitData = true;
//}
}
}
}

View File

@@ -0,0 +1,49 @@
using Serein.DynamicFlow;
using Serein.DynamicFlow.NodeModel;
using Serein.WorkBench.Node.View;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using static Dm.net.buffer.ByteArrayBuffer;
namespace Serein.WorkBench.Node.ViewModel
{
public class ConditionNodeControlViewModel : NodeControlViewModel
{
private readonly SingleConditionNode singleConditionNode;
/// <summary>
/// 是否为自定义参数
/// </summary>
public bool IsCustomData
{
get => singleConditionNode.IsCustomData;
set { singleConditionNode.IsCustomData= value; OnPropertyChanged(); }
}
/// <summary>
/// 自定义参数值
/// </summary>
public object? CustomData
{
get => singleConditionNode.CustomData;
set { singleConditionNode.CustomData = value ; OnPropertyChanged(); }
}
/// <summary>
/// 表达式
/// </summary>
public string Expression
{
get => singleConditionNode.Expression;
set { singleConditionNode.Expression = value; OnPropertyChanged(); }
}
public ConditionNodeControlViewModel(SingleConditionNode node)
{
this.singleConditionNode = node;
MethodDetails = node.MethodDetails;
IsCustomData = false;
CustomData = "";
Expression = "PASS";
}
}
}

View File

@@ -0,0 +1,31 @@
using Serein.DynamicFlow.NodeModel;
using Serein.WorkBench.Node.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Serein.WorkBench.Node.ViewModel
{
public class ExpOpNodeViewModel: NodeControlViewModel
{
public readonly SingleExpOpNode node;
public string Expression
{
get => node.Expression;
set
{
node.Expression = value;
OnPropertyChanged();
}
}
public ExpOpNodeViewModel(SingleExpOpNode node)
{
this.node = node;
}
}
}

View File

@@ -0,0 +1,15 @@
using Serein.DynamicFlow.NodeModel;
using Serein.WorkBench.Node.View;
namespace Serein.WorkBench.Node.ViewModel
{
public class FlipflopNodeControlViewModel : NodeControlViewModel
{
private readonly SingleFlipflopNode node;
public FlipflopNodeControlViewModel(SingleFlipflopNode node)
{
this.node = node;
MethodDetails = node.MethodDetails;
}
}
}

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Serein.WorkBench.Node.ViewModel
{
public class TypeToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is Type type)
{
return type.ToString();
}
return string.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}