Esempio n. 1
0
 public void Remove(Connector c)
 {
     if(this.InnerList.Contains(c)) System.Diagnostics.Trace.WriteLine("yep, removed.");
     this.InnerList.Remove(c);
 }
Esempio n. 2
0
 public int Add(Connector con)
 {
     return this.InnerList.Add(con);
 }
Esempio n. 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;
     }
 }
Esempio n. 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;
 }
Esempio n. 5
0
 /// <summary>
 /// Detaches the given connector from this connector
 /// </summary>
 /// <param name="c"></param>
 public void DetachConnector(Connector c)
 {
     attachedConnectors.Remove(c);
 }