public void Remove(Connector c) { if(this.InnerList.Contains(c)) System.Diagnostics.Trace.WriteLine("yep, removed."); this.InnerList.Remove(c); }
public int Add(Connector con) { return this.InnerList.Add(con); }
/// <summary> /// Releases this connector from any other /// </summary> public void Release() { if(this.attachedTo!=null) { this.attachedTo.attachedConnectors.Remove(this); this.attachedTo = null; } }
/// <summary> /// Attaches the given connector to this connector /// </summary> /// <param name="c"></param> public void AttachConnector(Connector c) { //remove from the previous, if any if(c.attachedTo!=null) { c.attachedTo.attachedConnectors.Remove(c); } attachedConnectors.Add(c); c.attachedTo=this; }
/// <summary> /// Detaches the given connector from this connector /// </summary> /// <param name="c"></param> public void DetachConnector(Connector c) { attachedConnectors.Remove(c); }