From 5935564927019cff140575b4944619c46c3b51fb Mon Sep 17 00:00:00 2001
From: zengwenjie <1663900244@qq.com>
Date: Tue, 16 Sep 2025 11:55:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84IActionViewer=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E7=9A=84=E5=B1=9E=E6=80=A7=E5=A3=B0=E6=98=8E(?=
=?UTF-8?q?=E6=9A=82=E6=97=B6=E6=9C=AA=E5=AE=9E=E7=8E=B0=E5=85=B7=E4=BD=93?=
=?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8E=E9=80=BB=E8=BE=91)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DeedyDesigner/Deedy.Activity/ActionViewer.cs | 76 +++++++++++++++++--
.../Collection/LogInfoCollection.cs | 13 ++++
.../Collection/OutputCollection.cs | 13 ++++
.../Contract/Entities/{Info.cs => LogInfo.cs} | 4 +-
.../Enums/{ViewState.cs => ViewerState.cs} | 2 +-
.../Deedy.Activity/Contract/Output.cs | 4 +-
DeedyDesigner/Deedy.Activity/IActionViewer.cs | 32 +++++++-
7 files changed, 134 insertions(+), 10 deletions(-)
create mode 100644 DeedyDesigner/Deedy.Activity/Collection/LogInfoCollection.cs
create mode 100644 DeedyDesigner/Deedy.Activity/Collection/OutputCollection.cs
rename DeedyDesigner/Deedy.Activity/Contract/Entities/{Info.cs => LogInfo.cs} (65%)
rename DeedyDesigner/Deedy.Activity/Contract/Enums/{ViewState.cs => ViewerState.cs} (95%)
diff --git a/DeedyDesigner/Deedy.Activity/ActionViewer.cs b/DeedyDesigner/Deedy.Activity/ActionViewer.cs
index 4e690d7..d3595f2 100644
--- a/DeedyDesigner/Deedy.Activity/ActionViewer.cs
+++ b/DeedyDesigner/Deedy.Activity/ActionViewer.cs
@@ -86,20 +86,70 @@ namespace Deedy.Activity
field = value;
OnPropertyChanged(propertyName);
return true;
- }
+ }
- [AllowNull, DefaultValue(null)]
+ public Runtime Runtime => throw new NotImplementedException();
+
+ public Visibility ShowBreakHandle => throw new NotImplementedException();
+
+ public Visibility ShowContinueHandle => throw new NotImplementedException();
+
+ public Visibility ShowExitHandle => throw new NotImplementedException();
+
+ public Visibility ShowReturnHandle => throw new NotImplementedException();
+
+ public Visibility ShowCustomHandle => throw new NotImplementedException();
+
+ public Visibility ShowHeader => throw new NotImplementedException();
+
+ public Visibility ShowFooter => throw new NotImplementedException();
+
+ public Visibility ShowInfoHandle => throw new NotImplementedException();
+
+ public Visibility ShowDeleteHandle => throw new NotImplementedException();
+
+ public Visibility ShowLeftExitline => throw new NotImplementedException();
+
+ public Visibility ShowRightExitline => throw new NotImplementedException();
+ public LogInfo InstantInfo => throw new NotImplementedException();
+
+ public LogInfoCollection LogInfos => throw new NotImplementedException();
+
+ public uint ElementCount => throw new NotImplementedException();
+
+ public bool IsSelectable => throw new NotImplementedException();
+
+ public bool IsSelected => throw new NotImplementedException();
+
+ public bool IsCanExpand => throw new NotImplementedException();
+
+ public bool IsExpanded => throw new NotImplementedException();
+
+ public ViewerState ViewerState => throw new NotImplementedException();
+
+ public WorkMode WorkMode => throw new NotImplementedException();
+
+ public Brush FillBrush => throw new NotImplementedException();
+
+ public Brush StrokeBrush => throw new NotImplementedException();
+
+ public double StrokeThickness => throw new NotImplementedException();
+
+ public Thickness MarginCorrection_Top => throw new NotImplementedException();
+
+ public Thickness MarginCorrection_Bottom => throw new NotImplementedException();
+
+ public Thickness MarginCorrection_TopBottom => throw new NotImplementedException();
///
/// 动作节点
///
+ [AllowNull, DefaultValue(null)]
public IActionElement ActionElement
{
get { return (IActionElement)GetValue(ActionElementProperty); }
set { SetValue(ActionElementProperty, value); }
}
- public Runtime Runtime => throw new NotImplementedException();
-
public static readonly DependencyProperty ActionElementProperty =
DependencyProperty.Register("ActionElement", typeof(IActionElement), typeof(ActionViewer), new PropertyMetadata(null,
(d, e) => (d as ActionViewer)?.ActionElement_PropertyChangedCallback(e)));
@@ -108,8 +158,24 @@ namespace Deedy.Activity
///
protected virtual void ActionElement_PropertyChangedCallback(DependencyPropertyChangedEventArgs e)
{
- //
+ if (e.OldValue is IActionElement oldValue)
+ oldValue.PropertyChanged -= ActionElement_PropertyChanged;
+ if (e.NewValue is IActionElement newValue)
+ {
+ newValue.PropertyChanged += ActionElement_PropertyChanged;
+ //TODO:根据节点的特征与当前工作状态来判定如何处理当前视图的属性
+ }
}
+
+ private void ActionElement_PropertyChanged(object? sender, PropertyChangedEventArgs e)
+ {
+ switch (e.PropertyName)
+ {
+ //TODO:处理托管的IActionElement节点的属性变更
+ default: break;
+ }
+ }
+
public void ReadyToWorking(IElement? element = null, Output? output = null)
{
throw new NotImplementedException();
diff --git a/DeedyDesigner/Deedy.Activity/Collection/LogInfoCollection.cs b/DeedyDesigner/Deedy.Activity/Collection/LogInfoCollection.cs
new file mode 100644
index 0000000..600da22
--- /dev/null
+++ b/DeedyDesigner/Deedy.Activity/Collection/LogInfoCollection.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Deedy.Activity
+{
+ public class LogInfoCollection : ObservableCollection
+ {
+ }
+}
diff --git a/DeedyDesigner/Deedy.Activity/Collection/OutputCollection.cs b/DeedyDesigner/Deedy.Activity/Collection/OutputCollection.cs
new file mode 100644
index 0000000..d621491
--- /dev/null
+++ b/DeedyDesigner/Deedy.Activity/Collection/OutputCollection.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Deedy.Activity
+{
+ public class OutputCollection : ObservableCollection