mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
48 lines
1.7 KiB
C#
48 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Media;
|
|
using AIStudio.Wpf.DiagramDesigner.Models;
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
|
{
|
|
public class BlockConnectorInfo : FullyCreatedConnectorInfo
|
|
{
|
|
public BlockConnectorInfo(DesignerItemViewModelBase dataItem, ConnectorOrientation orientation) : this(null, dataItem, orientation)
|
|
{
|
|
|
|
}
|
|
|
|
public BlockConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, ConnectorOrientation orientation) : base(root, dataItem, orientation)
|
|
{
|
|
if (Orientation == ConnectorOrientation.Left || Orientation == ConnectorOrientation.Right)
|
|
{
|
|
ConnectorWidth = 4;
|
|
ConnectorHeight = double.NaN;
|
|
}
|
|
else if (Orientation == ConnectorOrientation.Top || Orientation == ConnectorOrientation.Bottom)
|
|
{
|
|
ConnectorWidth = double.NaN;
|
|
ConnectorHeight = 4;
|
|
}
|
|
}
|
|
|
|
public BlockConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, SerializableItem serializableItem, string serializableType) : base(root, dataItem, serializableItem, serializableType)
|
|
{
|
|
}
|
|
|
|
public BlockConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, SelectableItemBase designer) : base(root, dataItem, designer)
|
|
{
|
|
}
|
|
|
|
protected override void InitNew()
|
|
{
|
|
base.InitNew();
|
|
ColorViewModel.LineColor.Color = Colors.Transparent;
|
|
ColorViewModel.FillColor.Color = Colors.Transparent;
|
|
}
|
|
}
|
|
}
|