mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
85 lines
2.8 KiB
C#
85 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using AIStudio.Wpf.DiagramDesigner.Models;
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
|
{
|
|
public class LogicalConnectorInfo : FullyCreatedConnectorInfo
|
|
{
|
|
public LogicalConnectorInfo(DesignerItemViewModelBase dataItem, ConnectorOrientation orientation, bool isInnerPoint = false, bool isPortless = false, ConnectorValueType valueTypePoint = ConnectorValueType.Real) : base(dataItem, orientation, isInnerPoint, isPortless)
|
|
{
|
|
this.ConnectorValueType = valueTypePoint;
|
|
}
|
|
|
|
public LogicalConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, ConnectorOrientation orientation, bool isInnerPoint = false, bool isPortless = false, ConnectorValueType valueTypePoint = ConnectorValueType.Real) : base(root, dataItem, orientation, isInnerPoint, isPortless)
|
|
{
|
|
this.ConnectorValueType = valueTypePoint;
|
|
}
|
|
|
|
public LogicalConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, SelectableItemBase designer) : base(root, dataItem, designer)
|
|
{
|
|
}
|
|
|
|
public LogicalConnectorInfo(IDiagramViewModel root, DesignerItemViewModelBase dataItem, SerializableItem serializableItem, string serializableType) : base(root, dataItem, serializableItem, serializableType)
|
|
{
|
|
}
|
|
|
|
public override SelectableItemBase GetSerializableObject()
|
|
{
|
|
return new LogicalConnectorInfoItem(this);
|
|
}
|
|
|
|
protected override void LoadDesignerItemViewModel(SelectableItemBase designerbase)
|
|
{
|
|
base.LoadDesignerItemViewModel(designerbase);
|
|
|
|
if (designerbase is LogicalConnectorInfoItem designer)
|
|
{
|
|
ConnectorValue = designer.ConnectorValue;
|
|
ConnectorValueType = designer.ConnectorValueType;
|
|
ConnectorString = designer.ConnectorString;
|
|
}
|
|
}
|
|
|
|
public double _connectorValue;
|
|
public double ConnectorValue
|
|
{
|
|
get
|
|
{
|
|
return _connectorValue;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _connectorValue, value);
|
|
}
|
|
}
|
|
|
|
public string _connectorString;
|
|
public string ConnectorString
|
|
{
|
|
get
|
|
{
|
|
return _connectorString;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _connectorString, value);
|
|
}
|
|
}
|
|
|
|
public ConnectorValueType _valueType;
|
|
public ConnectorValueType ConnectorValueType
|
|
{
|
|
get
|
|
{
|
|
return _valueType;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _valueType, value);
|
|
}
|
|
}
|
|
}
|
|
}
|