mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-09 02:36:35 +08:00
整理序列化
This commit is contained in:
@@ -8,8 +8,25 @@ using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public abstract class ConnectorInfoBase : BindableBase
|
||||
public abstract class ConnectorInfoBase : SelectableViewModelBase
|
||||
{
|
||||
public ConnectorInfoBase(ConnectorOrientation orientation)
|
||||
{
|
||||
this.Orientation = orientation;
|
||||
}
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
ColorViewModel = new ColorViewModel()
|
||||
{
|
||||
LineColor = new ColorObject() { Color = Color.FromArgb(0xAA, 0x00, 0x00, 0x80) },
|
||||
FillColor = new ColorObject() { Color = Colors.Lavender },
|
||||
};
|
||||
}
|
||||
|
||||
#region 属性
|
||||
public virtual PointBase Position
|
||||
{
|
||||
get;
|
||||
@@ -21,17 +38,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
return new PointBase(Position.X + ConnectorWidth / 2, Position.Y + ConnectorHeight / 2);
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectorInfoBase(ConnectorOrientation orientation)
|
||||
{
|
||||
this.Orientation = orientation;
|
||||
ColorViewModel = new ColorViewModel()
|
||||
{
|
||||
LineColor = new ColorObject() { Color = Color.FromArgb(0xAA, 0x00, 0x00, 0x80) },
|
||||
FillColor = new ColorObject() { Color = Colors.Lavender },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private ConnectorOrientation _orientation;
|
||||
public ConnectorOrientation Orientation
|
||||
@@ -72,19 +79,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private IColorViewModel _colorViewModel;
|
||||
public IColorViewModel ColorViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return _colorViewModel;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _colorViewModel, value);
|
||||
}
|
||||
}
|
||||
|
||||
public double _connectorValue;
|
||||
public double ConnectorValue
|
||||
{
|
||||
@@ -97,5 +91,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
SetProperty(ref _connectorValue, value);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user