mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
修改了无法添加基础节点的bug,增加WebSocket JSON ID字段,远程环境交互使用消息ID作为响应key。
This commit is contained in:
@@ -9,83 +9,97 @@ namespace Serein.Workbench.Node.ViewModel
|
||||
public NodeControlViewModelBase(NodeModelBase nodeModel)
|
||||
{
|
||||
NodeModel = nodeModel;
|
||||
MethodDetails = NodeModel.MethodDetails;
|
||||
|
||||
// 订阅来自 NodeModel 的通知事件
|
||||
}
|
||||
|
||||
|
||||
private NodeModelBase _nodeModelBase;
|
||||
/// <summary>
|
||||
/// 对应的节点实体类
|
||||
/// </summary>
|
||||
internal NodeModelBase NodeModel { get; }
|
||||
|
||||
|
||||
private bool isSelect;
|
||||
/// <summary>
|
||||
/// 表示节点控件是否被选中
|
||||
/// </summary>
|
||||
internal bool IsSelect
|
||||
public NodeModelBase NodeModel
|
||||
{
|
||||
get => isSelect;
|
||||
set
|
||||
get => _nodeModelBase; set
|
||||
{
|
||||
isSelect = value;
|
||||
OnPropertyChanged();
|
||||
if (value != null)
|
||||
{
|
||||
_nodeModelBase = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//private bool isSelect;
|
||||
///// <summary>
|
||||
///// 表示节点控件是否被选中
|
||||
///// </summary>
|
||||
//internal bool IsSelect
|
||||
//{
|
||||
// get => isSelect;
|
||||
// set
|
||||
// {
|
||||
// isSelect = 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));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 使节点获得中断能力(以及是否启用节点)
|
||||
/// </summary>
|
||||
public NodeDebugSetting DebugSetting
|
||||
{
|
||||
get => NodeModel.DebugSetting;
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
NodeModel.DebugSetting = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
//public NodeDebugSetting DebugSetting
|
||||
//{
|
||||
// get => Node.DebugSetting;
|
||||
// set
|
||||
// {
|
||||
// if (value != null)
|
||||
// {
|
||||
// Node.DebugSetting = value;
|
||||
// OnPropertyChanged();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 使节点能够表达方法信息
|
||||
/// </summary>
|
||||
public MethodDetails MethodDetails
|
||||
{
|
||||
get => NodeModel.MethodDetails;
|
||||
set
|
||||
{
|
||||
if(value != null)
|
||||
{
|
||||
NodeModel.MethodDetails = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
//public MethodDetails MethodDetails
|
||||
//{
|
||||
// get => Node.MethodDetails;
|
||||
// set
|
||||
// {
|
||||
// if(value != null)
|
||||
// {
|
||||
// Node.MethodDetails = value;
|
||||
// OnPropertyChanged();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
private bool isInterrupt;
|
||||
/// <summary>
|
||||
/// 控制中断状态的视觉效果
|
||||
/// </summary>
|
||||
public bool IsInterrupt
|
||||
{
|
||||
get => isInterrupt;
|
||||
set
|
||||
{
|
||||
isInterrupt = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user