mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-02 15:50:47 +08:00
74 lines
1.7 KiB
C#
74 lines
1.7 KiB
C#
|
|
using Serein.Library.Entity;
|
|||
|
|
using Serein.NodeFlow.Base;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Runtime.CompilerServices;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace Serein.WorkBench.Node.ViewModel
|
|||
|
|
{
|
|||
|
|
public abstract class NodeControlViewModelBase : INotifyPropertyChanged
|
|||
|
|
{
|
|||
|
|
public NodeControlViewModelBase(NodeModelBase node)
|
|||
|
|
{
|
|||
|
|
Node = node;
|
|||
|
|
MethodDetails = Node.MethodDetails;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 对应的节点实体类
|
|||
|
|
/// </summary>
|
|||
|
|
internal NodeModelBase Node { get; }
|
|||
|
|
|
|||
|
|
private bool isSelect;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 表示节点控件是否被选中
|
|||
|
|
/// </summary>
|
|||
|
|
internal bool IsSelect
|
|||
|
|
{
|
|||
|
|
get => isSelect;
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
isSelect = value;
|
|||
|
|
// OnPropertyChanged();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private MethodDetails methodDetails;
|
|||
|
|
|
|||
|
|
|
|||
|
|
public MethodDetails MethodDetails
|
|||
|
|
{
|
|||
|
|
get => methodDetails;
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
methodDetails = value;
|
|||
|
|
OnPropertyChanged();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|||
|
|
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|||
|
|
|
|||
|
|
{
|
|||
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
///
|
|||
|
|
/// </summary>
|
|||
|
|
public void Selected()
|
|||
|
|
{
|
|||
|
|
IsSelect = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void CancelSelect()
|
|||
|
|
{
|
|||
|
|
IsSelect = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|