Esempio n. 1
0
        public virtual void AddEdge(RGEdge edge, string parent)
        {
            allEdges.Add(edge);
            var graph = GetGraphBox(parent);

            if (graph == null)
            {
                graph = new GraphBox(parent);
                graphBoxs.Add(graph);
            }
            //graph.AddEdge(edge);
        }
Esempio n. 2
0
        public RGEdge CreateEdge(LinkInfo info, Transform box, string centre)
        {
            RGEdge item = GetEdge(info.UID);

            if (item == null)
            {
                var from = GetNode(info.from.UID);
                var to   = GetNode(info.to.UID);
                if (from != null && to != null)
                {
                    var view = ZAssetController.Instance.ActivateAsset <GEdgeParts>(box);
                    item = new RGEdge();
                    item.UpdateInfo(info, view, from, to);
                    item.DrawLine();
                    item.Show();
                    AddEdge(item, centre);
                }
            }
            else
            {
                item.Show();
            }
            return(item);
        }
Esempio n. 3
0
 public override void AddEdge(RGEdge edge, string parent)
 {
     allEdges.Add(edge);
 }