整理序列化

This commit is contained in:
艾竹
2023-01-24 16:20:39 +08:00
parent f39a57b3e5
commit 8dbe05636d
55 changed files with 588 additions and 464 deletions

View File

@@ -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
}
}