This commit is contained in:
艾竹
2023-06-18 18:43:48 +08:00
parent af1cacc846
commit b946c2df93
4 changed files with 31 additions and 11 deletions

View File

@@ -245,9 +245,33 @@ namespace AIStudio.Wpf.DiagramDesigner
return next;
}
public List<BlockItemsContainerInfo> GetAllContain()
public void AddContainer(BlockItemsContainerInfo container)
{
return Containers.SelectMany(p => p.GetAllContain(p.Children, true)).ToList();
Containers.Add(container);
RaisePropertyChanged(nameof(FirstContainer));
RaisePropertyChanged(nameof(SecondContainer));
RaisePropertyChanged(nameof(ThirdContainer));
}
public void RemoveContainer(BlockItemsContainerInfo container)
{
Containers.Remove(container);
RaisePropertyChanged(nameof(FirstContainer));
RaisePropertyChanged(nameof(SecondContainer));
RaisePropertyChanged(nameof(ThirdContainer));
}
public void ClearContainers()
{
Containers.Clear();
RaisePropertyChanged(nameof(FirstContainer));
RaisePropertyChanged(nameof(SecondContainer));
RaisePropertyChanged(nameof(ThirdContainer));
}
public List<BlockItemsContainerInfo> GetAllContainers()
{
return Containers.SelectMany(p => p.GetAllContainers(p.Children, true)).ToList();
}
public BlockDesignerItemViewModel GetRootContainItem