准备区分节点、参数、返回值的连接,做个备份

This commit is contained in:
fengjiayi
2024-10-23 19:22:27 +08:00
parent a495a34413
commit 0666f0b2c1
36 changed files with 1497 additions and 756 deletions

View File

@@ -0,0 +1,54 @@
using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
using Serein.Library;
namespace Serein.Workbench.Node.View
{
public class ArgJunctionControl : JunctionControlBase
{
public ArgJunctionControl()
{
base.JunctionType = JunctionType.ArgData;
Render();
}
#region
public static readonly DependencyProperty ArgIndexProperty =
DependencyProperty.Register("ArgIndex", typeof(int), typeof(ArgJunctionControl), new PropertyMetadata(default(int)));
/// <summary>
/// 所在的节点
/// </summary>
public int ArgIndex
{
get { return (int)GetValue(ArgIndexProperty); }
set { SetValue(ArgIndexProperty, value); }
}
#endregion
public override void Render()
{
if(double.IsNaN(base.Width))
{
base.Width = base._MyWidth;
}
if (double.IsNaN(base.Height))
{
base.Height = base._MyHeight;
}
var ellipse = new Ellipse
{
Width = base.Width,
Height = base.Height,
Fill = Brushes.Orange,
ToolTip = "入参"
};
Content = ellipse;
}
}
}