using System.Collections.Generic; using System.ComponentModel; using System.Windows; using AIStudio.Wpf.DiagramDesigner; using AIStudio.Wpf.DiagramDesigner.Controls; namespace AIStudio.Wpf.Flowchart.ViewModels { public class MiddleFlowNode : FlowNode { public MiddleFlowNode() : base(NodeKinds.Middle) { } public MiddleFlowNode(IDiagramViewModel parent, DesignerItemBase designer) : base(parent, designer) { } public MiddleFlowNode(IDiagramViewModel parent, string json) : base(parent, json) { } private List _userIds = new List(); [Browsable(true)] [StyleName("UserIdsStyle")] public List UserIds { get { return _userIds; } set { SetProperty(ref _userIds, value); } } private List _roleIds = new List(); [Browsable(true)] [StyleName("RoleIdsStyle")] public List RoleIds { get { return _roleIds; } set { SetProperty(ref _roleIds, value); } } private string _actType; [Browsable(true)] [StyleName("ActTypeStyle")] public string ActType { get { return _actType; } set { SetProperty(ref _actType, value); } } protected override void ExecuteEditCommand(object param) { if (IsReadOnly == true) return; if (Status == 1) { MiddleFlowNodeData data = new MiddleFlowNodeData(); if (visualiserService.ShowDialog(data) == true) { FlowchartService.Approve(this, data.Status, data.Remark); } } else { MessageBox.Show("该节点不能进行审批!!!"); } } public override Dictionary PropertiesSetting { get { return new Dictionary() { { "Name","名称" }, { "Text","文本" }, {"UserIds", "用户" }, {"RoleIds", "角色" }, {"ActType", "or/and" } }; } } } }