Mind 出发

This commit is contained in:
艾竹
2023-02-12 21:30:16 +08:00
parent 934357c87c
commit 4d36eac218
27 changed files with 491 additions and 133 deletions

View File

@@ -13,6 +13,9 @@ using SvgPathProperties;
namespace AIStudio.Wpf.DiagramDesigner
{
/// <summary>
/// DefaultLink
/// </summary>
public class ConnectionViewModel : SelectableDesignerItemViewModelBase
{
public ConnectionViewModel(FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo, DrawMode drawMode = DrawMode.ConnectingLineSmooth, RouterMode routerMode = AIStudio.Wpf.DiagramDesigner.RouterMode.RouterNormal) : this(null, sourceConnectorInfo, sinkConnectorInfo, drawMode, routerMode)

View File

@@ -199,6 +199,9 @@ namespace AIStudio.Wpf.DiagramDesigner
{
menuOptions.Clear();
var orientation = new CinchMenuItem("方向");
var none = new CinchMenuItem("无");
none.Command = MenuItemCommand;
none.CommandParameter = ConnectorOrientation.None;
var top = new CinchMenuItem("上");
top.Command = MenuItemCommand;
top.CommandParameter = ConnectorOrientation.Top;
@@ -211,6 +214,7 @@ namespace AIStudio.Wpf.DiagramDesigner
var right = new CinchMenuItem("右");
right.Command = MenuItemCommand;
right.CommandParameter = ConnectorOrientation.Right;
orientation.Children.Add(none);
orientation.Children.Add(top);
orientation.Children.Add(bottom);
orientation.Children.Add(left);

View File

@@ -8,12 +8,22 @@ namespace AIStudio.Wpf.DiagramDesigner
{
public class DiagramOption
{
public LayoutOption LayoutOption
{
get; set;
} = new LayoutOption();
public ShortcutOption ShortcutOption
{
get; set;
} = new ShortcutOption();
}
public class LayoutOption
{
}
public class ShortcutOption
{
[Description("Select All shortcut (CTRL+A by default)")]

View File

@@ -503,6 +503,11 @@ namespace AIStudio.Wpf.DiagramDesigner
get; set;
} = new DiagramOption();
public bool AllowDrop
{
get; set;
} = true;
private double OffsetX = 10;
private double OffsetY = 10;
#endregion
@@ -742,6 +747,7 @@ namespace AIStudio.Wpf.DiagramDesigner
PageSizeType = diagramItem.PageSizeType;
PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize;
GridColor = diagramItem.GridColor;
AllowDrop = diagramItem.AllowDrop;
}
public bool ExecuteEnable(object para)

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,6 +11,9 @@ using AIStudio.Wpf.DiagramDesigner.Models;
namespace AIStudio.Wpf.DiagramDesigner
{
/// <summary>
/// DefaultGroup
/// </summary>
public class GroupDesignerItemViewModel : DesignerItemViewModelBase
{
public GroupDesignerItemViewModel() : this(null)