修改了无法添加基础节点的bug,增加WebSocket JSON ID字段,远程环境交互使用消息ID作为响应key。

This commit is contained in:
fengjiayi
2024-10-22 00:13:13 +08:00
parent 838158f446
commit 0a7e24d318
48 changed files with 1209 additions and 500 deletions

View File

@@ -5,11 +5,20 @@ namespace Serein.Workbench.Node.ViewModel
{
public class ActionNodeControlViewModel : NodeControlViewModelBase
{
private readonly SingleActionNode node;
//public SingleActionNode NodelModel
//{
// get => (SingleActionNode)base.NodeModel; set
// {
// if (base.NodeModel == null)
// {
// base.NodeModel = value;
// }
// }
//}
public ActionNodeControlViewModel(SingleActionNode node):base(node)
{
this.node = node;
// this.NodelModel = node;
}
}
}

View File

@@ -8,32 +8,32 @@ namespace Serein.Workbench.Node.ViewModel
/// </summary>
public class ConditionNodeControlViewModel : NodeControlViewModelBase
{
private readonly SingleConditionNode singleConditionNode;
public new SingleConditionNode NodeModel { get; }
/// <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(); }
}
///// <summary>
///// 是否为自定义参数
///// </summary>
//public bool IsCustomData
//{
// get => Node.IsCustomData;
// set { Node.IsCustomData= value; OnPropertyChanged(); }
//}
///// <summary>
// /// 自定义参数值
// /// </summary>
//public object? CustomData
//{
// get => Node.CustomData;
// set { Node.CustomData = value ; OnPropertyChanged(); }
//}
///// <summary>
///// 表达式
///// </summary>
//public string Expression
//{
// get => Node.Expression;
// set { Node.Expression = value; OnPropertyChanged(); }
//}
/// <summary>
/// 条件节点
@@ -41,7 +41,7 @@ namespace Serein.Workbench.Node.ViewModel
/// <param name="node"></param>
public ConditionNodeControlViewModel(SingleConditionNode node) : base(node)
{
this.singleConditionNode = node;
this.NodeModel = node;
//IsCustomData = false;
//CustomData = "";
//Expression = "PASS";

View File

@@ -5,22 +5,22 @@ namespace Serein.Workbench.Node.ViewModel
{
public class ExpOpNodeViewModel: NodeControlViewModelBase
{
public readonly SingleExpOpNode node;
public new SingleExpOpNode NodeModel { get; }
public string Expression
{
get => node.Expression;
set
{
node.Expression = value;
OnPropertyChanged();
}
}
//public string Expression
//{
// get => node.Expression;
// set
// {
// node.Expression = value;
// OnPropertyChanged();
// }
//}
public ExpOpNodeViewModel(SingleExpOpNode node) : base(node)
public ExpOpNodeViewModel(SingleExpOpNode nodeModel) : base(nodeModel)
{
this.node = node;
this.NodeModel = nodeModel;
}
}
}

View File

@@ -5,10 +5,10 @@ namespace Serein.Workbench.Node.ViewModel
{
public class FlipflopNodeControlViewModel : NodeControlViewModelBase
{
private readonly SingleFlipflopNode node;
public new SingleFlipflopNode NodelModel { get;}
public FlipflopNodeControlViewModel(SingleFlipflopNode node) : base(node)
{
this.node = node;
this.NodelModel = node;
}
}
}