// -- FUNCTIONS -- // finishes out the connection public void connect(Connection con) { if (!con.completeConnection(this)) { return; } // need actual deletion code for connection stuff? //maybe this function should return true if connection successful, false if not? // add connection to both nodes' collection m_connections.Add(con); con.getOrigin().addConnection(con); }
// construction public ConnectionGraphic(Connection parent) { m_parent = parent; createDrawing(); }
public void removeConnection(Connection c) { m_connections.Remove(c); }
public void addConnection(Connection c) { m_connections.Add(c); }
// -- EVENT HANDLERS -- private void evt_MouseDown(object sender, MouseEventArgs e) { Connection con = new Connection(m_parent); Master.log("Hey, creating a connection"); }
public static ConnectionGraphic createConnectionGraphic(Connection parent) { return new ConnectionGraphic(parent); }