mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
xx
This commit is contained in:
@@ -27,14 +27,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
PathMode = drawMode.ToString();
|
||||
RouterMode = routerMode.ToString();
|
||||
Init(sourceConnectorInfo, sinkConnectorInfo);
|
||||
Init(root, sourceConnectorInfo, sinkConnectorInfo);
|
||||
}
|
||||
|
||||
public ConnectionViewModel(IDiagramViewModel root, FullyCreatedConnectorInfo sourceConnectorInfo, FullyCreatedConnectorInfo sinkConnectorInfo, ConnectionItem designer) : base(root, designer)
|
||||
{
|
||||
PathMode = designer.PathMode;
|
||||
RouterMode = designer.RouterMode;
|
||||
Init(sourceConnectorInfo, sinkConnectorInfo);
|
||||
Init(root, sourceConnectorInfo, sinkConnectorInfo);
|
||||
}
|
||||
|
||||
public override SelectableItemBase GetSerializableObject()
|
||||
@@ -51,9 +51,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Init(FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo)
|
||||
protected virtual void Init(IDiagramViewModel root, FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo)
|
||||
{
|
||||
this.Root = sourceConnectorInfo.DataItem.Root;
|
||||
this.Root = root?? sourceConnectorInfo.Root;
|
||||
|
||||
if (sinkConnectorInfo is FullyCreatedConnectorInfo sink && sink.DataItem.ShowArrow == false)
|
||||
{
|
||||
@@ -427,17 +427,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
#endregion
|
||||
|
||||
#region 方法
|
||||
public SimpleCommand DeleteConnectionCommand
|
||||
public ICommand DeleteConnectionCommand
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public SimpleCommand AddVertexCommand
|
||||
public ICommand AddVertexCommand
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public SimpleCommand AddLabelCommand
|
||||
public ICommand AddLabelCommand
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Input;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
using SvgPathProperties;
|
||||
@@ -82,12 +83,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
}
|
||||
|
||||
public SimpleCommand DeleteLabelCommand
|
||||
public ICommand DeleteLabelCommand
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public SimpleCommand EditCommand
|
||||
public ICommand EditCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
@@ -68,7 +69,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
public override PointBase MiddlePosition => new PointBase(Connector.Area.Left + Left + ConnectorWidth / 2, Connector.Area.Top + Top + ConnectorHeight / 2);
|
||||
|
||||
public SimpleCommand DeleteVertexCommand
|
||||
public ICommand DeleteVertexCommand
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
@@ -185,11 +186,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
#endregion
|
||||
|
||||
#region 方法
|
||||
public SimpleCommand DeleteCommand
|
||||
public ICommand DeleteCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
public SimpleCommand MenuItemCommand
|
||||
public ICommand MenuItemCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
public interface ISelectItems
|
||||
{
|
||||
SimpleCommand SelectItemCommand
|
||||
ICommand SelectItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return true;
|
||||
}
|
||||
|
||||
public SimpleCommand SelectItemCommand
|
||||
public ICommand SelectItemCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
@@ -84,12 +84,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public SimpleCommand AddItemCommand
|
||||
public ICommand AddItemCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand ImageSwitchCommand
|
||||
public ICommand ImageSwitchCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
menuOptions.Add(menuItem);
|
||||
}
|
||||
|
||||
private SimpleCommand _menuItemCommand;
|
||||
public SimpleCommand MenuItemCommand
|
||||
private ICommand _menuItemCommand;
|
||||
public ICommand MenuItemCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
@@ -11,8 +12,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public abstract class LogicalGateItemViewModelBase : DesignerItemViewModelBase
|
||||
{
|
||||
public SimpleCommand AddInputCommand { get; private set; }
|
||||
public SimpleCommand AddOutputCommand { get; private set; }
|
||||
public ICommand AddInputCommand { get; private set; }
|
||||
public ICommand AddOutputCommand { get; private set; }
|
||||
|
||||
|
||||
public LogicalGateItemViewModelBase(LogicalType logicalType) : this(null, logicalType)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
using System.Windows.Input;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
@@ -69,8 +70,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
menuOptions.Add(menuItem);
|
||||
}
|
||||
|
||||
private SimpleCommand _menuItemCommand;
|
||||
public SimpleCommand MenuItemCommand
|
||||
private ICommand _menuItemCommand;
|
||||
public ICommand MenuItemCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
@@ -75,7 +76,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public SimpleCommand MenuItemCommand
|
||||
public ICommand MenuItemCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
@@ -31,190 +31,198 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get;
|
||||
}
|
||||
|
||||
SimpleCommand CreateNewDiagramCommand
|
||||
ICommand CreateNewDiagramCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand DirectAddItemCommand
|
||||
ICommand DirectAddItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AddItemCommand
|
||||
ICommand AddItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand RemoveItemCommand
|
||||
ICommand RemoveItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand DirectRemoveItemCommand
|
||||
ICommand DirectRemoveItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand ClearSelectedItemsCommand
|
||||
ICommand ClearSelectedItemsCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignTopCommand
|
||||
ICommand AlignTopCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignVerticalCentersCommand
|
||||
ICommand AlignVerticalCentersCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignBottomCommand
|
||||
ICommand AlignBottomCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignLeftCommand
|
||||
ICommand AlignLeftCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignHorizontalCentersCommand
|
||||
ICommand AlignHorizontalCentersCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand AlignRightCommand
|
||||
ICommand AlignRightCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand BringForwardCommand
|
||||
ICommand BringForwardCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand BringToFrontCommand
|
||||
ICommand BringToFrontCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SendBackwardCommand
|
||||
ICommand SendBackwardCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SendToBackCommand
|
||||
ICommand SendToBackCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
SimpleCommand DistributeHorizontalCommand
|
||||
ICommand DistributeHorizontalCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand DistributeVerticalCommand
|
||||
ICommand DistributeVerticalCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SelectAllCommand
|
||||
ICommand SelectAllCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SelectInverseCommand
|
||||
ICommand SelectInverseCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SelectItemCommand
|
||||
ICommand SelectItemCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand CopyCommand
|
||||
ICommand CopyCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand PasteCommand
|
||||
ICommand PasteCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand CutCommand
|
||||
ICommand CutCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand DeleteCommand
|
||||
ICommand DeleteCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand LeftMoveCommand
|
||||
ICommand LeftMoveCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand RightMoveCommand
|
||||
ICommand RightMoveCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand UpMoveCommand
|
||||
ICommand UpMoveCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand DownMoveCommand
|
||||
ICommand DownMoveCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand CenterMoveCommand
|
||||
ICommand CenterMoveCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SameSizeCommand
|
||||
ICommand SameSizeCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SameWidthCommand
|
||||
ICommand SameWidthCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SameHeightCommand
|
||||
ICommand SameHeightCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand SameAngleCommand
|
||||
ICommand SameAngleCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand GroupCommand
|
||||
ICommand FitAutoCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand UngroupCommand
|
||||
ICommand FitWidthCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand LockCommand
|
||||
ICommand FitHeightCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand UnlockCommand
|
||||
ICommand GroupCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
SimpleCommand EditCommand
|
||||
ICommand UngroupCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
SimpleCommand UndoCommand
|
||||
ICommand LockCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
SimpleCommand RedoCommand
|
||||
ICommand UnlockCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
SimpleCommand ResetLayoutCommand
|
||||
ICommand EditCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
ICommand UndoCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
ICommand RedoCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
ICommand ResetLayoutCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
ICommand SearchDownCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
ICommand SearchUpCommand
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
event DiagramEventHandler Event;
|
||||
|
||||
Func<SelectableDesignerItemViewModelBase, bool> OutAddVerify
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
//void ClearSelectedItems();
|
||||
//bool BelongToSameGroup(IGroupable item1, IGroupable item2);
|
||||
//Rectangle GetBoundingRectangle(IEnumerable<DesignerItemViewModelBase> items);
|
||||
//void UpdateZIndex();
|
||||
|
||||
bool IsReadOnly
|
||||
{
|
||||
get; set;
|
||||
|
||||
Reference in New Issue
Block a user