This commit is contained in:
kwai
2023-06-16 19:20:44 +08:00
parent 56c3aac8e8
commit bdf7385a39
3 changed files with 62 additions and 3 deletions

View File

@@ -813,6 +813,42 @@ namespace AIStudio.Wpf.DiagramDesigner
return this._replaceAllCommand ?? (this._replaceAllCommand = new SimpleCommand(ExecuteEnable, this.ExecutedSearchReplaceAllCommand)); return this._replaceAllCommand ?? (this._replaceAllCommand = new SimpleCommand(ExecuteEnable, this.ExecutedSearchReplaceAllCommand));
} }
} }
private ICommand _addNextCommand;
public ICommand AddNextCommand
{
get
{
return this._addNextCommand ?? (this._addNextCommand = new SimpleCommand(ExecuteEnable, this.ExecutedAddNextCommand));
}
}
private ICommand _removeNextCommand;
public ICommand RemoveNextCommand
{
get
{
return this._removeNextCommand ?? (this._removeNextCommand = new SimpleCommand(ExecuteEnable, this.ExecutedRemoveNextCommand));
}
}
private ICommand _addChildCommand;
public ICommand AddChildCommand
{
get
{
return this._addChildCommand ?? (this._addChildCommand = new SimpleCommand(ExecuteEnable, this.ExecutedAddChildCommand));
}
}
private ICommand _removeChildCommand;
public ICommand RemoveChildCommand
{
get
{
return this._removeChildCommand ?? (this._removeChildCommand = new SimpleCommand(ExecuteEnable, this.ExecutedRemoveChildCommand));
}
}
#endregion #endregion
#region ctor和初始化 #region ctor和初始化
@@ -1520,6 +1556,30 @@ namespace AIStudio.Wpf.DiagramDesigner
} }
#endregion #endregion
#region Block使用
private void ExecutedAddNextCommand(object parameter)
{
if (parameter is Tuple<BlockDesignerItemViewModel, BlockDesignerItemViewModel> blockTuple)
{
}
}
private void ExecutedRemoveNextCommand(object parameter)
{
}
private void ExecutedAddChildCommand(object parameter)
{
}
private void ExecutedRemoveChildCommand(object parameter)
{
}
#endregion
#region #region
private void ExecuteAlignTopCommand(object parameter) private void ExecuteAlignTopCommand(object parameter)
{ {

View File

@@ -129,8 +129,7 @@ namespace AIStudio.Wpf.DiagramDesigner
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => { System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10); await Task.Delay(10);
AlignNext(this.Next); AlignNext(this.Next);
})); }));
} }
public virtual void RemoveChild(BlockDesignerItemViewModel child) public virtual void RemoveChild(BlockDesignerItemViewModel child)

View File

@@ -125,7 +125,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
} }
private ICommand _addChildCommand; private ICommand _addChildCommand;
public ICommand AddChildCommand public new ICommand AddChildCommand
{ {
get get
{ {