diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/DropPlacement.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/DropPlacement.cs new file mode 100644 index 0000000..4f0bd65 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/DropPlacement.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 放置位置 + /// + public enum DropPlacement : int + { + /// + /// 不确定的 + /// + Uncertain=0, + /// + /// 拒绝放置 + /// + Rejected = 0, + /// + /// 在节点前 + /// + BeforeMe = 1, + /// + /// 在节点内 + /// + WithinMe = 2, + /// + /// 在节点后 + /// + BehindMe = 3, + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/ExitlinePosition.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/ExitlinePosition.cs new file mode 100644 index 0000000..9f3fc1c --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/ExitlinePosition.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 退出线位置(如果需要回归线则放置到相反方向) + /// + public enum ExitlinePosition : int + { + /// + /// 无退出线:没有退出线,一般用于跳转逻辑节点 + /// + NoneLine = 0, + /// + /// 左下框线:自左侧画竖线向下后转右从中间退出 + /// + LeftLower = 1, + /// + /// 右下框线:自右侧画竖线向下后转左从中间退出 + /// + Rightlower = 2, + /// + /// 中间竖线:内容节点底部中间直接向下划线退出 + /// + Centerline = 3, + /// + /// 下方直线:沿左下角向右下角画完整的直线退出 + /// + Underline = 4 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/InfoType.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/InfoType.cs new file mode 100644 index 0000000..3891556 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/InfoType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public enum InfoType : int + { + None = 0, + Info = 1, + Warn = 2, + Error = 3 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/LogicalBehavior.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/LogicalBehavior.cs new file mode 100644 index 0000000..3dbb51b --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/LogicalBehavior.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 逻辑控制行为的与定义选项 + /// + public enum LogicalBehavior + { + /// + /// 不做控制 + /// + NoControl=0, + /// + /// 自定义逻辑:不受运行时预置逻辑控制 + /// + Customize = 1, + /// + /// 迭代跳出 + /// + Break = 2, + /// + /// 迭代重入 + /// + Continue = 3, + /// + /// 流程返回 + /// + Return = 4, + /// + /// 程序退出 + /// + Exit = 5 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamEditMode.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamEditMode.cs new file mode 100644 index 0000000..aa5ef68 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamEditMode.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 参数支持的编辑模式 + /// + [Flags] + public enum ParamEditMode : int + { + /// + /// 不允许编辑 + /// + None = 0, + /// + /// 从待选列表中选择 + /// + Choice = 1, + /// + /// 允许自由编辑 + /// + Edit = 2, + /// + /// 允许使用引用参数 + /// + Link = 4, + /// + /// 允许弹出式编辑 + /// + Popup = 8, + /// + /// 使用自定义编辑器 + /// + Editor=16, + /// + /// 允许所有可支持的编辑模式 + /// + All = 0xFF + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamType.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamType.cs new file mode 100644 index 0000000..b986d34 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/ParamType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public enum ParamType : int + { + Unknow = 0, + Char = 1, Byte = 2, + Int16 = 3, UInt16 = 4, + Int32 = 5, UInt32 = 6, + Int64 = 7, UInt64 = 8, + Half = 9, Float = 10, Double = 11, + String = 12, ByteArray = 13, IntArray = 14, DoubleArray = 15, + Condition = 16, Channel = 17, SyncSignal = 18, + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/ReturnCode.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/ReturnCode.cs new file mode 100644 index 0000000..5942bdd --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/ReturnCode.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 执行结果代码 + /// + public enum ReturnCode : int + { + /// + /// 执行成功:且执行结果满足期望 + /// + Success = 0, + /// + /// 执行成功:但执行结果不满足期望 + /// + Exception‌ = 1, + /// + /// 局部异常:当前逻辑发生异常;要求终止当前块操作,但允许后续的逻辑块继续执行。 + /// + Crash = 2, + /// + /// 局部异常:当前逻辑发生异常,无法正确执行,但不会引起整体的执行。 + /// + Panic = 3, + /// + /// 致命错误:执行过程中产生致命错误,要求运行时退出执行;例如执行过程中发现设备过热,不能继续执行。 + /// + Fatal = 4, + /// + /// 系统退出:通过人工交互要求正在执行的逻辑退出。 + /// + Breakdown = 5 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/RunningState.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/RunningState.cs new file mode 100644 index 0000000..8e05a40 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/RunningState.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + /// + /// 运行状态:用于多个线程之间的状态同步 + /// + public enum RunningState : int + { + /// + /// 等待中:系统不在运行状态 + /// + Waiting = 0, + /// + /// 运行中:所有指令都可以运行 + /// + Running = 1, + /// + /// 暂停中:暂停所有逻辑的执行 + /// + Pausing = 2, + /// + /// 停止中:正在停止,准备退出 + /// + Stoping = 3 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/ViewState.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/ViewState.cs new file mode 100644 index 0000000..a4e7ede --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/ViewState.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public enum ViewState : int + { + /// + /// 正常状态 + /// + Normal = 0, + /// + /// 选中状态 + /// + Selected = 1, + /// + /// 鼠标悬停 + /// + NormalHover = 2, + /// + /// 鼠标悬停在选中项上 + /// + SelectedHover = 3, + /// + /// 拖拽到正常状态项上 + /// + NormalDragHover = 4, + /// + /// 拖拽到选中状态项上 + /// + SelectedDragHover = 5, + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Enums/WorkMode.cs b/DeedyDesigner/Deedy.Activity/Contract/Enums/WorkMode.cs new file mode 100644 index 0000000..13f4edb --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Enums/WorkMode.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public enum WorkMode : int + { + /// + /// 等待:后台耗时工作进行时的状态,此状态禁用所有交互 + /// + Waiting = 0, + /// + /// 回显:用于持续回显数据的状态,此状态下禁用编辑功能,所有后台信息会被显示,包括过程信息 + /// + Echoing = 1, + /// + /// 预览:用于浏览,只有鼠标悬停或选中时才会显示属性信息,但不会显示过程数据等其它信息 + /// + Preview = 2, + /// + /// 编辑:编辑状态 + /// + Editing = 3, + /// + /// 运行:运行状态 + /// + Running = 4 + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Interface/IJumpableUnit.cs b/DeedyDesigner/Deedy.Activity/Contract/Interface/IJumpableUnit.cs new file mode 100644 index 0000000..31e506c --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Interface/IJumpableUnit.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public interface IJumpableUnit : INOPRunable + { + bool IsBreaking { get; set; } + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Interface/ILogicController.cs b/DeedyDesigner/Deedy.Activity/Contract/Interface/ILogicController.cs new file mode 100644 index 0000000..ae45644 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Interface/ILogicController.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + internal interface ILogicController + { + public LogicalBehavior LogicalBehavior { get; } + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Interface/INOPRunable.cs b/DeedyDesigner/Deedy.Activity/Contract/Interface/INOPRunable.cs new file mode 100644 index 0000000..4bc9bc3 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Interface/INOPRunable.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public interface INOPRunable + { + bool IsNOPRunning { get; set; } + } +} diff --git a/DeedyDesigner/Deedy.Activity/Contract/Interface/IReentrantUnit.cs b/DeedyDesigner/Deedy.Activity/Contract/Interface/IReentrantUnit.cs new file mode 100644 index 0000000..4e02aa1 --- /dev/null +++ b/DeedyDesigner/Deedy.Activity/Contract/Interface/IReentrantUnit.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Deedy.Activity +{ + public interface IReentrantUnit : IJumpableUnit + { + public bool IsReentering { get; set; } + } +}