mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
xx
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -10,15 +12,15 @@ using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ItemsContainer : ContentControl
|
||||
public class BlockItemsContainer : ContentControl
|
||||
{
|
||||
static ItemsContainer()
|
||||
static BlockItemsContainer()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(ItemsContainer), new FrameworkPropertyMetadata(typeof(ItemsContainer)));
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(BlockItemsContainer), new FrameworkPropertyMetadata(typeof(BlockItemsContainer)));
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty BorderProperty = DependencyProperty.Register(
|
||||
nameof(Border), typeof(object), typeof(ItemsContainer), new PropertyMetadata(default(object)));
|
||||
nameof(Border), typeof(object), typeof(BlockItemsContainer), new PropertyMetadata(default(object)));
|
||||
|
||||
public object Border
|
||||
{
|
||||
@@ -27,7 +29,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty BorderTemplateProperty = DependencyProperty.Register(
|
||||
nameof(BorderTemplate), typeof(DataTemplate), typeof(ItemsContainer), new PropertyMetadata(default(DataTemplate)));
|
||||
nameof(BorderTemplate), typeof(DataTemplate), typeof(BlockItemsContainer), new PropertyMetadata(default(DataTemplate)));
|
||||
|
||||
[Bindable(true), Category("Content")]
|
||||
public DataTemplate BorderTemplate
|
||||
@@ -37,7 +39,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty BorderTemplateSelectorProperty = DependencyProperty.Register(
|
||||
nameof(BorderTemplateSelector), typeof(DataTemplateSelector), typeof(ItemsContainer), new PropertyMetadata(default(DataTemplateSelector)));
|
||||
nameof(BorderTemplateSelector), typeof(DataTemplateSelector), typeof(BlockItemsContainer), new PropertyMetadata(default(DataTemplateSelector)));
|
||||
|
||||
[Bindable(true), Category("Content")]
|
||||
public DataTemplateSelector BorderTemplateSelector
|
||||
@@ -47,7 +49,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty BorderStringFormatProperty = DependencyProperty.Register(
|
||||
nameof(BorderStringFormat), typeof(string), typeof(ItemsContainer), new PropertyMetadata(default(string)));
|
||||
nameof(BorderStringFormat), typeof(string), typeof(BlockItemsContainer), new PropertyMetadata(default(string)));
|
||||
|
||||
[Bindable(true), Category("Content")]
|
||||
public string BorderStringFormat
|
||||
@@ -58,7 +60,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
|
||||
public static readonly DependencyProperty ParentPanelProperty =
|
||||
DependencyProperty.Register(nameof(ParentPanel), typeof(FrameworkElement), typeof(ItemsContainer),
|
||||
DependencyProperty.Register(nameof(ParentPanel), typeof(FrameworkElement), typeof(BlockItemsContainer),
|
||||
new FrameworkPropertyMetadata(null));
|
||||
|
||||
public FrameworkElement ParentPanel
|
||||
@@ -76,7 +78,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public static readonly DependencyProperty GetOffSetFuncProperty =
|
||||
DependencyProperty.Register(nameof(GetOffSetFunc),
|
||||
typeof(Func<Point>),
|
||||
typeof(ItemsContainer),
|
||||
typeof(BlockItemsContainer),
|
||||
new FrameworkPropertyMetadata(null));
|
||||
public Func<Point> GetOffSetFunc
|
||||
{
|
||||
@@ -98,14 +100,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public ItemsContainerInfo Info
|
||||
public BlockItemsContainerInfo Info
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Border is ItemsContainerInfo itemsContainerInfo)
|
||||
if (Border is BlockItemsContainerInfo itemsContainerInfo)
|
||||
return itemsContainerInfo;
|
||||
|
||||
return this.DataContext as ItemsContainerInfo;
|
||||
return this.DataContext as BlockItemsContainerInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,11 +121,18 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public ItemsContainer()
|
||||
public Point? FirstPoint
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public BlockItemsContainer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static List<BlockItemsContainer> Containers = new List<BlockItemsContainer>();
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
@@ -131,33 +140,31 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
GetOffSetFunc = GetOffSet;
|
||||
}
|
||||
|
||||
Point? firstPoint;
|
||||
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnMouseLeftButtonDown(e);
|
||||
firstPoint = e.GetPosition(this);
|
||||
FirstPoint = e.GetPosition(this);
|
||||
Containers.Add(this);
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (firstPoint != null)
|
||||
if (FirstPoint != null)
|
||||
{
|
||||
var currentPoint = e.GetPosition(this);
|
||||
if (Math.Sqrt(Math.Pow(firstPoint.Value.X - currentPoint.X, 2) + Math.Pow(firstPoint.Value.Y - currentPoint.Y, 2)) > 5)
|
||||
if (Math.Sqrt(Math.Pow(FirstPoint.Value.X - currentPoint.X, 2) + Math.Pow(FirstPoint.Value.Y - currentPoint.Y, 2)) > 5)
|
||||
{
|
||||
firstPoint = null;
|
||||
FirstPoint = null;
|
||||
if (Info?.Children?.Count > 0)
|
||||
{
|
||||
var borders = VisualHelper.FindVisualChildren<BlockBorder>(this);
|
||||
BlockBorder innerblock = null;
|
||||
BlockDesignerItemViewModel dragObject = null;
|
||||
Point dragOffset = new Point();
|
||||
foreach (var border in borders)
|
||||
{
|
||||
var itemsContainer = VisualHelper.TryFindParent<ItemsContainer>(border);
|
||||
if (this != itemsContainer)
|
||||
var itemsContainers = VisualHelper.TryFindParent<BlockItemsContainer>(border);
|
||||
if (this != itemsContainers)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -174,9 +181,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
if (DragObject != null)
|
||||
{
|
||||
Containers.ForEach(p => p.FirstPoint = null);
|
||||
DesignerCanvas canvas = GetDesignerCanvas(this);
|
||||
if (canvas != null)
|
||||
{
|
||||
{
|
||||
canvas.SourceItemsContainer = this;
|
||||
e.Handled = true;
|
||||
}
|
||||
@@ -189,7 +197,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
firstPoint = null;
|
||||
FirstPoint = null;
|
||||
|
||||
Containers.Clear();
|
||||
}
|
||||
|
||||
public ConnectorOrientation Orientation
|
||||
23
AIStudio.Wpf.DiagramDesigner/Controls/BlockItemsControl.xaml
Normal file
23
AIStudio.Wpf.DiagramDesigner/Controls/BlockItemsControl.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<ItemsControl x:Class="AIStudio.Wpf.DiagramDesigner.BlockItemsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:dd="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<dd:BlockBorder>
|
||||
<ContentControl Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
||||
</dd:BlockBorder>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
</ItemsControl>
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
/// <summary>
|
||||
/// BlockItemsControl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class BlockItemsControl : ItemsControl
|
||||
{
|
||||
public BlockItemsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override System.Windows.DependencyObject GetContainerForItemOverride()
|
||||
{
|
||||
return new ListBoxItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,8 +84,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private ItemsContainer _sourceItemsContainer;
|
||||
public ItemsContainer SourceItemsContainer
|
||||
private BlockItemsContainer _sourceItemsContainer;
|
||||
public BlockItemsContainer SourceItemsContainer
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
_sourceItemsContainer = value;
|
||||
if (_sourceItemsContainer != null)
|
||||
{
|
||||
ItemsContainerInfo sourceDataItem = _sourceItemsContainer.Info;
|
||||
BlockItemsContainerInfo sourceDataItem = _sourceItemsContainer.Info;
|
||||
|
||||
sourceDataItem.DataItem.RemoveChild(_sourceItemsContainer.DragObject);
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type dd:ItemsContainerInfo}">
|
||||
<DataTemplate DataType="{x:Type dd:BlockItemsContainerInfo}">
|
||||
<Grid dd:WidthAndHeightProps.Active="True"
|
||||
dd:WidthAndHeightProps.BoundActualWidth="{Binding ActualItemWidth,Mode=OneWayToSource}"
|
||||
dd:WidthAndHeightProps.BoundActualHeight="{Binding ActualItemHeight,Mode=OneWayToSource}">
|
||||
@@ -181,10 +181,10 @@
|
||||
</DataTemplate>
|
||||
|
||||
<!-- DragThumb Default Template -->
|
||||
<Style TargetType="{x:Type dd:ItemsContainer}">
|
||||
<Style TargetType="{x:Type dd:BlockItemsContainer}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type dd:ItemsContainer}">
|
||||
<ControlTemplate TargetType="{x:Type dd:BlockItemsContainer}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
|
||||
@@ -99,65 +99,64 @@
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type dd:BlockDesignerItemViewModel}">
|
||||
<dd:BlockBorder>
|
||||
<Grid x:Name="grid" MinWidth="{Binding MinItemWidth}" MinHeight="{Binding MinItemHeight}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Rectangle StrokeThickness="1" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" />
|
||||
<Border x:Name="left" HorizontalAlignment="Left" Width="5" Background="Transparent"/>
|
||||
<Control x:Name="PART_Text" IsHitTestVisible="{Binding IsReadOnlyText,Converter={StaticResource InvertBoolConverter}}">
|
||||
<Control.Style>
|
||||
<Style TargetType="Control">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ShowText}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Text,Converter={StaticResource NotNullOrEmptyToBoolConverter}}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding CustomText}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Control.Style>
|
||||
</Control>
|
||||
</Grid>
|
||||
<dd:ItemsContainer x:Name="contain"
|
||||
<Grid x:Name="grid" MinWidth="{Binding MinItemWidth}" MinHeight="{Binding MinItemHeight}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Rectangle StrokeThickness="1" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" />
|
||||
<Border x:Name="left" HorizontalAlignment="Left" Width="5" Background="Transparent"/>
|
||||
<Control x:Name="PART_Text" IsHitTestVisible="{Binding IsReadOnlyText,Converter={StaticResource InvertBoolConverter}}">
|
||||
<Control.Style>
|
||||
<Style TargetType="Control">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ShowText}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Text,Converter={StaticResource NotNullOrEmptyToBoolConverter}}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding CustomText}" Value="True">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Control.Style>
|
||||
</Control>
|
||||
</Grid>
|
||||
<dd:BlockItemsContainer x:Name="contain"
|
||||
Margin="20"
|
||||
ParentPanel="{Binding ElementName=grid}"
|
||||
GetOffSetFunc="{Binding FirstContain.GetOffSetFunc,Mode=OneWayToSource}"
|
||||
Border="{Binding FirstContain}">
|
||||
<ItemsControl x:Name="items" ItemsSource="{Binding FirstContain.Children}">
|
||||
<dd:BlockItemsControl x:Name="items" ItemsSource="{Binding FirstContain.Children}">
|
||||
|
||||
</dd:BlockItemsControl>
|
||||
</dd:BlockItemsContainer>
|
||||
</Grid>
|
||||
|
||||
</ItemsControl>
|
||||
</dd:ItemsContainer>
|
||||
</Grid>
|
||||
</dd:BlockBorder>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSelected}" Value="true">
|
||||
<Setter TargetName="left" Property="Background" Value="#3399FF"/>
|
||||
|
||||
@@ -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