准备将逻辑树变更方法迁移到可变容器元素中
This commit is contained in:
@@ -92,18 +92,21 @@ namespace Deedy.Activity
|
||||
/// <summary>
|
||||
/// 动作节点
|
||||
/// </summary>
|
||||
public IActionElement DeedyAction
|
||||
public IActionElement ActionElement
|
||||
{
|
||||
get { return (IActionElement)GetValue(DeedyActionProperty); }
|
||||
set { SetValue(DeedyActionProperty, value); }
|
||||
get { return (IActionElement)GetValue(ActionElementProperty); }
|
||||
set { SetValue(ActionElementProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty DeedyActionProperty =
|
||||
DependencyProperty.Register("DeedyAction", typeof(IActionElement), typeof(ActionViewer), new PropertyMetadata(null,
|
||||
(d, e) => (d as ActionViewer)?.DeedyAction_PropertyChangedCallback(e)));
|
||||
|
||||
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)));
|
||||
/// <summary>
|
||||
/// 处理「DeedyActionViewer.DeedyAction」属性变更
|
||||
/// 处理「ActionElementViewer.ActionElement」属性变更
|
||||
/// </summary>
|
||||
protected virtual void DeedyAction_PropertyChangedCallback(DependencyPropertyChangedEventArgs e)
|
||||
protected virtual void ActionElement_PropertyChangedCallback(DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -111,5 +114,15 @@ namespace Deedy.Activity
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToEditing(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToRunning(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Deedy.Activity
|
||||
|
||||
public IElement RootElement => (this.ParentElement == null) ? this : this.ParentElement.RootElement;
|
||||
|
||||
public Runtime Runtime => throw new NotImplementedException();
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
@@ -74,5 +76,15 @@ namespace Deedy.Activity
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToEditing(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToRunning(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Deedy.Activity
|
||||
{
|
||||
public interface IContainerElement : ICombinedElement
|
||||
{
|
||||
public void Append(IElement deedyElement);
|
||||
public void Remove(IElement deedyElement);
|
||||
public void Append(IElement element);
|
||||
public void Remove(IElement element);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Deedy.Activity
|
||||
{
|
||||
public abstract class AtomicityStep : FlowAction
|
||||
public abstract class AtomicityLogical : FlowAction
|
||||
{
|
||||
public AtomicityStep() { }
|
||||
public AtomicityLogical() { }
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Deedy.Activity
|
||||
{
|
||||
public abstract class CombinedNode : FlowAction, ICombinedElement
|
||||
public abstract class CombinedLogical : FlowAction, ICombinedElement
|
||||
{
|
||||
public CombinedNode() { }
|
||||
public CombinedLogical() { }
|
||||
|
||||
public DeedyElementCollection Elements { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
}
|
||||
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Deedy.Activity
|
||||
{
|
||||
public abstract class ContainerBlock : FlowAction, IContainerElement
|
||||
public abstract class ContainerLogical : FlowAction, IContainerElement
|
||||
{
|
||||
public ContainerBlock() { }
|
||||
public ContainerLogical() { }
|
||||
|
||||
public DeedyElementCollection Elements { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
@@ -48,5 +48,14 @@ namespace Deedy.Activity
|
||||
if (typeof(TValue).IsInstanceOfType(value)) return (TValue?)value;
|
||||
throw new Exception("对象上指定属性的当前值不是期望类型的有效实例...");
|
||||
}
|
||||
/// <summary>
|
||||
/// 帮助一个IElement节点构建参数映射表
|
||||
/// </summary>
|
||||
/// <param name="element">需要构建参数映射表的Element节点</param>
|
||||
/// <param name="output">消息输出器</param>
|
||||
internal static void BuildParamMapping(this IElement element, Output? output = null)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Deedy.Activity
|
||||
|
||||
public DeedyElementCollection Elements { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public Runtime Runtime => throw new NotImplementedException();
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
@@ -86,5 +88,15 @@ namespace Deedy.Activity
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToEditing(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReadyToRunning(Runtime runtime)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,6 @@ namespace Deedy.Activity
|
||||
public interface IActionViewer : IActivity, INotifyPropertyChanged
|
||||
{
|
||||
[AllowNull]
|
||||
public IActionElement DeedyAction { get; set; }
|
||||
public IActionElement ActionElement { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace Deedy.Activity
|
||||
{
|
||||
public interface IActivity
|
||||
{
|
||||
public Runtime Runtime { get; }
|
||||
public void ReadyToWorking(IElement? element = null, Output? output = null);
|
||||
public void ReadyToEditing(Runtime runtime);
|
||||
public void ReadyToRunning(Runtime runtime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace Deedy.Activity
|
||||
/// <param name="parent"></param>
|
||||
public new void ReadyToWorking(IElement? element = null, Output? output = null)
|
||||
{
|
||||
//TODO:刷新参数映射
|
||||
this.BuildParamMapping(output);
|
||||
|
||||
this.LinkTo(element);
|
||||
if (this is IContainerElement container)
|
||||
foreach (IElement subElement in container.Elements)
|
||||
|
||||
Reference in New Issue
Block a user