/// <summary> /// Checks if this relationship ends at a given ObjectBase /// </summary> /// <param name="obj">object to check</param> /// <returns>true if the relationship ends at an ObjectShape representing obj</returns> public bool EndsAt(ObjectBase obj) { if (endObject is ObjectShape) return (endObject as ObjectShape).ActualObject == obj; return false; }
/// <summary> /// Checks if this relationship starts from a given ObjectBase /// </summary> /// <param name="obj">object to check</param> /// <returns>true if the relationship starts at an ObjectShape representing obj</returns> public bool StartsAt(ObjectBase obj) { if (startObject is ObjectShape) return (startObject as ObjectShape).ActualObject == obj; return false; }
public bool Contains(ObjectBase s) { foreach(BlockShape o in G.BlockShapes) { if(o is ObjectShape) if((o as ObjectShape).ActualObject == s) return true; } return false; }