public override Shadow GetDestinationTarget() { Shadow partner = GetPartnerOnPageRefInShadow(); if (partner != null) { return(partner.GetDestinationTarget()); } else { return(this); } }
// this will be an empty list for a connector // it doesn't have any connectors pointing to it internal List <Shadow> GetOutputs() { List <Connect> connects = GetShapeOutputs(); List <Shadow> list = new List <Shadow>(); foreach (Connect connect in connects) { // The 1D connector is always the To and 2D shapes are always the From Shape toShape = connect.FromSheet; Shadow shadow = PathMaker.LookupShadowByShape(toShape); list.Add(shadow.GetDestinationTarget()); } return(list); }
public override Shadow GetDestinationTarget() { Connect c; c = GetConnect(true); if (c != null) { Shadow connectedToShadow = PathMaker.LookupShadowByShape(c.ToSheet); return(connectedToShadow.GetDestinationTarget()); } else { return(this); } }
public override Shadow GetDestinationTarget() { List <Connect> list = GetShapeOutputs(); System.Diagnostics.Debug.WriteLine("offpage - " + shape.Text + " page - " + shape.ContainingPage.Name); if (list.Count == 0 && GetShapeInputs().Count == 0) { // no in or outbound connectors return(this); } else if (list.Count > 0) { // find outbound link (should only be one) if (list.Count != 1) { return(this); } // the FromSheet is the outgoing connector (always from = 1D, to = 2D) Shadow connectedToShadow = PathMaker.LookupShadowByShape(list[0].FromSheet); if (connectedToShadow != null) { return(connectedToShadow.GetDestinationTarget()); } else { return(this); } } else { OffPageRefShadow partnerShadow = GetPartnerOffPageRefShadow() as OffPageRefShadow; if (partnerShadow != null && partnerShadow.GetShapeOutputs().Count > 0) { return(partnerShadow.GetDestinationTarget()); } else { if (partnerShadow != null && partnerShadow.GetShapeInputs().Count > 0) { Common.ErrorMessage("Off page connector " + shape.Text + " on page " + shape.ContainingPage.Name + " and it's partner both have inputs"); } return(this); } } }
public override Shadow GetDestinationTarget() { List <Connect> connects = GetShapeOutputs(); // find outbound link (should only be one) if (connects.Count != 1) { return(this); } // the FromSheet is the outgoing connector (always from = 1D, to = 2D) Shadow connectedToShadow = PathMaker.LookupShadowByShape(connects[0].FromSheet); if (connectedToShadow != null) { return(connectedToShadow.GetDestinationTarget()); } else { return(this); } }
internal static Shadow GetGotoTargetFromData(string gotoData) { if (gotoData.Length == 0) { return(null); } Guid uid; if (!Guid.TryParse(gotoData, out uid)) { return(null); } Shadow shadow = PathMaker.LookupShadowByUID(gotoData); if (shadow != null) { return(shadow.GetDestinationTarget()); } else { return(null); } }