Files
aistudio-wpf-diagram/Extensions/AIStudio.Wpf.Flowchart/Models/FlowNodeDesignerItem.cs

95 lines
2.0 KiB
C#
Raw Normal View History

2021-07-29 13:55:18 +08:00
using AIStudio.Wpf.Flowchart.ViewModels;
using Newtonsoft.Json;
2021-07-23 09:42:22 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Xml.Serialization;
2022-10-28 22:45:39 +08:00
using AIStudio.Wpf.DiagramDesigner;
2023-04-16 12:21:51 +08:00
using System.ComponentModel.Design;
using System.Reflection;
2021-07-23 09:42:22 +08:00
2021-07-29 13:55:18 +08:00
namespace AIStudio.Wpf.Flowchart.Models
2021-07-23 09:42:22 +08:00
{
2023-05-03 20:29:12 +08:00
[Serializable]
[XmlInclude(typeof(FlowNodeDesignerItem))]
2021-07-23 09:42:22 +08:00
public class FlowNodeDesignerItem : DesignerItemBase
{
public FlowNodeDesignerItem()
{
}
public FlowNodeDesignerItem(FlowNode item) : base(item)
{
if (item is MiddleFlowNode middleFlow)
{
UserIds = middleFlow.UserIds;
RoleIds = middleFlow.RoleIds;
ActType = middleFlow.ActType;
2023-04-16 12:21:51 +08:00
SimulateApprove = middleFlow.SimulateApprove;
2021-07-23 09:42:22 +08:00
}
2023-03-10 12:09:13 +08:00
Color = item.StatusColor;
2021-07-23 09:42:22 +08:00
Kind = item.Kind;
StateImage = item.StateImage;
2023-04-16 12:21:51 +08:00
Status = item.Status;
Remark = item.Remark;
2021-07-23 09:42:22 +08:00
}
[XmlArray]
2023-04-16 12:21:51 +08:00
public List<string> UserIds
{
get; set;
}
2021-07-23 09:42:22 +08:00
[XmlArray]
2023-04-16 12:21:51 +08:00
public List<string> RoleIds
{
get; set;
}
[XmlAttribute]
public string ActType
{
get; set;
}
[XmlAttribute]
public bool SimulateApprove
{
get; set;
}
2021-07-23 09:42:22 +08:00
[XmlAttribute]
2023-04-16 12:21:51 +08:00
public int Status
{
get; set;
}
[XmlAttribute]
public string Remark
{
get; set;
}
2021-07-23 09:42:22 +08:00
[XmlAttribute]
2023-04-16 12:21:51 +08:00
public string Color
{
get; set;
}
2021-07-23 09:42:22 +08:00
[XmlAttribute]
2023-04-16 12:21:51 +08:00
public NodeKinds Kind
{
get; set;
}
2021-07-23 09:42:22 +08:00
[XmlAttribute]
2023-04-16 12:21:51 +08:00
public string StateImage
{
get; set;
}
2021-07-23 09:42:22 +08:00
}
}