mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-02 15:50:51 +08:00
修改连线添加条件判断逻辑
This commit is contained in:
@@ -6,17 +6,12 @@ using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Xml.Serialization;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
@@ -818,7 +813,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
BuildMenuOptions();
|
||||
}
|
||||
|
||||
public void Init(DiagramItem diagramItem)
|
||||
public void Init(DiagramItem diagramItem)
|
||||
{
|
||||
DiagramType = diagramItem.DiagramType;
|
||||
DiagramOption.LayoutOption.ShowGrid = diagramItem.ShowGrid;
|
||||
@@ -1061,7 +1056,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public virtual bool Next()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteSelectAllCommand(object parameter)
|
||||
{
|
||||
@@ -1199,7 +1194,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else if (parameter is IEnumerable<SelectableDesignerItemViewModelBase> items)
|
||||
{
|
||||
if (items.Select(p => AddVerify(p)).ToList().Any() != true) return;
|
||||
//如果有条件不满足的不允许添加
|
||||
if (items.Select(p => AddVerify(p)).ToList().Any(p => !p)) return;
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user