/// <summary> /// Adds the icon and connection for a piece of equipment that has only one terminal at the location /// </summary> /// <param name="t"></param> /// <param name="icns"></param> /// <param name="r"></param> int fillInSingle(Terminal t, Equipment eq, string[,] icns, int r, IdentifiedObject[,] refs){ var c = nodeColumns[t.ConnectionPoint]; icns[r, c] = "connectedbus"; icns[r, c + 1] = String.Format("{0}{1}", eq.Type, eq.State()); refs[r, c + 1] = eq; return c + 2; }
/// <summary> /// Draws the Equipment and wires which span between terminals. /// </summary> /// <param name="t1"></param> /// <param name="t2"></param> /// <param name="pe"></param> /// <param name="icns"></param> /// <param name="r"></param> /// <returns></returns> int fillInConnection(Terminal t1, Terminal t2, Equipment pe, string[,] icns, int r, IdentifiedObject[,] refs){ int st = nodeColumns[t1.ConnectionPoint]; int en = nodeColumns[t2.ConnectionPoint]; icns[r, st] = "connectedbus"; icns[r, en] = "connectedbus"; icns[r, st + 1] = String.Format("{0}{1}", pe.Type, pe.State()); refs[r, st + 1] = pe; for(int i = st + 2; i < en; i++){ icns[r, i] = (icns[r, i] == "bus") ? "noconnectionbus" : "wire"; } return en; }