/* * Returns a map between pin numbers and connected breadboard bus */ public Dictionary <int, string> GetConnectedBreadboardNets() { Dictionary <int, string> connectedBusses = new Dictionary <int, string>(); foreach (var pinPosition in GetPinPositions()) { int breadboardID = 0; Point breadboardPosition = Breadboard.GetPositionOnBreadboard( GetAbsolutePosition(pinPosition.Value), ref breadboardID); connectedBusses[pinPosition.Key] = Breadboard.GetNetAtPoint(breadboardPosition, breadboardID.ToString()); } return(connectedBusses); }
public string[] GetConnectedBreadboardNets() { int startBbId = 0, endBbId = 0; Point startPtOnBb, endPtOnBb; Point endPoint = WirePosition; if (WireOrientation == Orientation.Horizontal) { endPoint.X += Length * Constants.ScaleFactor; } else { endPoint.Y += Length * Constants.ScaleFactor; } startPtOnBb = Breadboard.GetPositionOnBreadboard(WirePosition, ref startBbId); endPtOnBb = Breadboard.GetPositionOnBreadboard(endPoint, ref endBbId); return(new String[] { Breadboard.GetNetAtPoint(startPtOnBb, startBbId.ToString()), Breadboard.GetNetAtPoint(endPtOnBb, endBbId.ToString()) }); }