mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-06 09:40:50 +08:00
继续整理
This commit is contained in:
@@ -340,187 +340,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
{
|
||||
return this._deleteCommand ?? (this._deleteCommand = new CanExecuteDelegateCommand(() => this.DeleteExecuted(), () => Delete_Enabled()));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignTopCommand;
|
||||
public ICommand AlignTopCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignTopCommand ?? (this._alignTopCommand = new DelegateCommand<object>(para => this.AlignTopExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignVerticalCentersCommand;
|
||||
public ICommand AlignVerticalCentersCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignVerticalCentersCommand ?? (this._alignVerticalCentersCommand = new DelegateCommand<object>(para => this.AlignVerticalCentersExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignBottomCommand;
|
||||
public ICommand AlignBottomCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignBottomCommand ?? (this._alignBottomCommand = new DelegateCommand<object>(para => this.AlignBottomExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignLeftCommand;
|
||||
public ICommand AlignLeftCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignLeftCommand ?? (this._alignLeftCommand = new DelegateCommand<object>(para => this.AlignLeftExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignHorizontalCentersCommand;
|
||||
public ICommand AlignHorizontalCentersCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignHorizontalCentersCommand ?? (this._alignHorizontalCentersCommand = new DelegateCommand<object>(para => this.AlignHorizontalCentersExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _alignRightCommand;
|
||||
public ICommand AlignRightCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._alignRightCommand ?? (this._alignRightCommand = new DelegateCommand<object>(para => this.AlignRightExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _groupCommand;
|
||||
public ICommand GroupCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._groupCommand ?? (this._groupCommand = new DelegateCommand<object>(para => this.GroupExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _ungroupCommand;
|
||||
public ICommand UngroupCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ungroupCommand ?? (this._ungroupCommand = new DelegateCommand<object>(para => this.UngroupExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _bringForwardCommand;
|
||||
public ICommand BringForwardCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._bringForwardCommand ?? (this._bringForwardCommand = new DelegateCommand<object>(para => this.BringForwardExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _bringToFrontCommand;
|
||||
public ICommand BringToFrontCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._bringToFrontCommand ?? (this._bringToFrontCommand = new DelegateCommand<object>(para => this.BringToFrontExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sendBackwardCommand;
|
||||
public ICommand SendBackwardCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sendBackwardCommand ?? (this._sendBackwardCommand = new DelegateCommand<object>(para => this.SendBackwardExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sendToBackCommand;
|
||||
public ICommand SendToBackCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sendToBackCommand ?? (this._sendToBackCommand = new DelegateCommand<object>(para => this.SendToBackExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _distributeHorizontalCommand;
|
||||
public ICommand DistributeHorizontalCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._distributeHorizontalCommand ?? (this._distributeHorizontalCommand = new DelegateCommand<object>(para => this.DistributeHorizontalExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _distributeVerticalCommand;
|
||||
public ICommand DistributeVerticalCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._distributeVerticalCommand ?? (this._distributeVerticalCommand = new DelegateCommand<object>(para => this.DistributeVerticalExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _selectAllCommand;
|
||||
public ICommand SelectAllCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._selectAllCommand ?? (this._selectAllCommand = new DelegateCommand<object>(para => this.SelectAllExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _centerCommand;
|
||||
public ICommand CenterCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._centerCommand ?? (this._centerCommand = new DelegateCommand<object>(para => this.CenterMoveExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sameWidthCommand;
|
||||
public ICommand SameWidthCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sameWidthCommand ?? (this._sameWidthCommand = new DelegateCommand<object>(para => this.SameWidthExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sameHeightCommand;
|
||||
public ICommand SameHeightCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sameHeightCommand ?? (this._sameHeightCommand = new DelegateCommand<object>(para => this.SameHeightExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sameSizeCommand;
|
||||
public ICommand SameSizeCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sameSizeCommand ?? (this._sameSizeCommand = new DelegateCommand<object>(para => this.SameSizeExecuted(para)));
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _sameAngleCommand;
|
||||
public ICommand SameAngleCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sameAngleCommand ?? (this._sameAngleCommand = new DelegateCommand<object>(para => this.SameAngleExecuted(para)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _lockCommand;
|
||||
public ICommand LockCommand
|
||||
@@ -956,118 +776,8 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
|
||||
private void ExitExecuted()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void GroupExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.GroupCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void UngroupExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.UngroupCommand.Execute(para);
|
||||
}
|
||||
|
||||
#region 布局
|
||||
private void AlignTopExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignTopCommand.Execute(para);
|
||||
}
|
||||
private void AlignVerticalCentersExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignVerticalCentersCommand.Execute(para);
|
||||
}
|
||||
private void AlignBottomExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignBottomCommand.Execute(para);
|
||||
}
|
||||
private void AlignLeftExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignLeftCommand.Execute(para);
|
||||
}
|
||||
private void AlignHorizontalCentersExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignHorizontalCentersCommand.Execute(para);
|
||||
}
|
||||
private void AlignRightExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.AlignRightCommand.Execute(para);
|
||||
}
|
||||
private void BringForwardExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.BringForwardCommand.Execute(para);
|
||||
}
|
||||
private void BringToFrontExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.BringToFrontCommand.Execute(para);
|
||||
}
|
||||
private void SendBackwardExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SendBackwardCommand.Execute(para);
|
||||
}
|
||||
private void SendToBackExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SendBackwardCommand.Execute(para);
|
||||
}
|
||||
private void DistributeHorizontalExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.DistributeHorizontalCommand.Execute(para);
|
||||
}
|
||||
private void DistributeVerticalExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.DistributeVerticalCommand.Execute(para);
|
||||
}
|
||||
private void SelectAllExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SelectAllCommand.Execute(para);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void CenterMoveExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.CenterMoveCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void LeftMoveExecuted(object para = null)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.LeftMoveCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void RightMoveExecuted(object para = null)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.RightMoveCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void UpMoveExecuted(object para = null)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.UpMoveCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void DownMoveExecuted(object para = null)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.DownMoveCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void SameWidthExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SameWidthCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void SameHeightExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SameHeightCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void SameSizeExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SameSizeCommand.Execute(para);
|
||||
}
|
||||
|
||||
private void SameAngleExecuted(object para)
|
||||
{
|
||||
PageViewModel?.DiagramViewModel?.SameAngleCommand.Execute(para);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LockExecuted(object para)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user