mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
xx
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Xml.Linq;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
@@ -75,7 +76,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
var layout = GlobalType.AllTypes.Where(p => typeof(IMindLayout).IsAssignableFrom(p)).FirstOrDefault(p => p.Name == MindType.ToString() + "Layout");
|
||||
MindLayout = layout != null ? (System.Activator.CreateInstance(layout) as IMindLayout) : new MindLayout();
|
||||
|
||||
IsInnerConnector = true;
|
||||
IsInnerConnector = true;
|
||||
MindLayout.Appearance(this, MindThemeModel, initAppearance);
|
||||
|
||||
this.PropertyChanged -= this.Item_PropertyChanged;
|
||||
@@ -139,7 +140,14 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
{
|
||||
return Parent as MindNode;
|
||||
}
|
||||
}
|
||||
|
||||
public MindNode RootNode
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetLevel1Node();
|
||||
}
|
||||
}
|
||||
|
||||
public int NodeLevel
|
||||
@@ -346,7 +354,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
if (_tags != null)
|
||||
{
|
||||
_tags.CollectionChanged += _tags_CollectionChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,32 +381,32 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
#endregion
|
||||
|
||||
#region 命令
|
||||
public SimpleCommand AddParentCommand
|
||||
public ICommand AddParentCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand AddChildCommand
|
||||
public ICommand AddChildCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand AddPearCommand
|
||||
public ICommand AddPearCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand DeleteCommand
|
||||
public ICommand DeleteCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand MoveForwardCommand
|
||||
public ICommand MoveForwardCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleCommand MoveBackCommand
|
||||
public ICommand MoveBackCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
@@ -490,9 +498,10 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
public void InitConnectLayout()
|
||||
{
|
||||
var connector = Root?.Items.OfType<ConnectionViewModel>().Where(p => p.IsFullConnection).FirstOrDefault(p => p.SinkConnectorInfoFully.DataItem == this);
|
||||
if (connector != null)
|
||||
var newconnecter = MindLayout?.GetOrSetConnectionViewModel(connector.SourceConnectorInfo.DataItem as MindNode, connector.SinkConnectorInfoFully.DataItem as MindNode, connector);
|
||||
if (connector == null)
|
||||
{
|
||||
MindLayout?.GetOrSetConnectionViewModel(connector.SourceConnectorInfo.DataItem as MindNode, connector.SinkConnectorInfoFully.DataItem as MindNode, connector);
|
||||
Root?.DirectAddItemCommand.Execute(new SelectableDesignerItemViewModelBase[] { newconnecter });
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -541,7 +550,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
break;
|
||||
}
|
||||
case nameof(Rate):
|
||||
case nameof(Priority):
|
||||
case nameof(Priority):
|
||||
case nameof(Remark):
|
||||
case nameof(LinkInfo.Link):
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user