mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
mind
This commit is contained in:
@@ -12,6 +12,7 @@ using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
using AIStudio.Wpf.Mind;
|
||||
using AIStudio.Wpf.DiagramDesigner.Additionals;
|
||||
|
||||
namespace AIStudio.Wpf.Flowchart
|
||||
{
|
||||
@@ -22,8 +23,11 @@ namespace AIStudio.Wpf.Flowchart
|
||||
|
||||
}
|
||||
public MindViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
||||
{
|
||||
|
||||
{
|
||||
foreach (var vm in DiagramViewModels)
|
||||
{
|
||||
vm.InitLayoutCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitDiagramViewModel()
|
||||
@@ -47,7 +51,7 @@ namespace AIStudio.Wpf.Flowchart
|
||||
{
|
||||
DiagramViewModels = new ObservableCollection<IDiagramViewModel>()
|
||||
{
|
||||
new MindDiagramViewModel(){Name= "页-1", DiagramType = DiagramType},
|
||||
GetDiagramViewModel("页-1", DiagramType),
|
||||
};
|
||||
DiagramViewModel = DiagramViewModels.FirstOrDefault();
|
||||
|
||||
@@ -77,6 +81,10 @@ namespace AIStudio.Wpf.Flowchart
|
||||
level1node.LayoutUpdated();
|
||||
}
|
||||
|
||||
protected override DiagramViewModel GetDiagramViewModel(string name, DiagramType diagramType)
|
||||
{
|
||||
return new MindDiagramViewModel() { Name = name ?? NewNameHelper.GetNewName(DiagramViewModels.Select(p => p.Name), "页-"), DiagramType = diagramType };
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user