mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-01 14:46:36 +08:00
修改内部使用方法,不需要使用页面绑定的命令
This commit is contained in:
@@ -524,7 +524,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
public void AddImageExecuted(object para)
|
||||
{
|
||||
ImageItemViewModel itemBase = new ImageItemViewModel();
|
||||
DiagramViewModel?.DirectAddItemCommand.Execute(itemBase);
|
||||
DiagramViewModel?.AddItemCommand.Execute(itemBase);
|
||||
if (itemBase.Root != null)
|
||||
{
|
||||
_service.DrawModeViewModel.CursorMode = CursorMode.Move;
|
||||
@@ -561,7 +561,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
public void AddVideoExecuted(object para)
|
||||
{
|
||||
VideoItemViewModel itemBase = new VideoItemViewModel();
|
||||
DiagramViewModel?.DirectAddItemCommand.Execute(itemBase);
|
||||
DiagramViewModel?.AddItemCommand.Execute(itemBase);
|
||||
if (itemBase.Root != null)
|
||||
{
|
||||
_service.DrawModeViewModel.CursorMode = CursorMode.Move;
|
||||
@@ -571,7 +571,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
public void AddOutLineTextExecuted(object para)
|
||||
{
|
||||
OutLineTextDesignerItemViewModel itemBase = new OutLineTextDesignerItemViewModel();
|
||||
DiagramViewModel?.DirectAddItemCommand.Execute(itemBase);
|
||||
DiagramViewModel?.AddItemCommand.Execute(itemBase);
|
||||
if (itemBase.Root != null)
|
||||
{
|
||||
_service.DrawModeViewModel.CursorMode = CursorMode.Move;
|
||||
@@ -581,7 +581,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
public void AddBarcodeExecuted(object para)
|
||||
{
|
||||
BarcodeDesignerItemViewModel itemBase = new BarcodeDesignerItemViewModel() { Format = (BarcodeFormat)Enum.Parse(typeof(BarcodeFormat), para.ToString()), Text="AIStudio.Wpf.DiagramApp" };
|
||||
DiagramViewModel?.DirectAddItemCommand.Execute(itemBase);
|
||||
DiagramViewModel?.AddItemCommand.Execute(itemBase);
|
||||
if (itemBase.Root != null)
|
||||
{
|
||||
_service.DrawModeViewModel.CursorMode = CursorMode.Move;
|
||||
|
||||
Reference in New Issue
Block a user