mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 08:26:36 +08:00
xx
This commit is contained in:
@@ -10,24 +10,24 @@ using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ItemsContainerInfo : SelectableViewModelBase
|
||||
public class BlockItemsContainerInfo : SelectableViewModelBase
|
||||
{
|
||||
public ItemsContainerInfo(BlockDesignerItemViewModel dataItem) : this(null, dataItem)
|
||||
public BlockItemsContainerInfo(BlockDesignerItemViewModel dataItem) : this(null, dataItem)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ItemsContainerInfo(IDiagramViewModel root, BlockDesignerItemViewModel dataItem) : base(root)
|
||||
public BlockItemsContainerInfo(IDiagramViewModel root, BlockDesignerItemViewModel dataItem) : base(root)
|
||||
{
|
||||
this.Parent = dataItem;
|
||||
}
|
||||
|
||||
public ItemsContainerInfo(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
|
||||
public BlockItemsContainerInfo(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ItemsContainerInfo(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
||||
public BlockItemsContainerInfo(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -139,7 +139,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
} = new ObservableCollection<BlockDesignerItemViewModel>();
|
||||
|
||||
public List<ItemsContainerInfo> ChildrenContain
|
||||
public List<BlockItemsContainerInfo> ChildrenContain
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -227,9 +227,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Children.Remove(child);
|
||||
}
|
||||
|
||||
public List<ItemsContainerInfo> GetAllContain(ObservableCollection<BlockDesignerItemViewModel> children, bool self)
|
||||
public List<BlockItemsContainerInfo> GetAllContain(ObservableCollection<BlockDesignerItemViewModel> children, bool self)
|
||||
{
|
||||
List <ItemsContainerInfo> itemsContainers= new List <ItemsContainerInfo>();
|
||||
List <BlockItemsContainerInfo> itemsContainers= new List <BlockItemsContainerInfo>();
|
||||
if (self)
|
||||
{
|
||||
itemsContainers.Add(this);
|
||||
@@ -3145,7 +3145,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return new Tuple<FullyCreatedConnectorInfo, FullyCreatedConnectorInfo>(parent, next);
|
||||
}
|
||||
|
||||
public ItemsContainerInfo FindNearContainerToAttachTo(BlockDesignerItemViewModel blockDesignerItemViewModel)
|
||||
public BlockItemsContainerInfo FindNearContainerToAttachTo(BlockDesignerItemViewModel blockDesignerItemViewModel)
|
||||
{
|
||||
if (blockDesignerItemViewModel == null)
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.InitNew();
|
||||
|
||||
Contains.Add(new ItemsContainerInfo(this.Root, this));
|
||||
Contains.Add(new BlockItemsContainerInfo(this.Root, this));
|
||||
}
|
||||
|
||||
public override void AddChild(BlockDesignerItemViewModel child)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.InitNew();
|
||||
|
||||
Contains.Add(new ItemsContainerInfo(this.Root, this));
|
||||
Contains.Add(new BlockItemsContainerInfo(this.Root, this));
|
||||
}
|
||||
|
||||
public override void AddChild(BlockDesignerItemViewModel child)
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ItemsContainerInfo ParentContain
|
||||
public BlockItemsContainerInfo ParentContain
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -145,12 +145,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}));
|
||||
}
|
||||
|
||||
public ObservableCollection<ItemsContainerInfo> Contains
|
||||
public ObservableCollection<BlockItemsContainerInfo> Contains
|
||||
{
|
||||
get; set;
|
||||
} = new ObservableCollection<ItemsContainerInfo>();
|
||||
} = new ObservableCollection<BlockItemsContainerInfo>();
|
||||
|
||||
public ItemsContainerInfo FirstContain
|
||||
public BlockItemsContainerInfo FirstContain
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -158,7 +158,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public List<ItemsContainerInfo> GetAllContain()
|
||||
public List<BlockItemsContainerInfo> GetAllContain()
|
||||
{
|
||||
return Contains.SelectMany(p => p.GetAllContain(p.Children, true)).ToList();
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
FullyCreatedConnectorInfo FindNearPortToAttachTo(ConnectionViewModel partialConnection, ConnectorVertexType connectorVertexType);
|
||||
FullyCreatedConnectorInfo FindNearPortToAttachTo(ConnectionViewModel partialConnection);
|
||||
Tuple<FullyCreatedConnectorInfo, FullyCreatedConnectorInfo> FindNearPortToAttachTo(BlockDesignerItemViewModel blockDesignerItemViewModel, bool isExist);
|
||||
ItemsContainerInfo FindNearContainerToAttachTo(BlockDesignerItemViewModel blockDesignerItemViewModel);
|
||||
BlockItemsContainerInfo FindNearContainerToAttachTo(BlockDesignerItemViewModel blockDesignerItemViewModel);
|
||||
void ClearNearPort();
|
||||
void ClearNearContain();
|
||||
void PreviewNearBlock(List<BlockDesignerItemViewModel> blocks);
|
||||
|
||||
Reference in New Issue
Block a user