public void SetConnection(Connection newConnection, CopyConnectionObj connection) { newConnection.ConnectionColor = connection.ConnectionColor; newConnection.Description = connection.Description; newConnection.Door = connection.Door; newConnection.EndText = connection.EndText; newConnection.Flow = connection.Flow; newConnection.MidText = connection.MidText; newConnection.Name = connection.Name; newConnection.StartText = connection.StartText; newConnection.Style = connection.Style; }
private CopyConnectionObj createCopyObj(Connection conn) { var xx = new CopyConnectionObj { ConnectionColor = conn.ConnectionColor, Description = conn.Description, Door = conn.Door, EndText = conn.EndText, Flow = conn.Flow, MidText = conn.MidText, Name = conn.Name, StartText = conn.StartText, Style = conn.Style, VertextList = new List <CopyVertexObj>() }; var ii = 0; foreach (var vertex in conn.VertexList) { var yy = new CopyVertexObj { Index = ii }; if (vertex.Port != null) { yy.Type = VertexType.Dock; yy.OwnerId = vertex.Port.Owner.ID; yy.PortId = vertex.Port.ID; } else { yy.Type = VertexType.Point; yy.Position = vertex.Position; } xx.VertextList.Add(yy); ii++; } return(xx); }