C3032
2025-12-23 bf32d21bd811d2d2b36ff9ca9e6fff620079af6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
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;
        }
    }
}