mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-03 06:21:30 +08:00
Merge branch 'master' of https://gitee.com/akwkevin/aistudio.-wpf.-diagram
This commit is contained in:
@@ -63,7 +63,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
|
|
||||||
Point point = sourceDataItem.MiddlePosition;
|
Point point = sourceDataItem.MiddlePosition;
|
||||||
|
|
||||||
partialConnection = new ConnectionViewModel(_viewModel, sourceDataItem, new PartCreatedConnectorInfo(point.X, point.Y), DrawMode, RouterMode);
|
partialConnection = new ConnectionViewModel(_viewModel, sourceDataItem, new PartCreatedConnectorInfo(point.X, point.Y), LineDrawMode, RouterMode);
|
||||||
|
|
||||||
_viewModel.Add(partialConnection);
|
_viewModel.Add(partialConnection);
|
||||||
partialConnection.ZIndex = -1;
|
partialConnection.ZIndex = -1;
|
||||||
@@ -106,6 +106,22 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DrawMode LineDrawMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_viewModel.DrawModeViewModel != null)
|
||||||
|
{
|
||||||
|
return _viewModel.DrawModeViewModel.LineDrawMode;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return _service.DrawModeViewModel.LineDrawMode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private RouterMode RouterMode
|
private RouterMode RouterMode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -496,7 +512,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
ConnectorInfoBase sinkDataItem = SinkConnector.Info;
|
ConnectorInfoBase sinkDataItem = SinkConnector.Info;
|
||||||
|
|
||||||
_viewModel.Remove(partialConnection);
|
_viewModel.Remove(partialConnection);
|
||||||
_viewModel.AddItemCommand.Execute(new ConnectionViewModel(_viewModel, sourceDataItem, sinkDataItem, DrawMode, RouterMode));
|
_viewModel.AddItemCommand.Execute(new ConnectionViewModel(_viewModel, sourceDataItem, sinkDataItem, LineDrawMode, RouterMode));
|
||||||
}
|
}
|
||||||
else if (partialConnection.IsFullConnection)//自动连接模式
|
else if (partialConnection.IsFullConnection)//自动连接模式
|
||||||
{
|
{
|
||||||
@@ -508,7 +524,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
ConnectorInfoBase sinkDataItem = new PartCreatedConnectorInfo(currentPoint.X, currentPoint.Y);
|
ConnectorInfoBase sinkDataItem = new PartCreatedConnectorInfo(currentPoint.X, currentPoint.Y);
|
||||||
|
|
||||||
_viewModel.Remove(partialConnection);
|
_viewModel.Remove(partialConnection);
|
||||||
_viewModel.AddItemCommand.Execute(new ConnectionViewModel(_viewModel, sourceDataItem, sinkDataItem, DrawMode, RouterMode));
|
_viewModel.AddItemCommand.Execute(new ConnectionViewModel(_viewModel, sourceDataItem, sinkDataItem, LineDrawMode, RouterMode));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
Images/66.gif
Normal file
BIN
Images/66.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 614 KiB |
BIN
Images/drawing.png
Normal file
BIN
Images/drawing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
13
README.md
13
README.md
@@ -6,6 +6,19 @@
|
|||||||
友情提示 很多朋友老问为什么编译不过去,您需要安装对应的net版本,或者修改工程的net版本,如下图。
|
友情提示 很多朋友老问为什么编译不过去,您需要安装对应的net版本,或者修改工程的net版本,如下图。
|
||||||

|

|
||||||
|
|
||||||
|
## 2023年5月17日更新内容(做一个画笔画笔)
|
||||||
|

|
||||||
|
[1] 画笔实现
|
||||||
|
[2] 封闭画笔实现
|
||||||
|
[3] 钢笔实现
|
||||||
|
[4] 文字画笔
|
||||||
|
[5] 直线,矩形,椭圆
|
||||||
|
[6] Path形状
|
||||||
|
[7] 取色器
|
||||||
|
[8] 三种画笔可选
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 2023年5月1号更新内容(做一个可编程画板):
|
## 2023年5月1号更新内容(做一个可编程画板):
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Reference in New Issue
Block a user