using Newtonsoft.Json; namespace LB_VisionFlowNode { public class FlowConnection { [JsonProperty] public string Id { get; set; } = Guid.NewGuid().ToString(); [JsonIgnore] public FlowNode StartNode { get; set; } [JsonProperty] public string StartNodeId { get; set; } [JsonIgnore] public FlowNode EndNode { get; set; } [JsonProperty] public string EndNodeId { get; set; } [JsonProperty] public int BranchIndex { get; set; } = -1; [JsonProperty] public string BranchName { get { return $"Branch{BranchIndex}"; } } [JsonProperty] public bool IsParallel { get; set; } public Color LineColor { get; set; } = Color.Black; public float LineWidth { get; set; } = 2f; public bool IsDashed { get; set; } public FlowConnection() { } public FlowConnection(FlowNode startNode, FlowNode endNode, int branchIndex) { StartNode = startNode; EndNode = endNode; StartNodeId = startNode?.Id; EndNodeId = endNode?.Id; BranchIndex = branchIndex; } } }