mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-02 14:01:29 +08:00
bug修复
This commit is contained in:
@@ -17,7 +17,7 @@ namespace AIStudio.Wpf.Flowchart
|
|||||||
{
|
{
|
||||||
public FlowchartViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType)
|
public FlowchartViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType)
|
||||||
{
|
{
|
||||||
Init(true);
|
|
||||||
}
|
}
|
||||||
public FlowchartViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
public FlowchartViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AIStudio.Wpf.Logical
|
|||||||
{
|
{
|
||||||
public LogicalViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType)
|
public LogicalViewModel(string title, string status, DiagramType diagramType) : base(title, status, diagramType)
|
||||||
{
|
{
|
||||||
Init(true);
|
|
||||||
}
|
}
|
||||||
public LogicalViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
public LogicalViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -741,10 +741,10 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
|||||||
|
|
||||||
public bool KeyExecuted(KeyEventArgs e)
|
public bool KeyExecuted(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (PageViewModel?.DiagramViewModel?.ExecuteShortcut(e) == true)
|
//if (PageViewModel?.DiagramViewModel?.ExecuteShortcut(e) == true)
|
||||||
{
|
//{
|
||||||
return true;
|
// return true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
var para = e.KeyboardDevice.Modifiers == ModifierKeys.None ? e.Key.ToString() : e.KeyboardDevice.Modifiers.ToString() + "+" + e.Key.ToString();
|
var para = e.KeyboardDevice.Modifiers == ModifierKeys.None ? e.Key.ToString() : e.KeyboardDevice.Modifiers.ToString() + "+" + e.Key.ToString();
|
||||||
bool executed = true;
|
bool executed = true;
|
||||||
|
|||||||
@@ -20,10 +20,9 @@ namespace AIStudio.Wpf.Flowchart
|
|||||||
{
|
{
|
||||||
public class MindViewModel : PageViewModel
|
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)
|
public MindViewModel(string filename, DiagramDocument diagramDocument) : base(filename, diagramDocument)
|
||||||
{
|
{
|
||||||
@@ -34,7 +33,7 @@ namespace AIStudio.Wpf.Flowchart
|
|||||||
|
|
||||||
if (MindDiagramViewModel != null)
|
if (MindDiagramViewModel != null)
|
||||||
{
|
{
|
||||||
MindType = MindDiagramViewModel.MindType;
|
SubType = MindDiagramViewModel.MindType.ToString();
|
||||||
MindTheme = MindDiagramViewModel.MindTheme;
|
MindTheme = MindDiagramViewModel.MindTheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +57,10 @@ namespace AIStudio.Wpf.Flowchart
|
|||||||
|
|
||||||
public MindType MindType
|
public MindType MindType
|
||||||
{
|
{
|
||||||
get;
|
get
|
||||||
|
{
|
||||||
|
return SubType.ToEnum<MindType>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MindTheme MindTheme
|
public MindTheme MindTheme
|
||||||
|
|||||||
@@ -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;
|
Title = title;
|
||||||
Status = status;
|
Status = status;
|
||||||
DiagramType = diagramType;
|
DiagramType = diagramType;
|
||||||
|
SubType = subType;
|
||||||
|
Init(true);
|
||||||
}
|
}
|
||||||
public PageViewModel(string filename)
|
public PageViewModel(string filename)
|
||||||
{
|
{
|
||||||
@@ -127,6 +129,11 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string SubType
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
private ObservableCollection<IDiagramViewModel> _diagramViewModels;
|
private ObservableCollection<IDiagramViewModel> _diagramViewModels;
|
||||||
public ObservableCollection<IDiagramViewModel> DiagramViewModels
|
public ObservableCollection<IDiagramViewModel> DiagramViewModels
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
|||||||
|
|
||||||
foreach (DesignerItemViewModelBase item in designerItems.OfType<DesignerItemViewModelBase>())
|
foreach (DesignerItemViewModelBase item in designerItems.OfType<DesignerItemViewModelBase>())
|
||||||
{
|
{
|
||||||
if (item != null && item.ParentId == Guid.Empty)
|
if (item != null)
|
||||||
{
|
{
|
||||||
switch (base.VerticalAlignment)
|
switch (base.VerticalAlignment)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Image x:Name="image" Margin="5" Stretch="Fill" Width="128" Height="128"
|
<Image x:Name="image" Margin="5,10,5,5" Stretch="Fill" Width="128" Height="128"
|
||||||
Visibility="{Binding ImageInfo,Converter={StaticResource NullableToVisibilityConverter}}"
|
Visibility="{Binding ImageInfo,Converter={StaticResource NullableToVisibilityConverter}}"
|
||||||
ToolTip="{Binding ImageInfo.Text}"
|
ToolTip="{Binding ImageInfo.Text}"
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user