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);
 }
Example #3
0
 /// <summary>
 /// Releases this connector from any other
 /// </summary>
 public void Release()
 {
     if(this.attachedTo!=null)
     {
         this.attachedTo.attachedConnectors.Remove(this);
         this.attachedTo = null;
     }
 }
Example #4
0
 /// <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;
 }
Example #5
0
 /// <summary>
 /// Detaches the given connector from this connector
 /// </summary>
 /// <param name="c"></param>
 public void DetachConnector(Connector c)
 {
     attachedConnectors.Remove(c);
 }