重写了节点的view、viewmodel关系,实现了对画布元素的选取功能,重构了底层依赖,添加了对net .Framework4.6.1以上的Framework类库支持

This commit is contained in:
fengjiayi
2024-09-12 20:32:54 +08:00
parent ec6e09ced1
commit f286fc644a
120 changed files with 91218 additions and 761 deletions

View File

@@ -15,27 +15,42 @@ namespace Serein.WorkBench.Node.View
/// </summary>
public abstract class NodeControlBase : UserControl, IDynamicFlowNode
{
public NodeBase Node { get; set; }
public NodeControlViewModelBase ViewModel { get; set; }
protected NodeControlBase()
{
this.Background = Brushes.Transparent;
}
protected NodeControlBase(NodeBase node)
protected NodeControlBase(NodeControlViewModelBase viewModelBase)
{
ViewModel = viewModelBase;
this.Background = Brushes.Transparent;
Node = node;
}
}
public abstract class NodeControlViewModel : INotifyPropertyChanged
public abstract class NodeControlViewModelBase : INotifyPropertyChanged
{
public NodeControlViewModelBase(NodeBase node)
{
this.Node = node;
MethodDetails = this.Node.MethodDetails;
}
/// <summary>
/// 对应的节点实体类
/// </summary>
public NodeBase Node { get; set; }
public MethodDetails methodDetails;
/// <summary>
/// 表示节点控件是否被选中
/// </summary>
public bool IsSelect { get; set; } = false;
private MethodDetails methodDetails;
public MethodDetails MethodDetails