mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-10 03:30:50 +08:00
demo提交
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
using AIStudio.Wpf.DiagramDesigner.Services;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class DefaultDesignerItemViewModel : DesignerItemViewModelBase
|
||||
{
|
||||
public DefaultDesignerItemViewModel() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DefaultDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DefaultDesignerItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override SelectableItemBase GetSerializableObject()
|
||||
{
|
||||
return new DesignerItemBase(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
AddItemCommand = new SimpleCommand(ExecuteAddItemCommand);
|
||||
ImageSwitchCommand = new SimpleCommand(ExecuteImageSwitchCommand);
|
||||
AddItemCommand = new SimpleCommand(Command_Enable, ExecuteAddItemCommand);
|
||||
ImageSwitchCommand = new SimpleCommand(Command_Enable, ExecuteImageSwitchCommand);
|
||||
|
||||
base.Init();
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(ExecuteMenuItemCommand));
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
ShowRotate = false;
|
||||
ShowArrow = false;
|
||||
AddInputCommand = new SimpleCommand(para => ExecuteAddInput(para));
|
||||
AddOutputCommand = new SimpleCommand(para => ExecuteAddOutput(para));
|
||||
AddInputCommand = new SimpleCommand(Command_Enable, para => ExecuteAddInput(para));
|
||||
AddOutputCommand = new SimpleCommand(Command_Enable, para => ExecuteAddOutput(para));
|
||||
|
||||
base.Init();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(ExecuteMenuItemCommand));
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
MenuItemCommand = new SimpleCommand(ExecuteMenuItemCommand);
|
||||
MenuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand);
|
||||
base.Init();
|
||||
|
||||
this.ClearConnectors();
|
||||
|
||||
Reference in New Issue
Block a user