diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/FlowchartViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/FlowchartViewModel.cs index 1f784bf..2be4cd4 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/FlowchartViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/FlowchartViewModel.cs @@ -17,7 +17,7 @@ namespace AIStudio.Wpf.Flowchart { public FlowchartViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType) { - Init(true); + } public FlowchartViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument) { diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/LogicalViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/LogicalViewModel.cs index b9a4c26..2a73ce5 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/LogicalViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/LogicalViewModel.cs @@ -13,7 +13,7 @@ namespace AIStudio.Wpf.Logical { public LogicalViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType) { - Init(true); + } public LogicalViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument) { diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/MainWindowViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/MainWindowViewModel.cs index f57a13e..8a6404d 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/MainWindowViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/MainWindowViewModel.cs @@ -741,10 +741,10 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels public bool KeyExecuted(KeyEventArgs e) { - if (PageViewModel?.DiagramViewModel?.ExecuteShortcut(e) == true) - { - return true; - } + //if (PageViewModel?.DiagramViewModel?.ExecuteShortcut(e) == true) + //{ + // return true; + //} var para = e.KeyboardDevice.Modifiers == ModifierKeys.None ? e.Key.ToString() : e.KeyboardDevice.Modifiers.ToString() + "+" + e.Key.ToString(); bool executed = true; diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/MindViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/MindViewModel.cs index ef27dd0..3a462a8 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/MindViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/MindViewModel.cs @@ -20,10 +20,9 @@ namespace AIStudio.Wpf.Flowchart { public class MindViewModel : PageViewModel { - public MindViewModel(string title, string status, DiagramType diagramType, MindType mindType) : base(title, status, diagramType) + public MindViewModel(string title, string status, DiagramType diagramType, MindType mindType) : base(title, status, diagramType, mindType.ToString()) { - MindType = mindType; - Init(true); + } public MindViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument) { @@ -34,7 +33,7 @@ namespace AIStudio.Wpf.Flowchart if (MindDiagramViewModel != null) { - MindType = MindDiagramViewModel.MindType; + SubType = MindDiagramViewModel.MindType.ToString(); MindTheme = MindDiagramViewModel.MindTheme; } } @@ -58,7 +57,10 @@ namespace AIStudio.Wpf.Flowchart public MindType MindType { - get; + get + { + return SubType.ToEnum(); + } } public MindTheme MindTheme diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/PageViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/PageViewModel.cs index 8375d57..09d686a 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/PageViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/PageViewModel.cs @@ -33,11 +33,13 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels } } - public PageViewModel(string title, string status, DiagramType diagramType) + public PageViewModel(string title, string status, DiagramType diagramType, string subType = null) { Title = title; Status = status; DiagramType = diagramType; + SubType = subType; + Init(true); } public PageViewModel(string filename) { @@ -127,6 +129,11 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels get; set; } + public string SubType + { + get; set; + } + private ObservableCollection _diagramViewModels; public ObservableCollection DiagramViewModels { diff --git a/AIStudio.Wpf.DiagramDesigner/Controls/ResizeThumb.cs b/AIStudio.Wpf.DiagramDesigner/Controls/ResizeThumb.cs index c67a9f8..d187a11 100644 --- a/AIStudio.Wpf.DiagramDesigner/Controls/ResizeThumb.cs +++ b/AIStudio.Wpf.DiagramDesigner/Controls/ResizeThumb.cs @@ -88,7 +88,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls foreach (DesignerItemViewModelBase item in designerItems.OfType()) { - if (item != null && item.ParentId == Guid.Empty) + if (item != null) { switch (base.VerticalAlignment) { diff --git a/AIStudio.Wpf.Mind/Themes/MindNode.xaml b/AIStudio.Wpf.Mind/Themes/MindNode.xaml index f6fb67e..903a4eb 100644 --- a/AIStudio.Wpf.Mind/Themes/MindNode.xaml +++ b/AIStudio.Wpf.Mind/Themes/MindNode.xaml @@ -69,7 +69,7 @@ -