mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-23 02:06:35 +08:00
线条文本可以保存了
This commit is contained in:
@@ -18,8 +18,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
}
|
||||
|
||||
public ConnectorViewModel(FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo, DrawMode vectorLineDrawMode)
|
||||
public ConnectorViewModel(IDiagramViewModel parent, FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo, DrawMode vectorLineDrawMode)
|
||||
{
|
||||
Parent = parent;
|
||||
VectorLineDrawMode = vectorLineDrawMode;
|
||||
Init(sourceConnectorInfo, sinkConnectorInfo);
|
||||
}
|
||||
@@ -126,10 +127,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
private set
|
||||
{
|
||||
Rect oldarea = _area;
|
||||
if (SetProperty(ref _area, value))
|
||||
{
|
||||
UpdateConnectionPoints();
|
||||
OutTextItemLocation(_area, value);
|
||||
OutTextItemLocation(oldarea, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,6 +141,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
}
|
||||
|
||||
public virtual Dictionary<string, string> PropertiesSetting
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Dictionary<string, string>()
|
||||
{
|
||||
{ "Text","文本" },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectorInfo ConnectorInfo(ConnectorOrientation orientation, double left, double top, double width, double height, Point position)
|
||||
{
|
||||
|
||||
@@ -256,6 +269,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.SinkConnectorInfo = sinkConnectorInfo;
|
||||
DeleteConnectionCommand = new SimpleCommand(DeleteConnection);
|
||||
|
||||
if (Parent != null && Parent.ColorViewModel != null)
|
||||
{
|
||||
this.ColorViewModel = CopyHelper.Mapper(Parent.ColorViewModel);
|
||||
}
|
||||
if (sinkConnectorInfo is FullyCreatedConnectorInfo sink && sink.DataItem.ShowArrow == false)
|
||||
{
|
||||
this.ColorViewModel.RightArrowPathStyle = ArrowPathStyle.None;
|
||||
|
||||
Reference in New Issue
Block a user