public DevicePin Create(Circuit circuit, PinType pinType, int bitWidth) { Pin circuitPin = circuit as Pin; PinSide pinSide = BasePin.DefaultSide((circuitPin != null) ? (circuitPin.PinType == PinType.Input ? PinType.Output : PinType.Input) : pinType); DevicePin pin = this.CreateItem(Guid.NewGuid(), circuit, bitWidth, pinType, pinSide, false, this.UniqueName(BasePin.DefaultName(pinType), circuit), DevicePinData.NoteField.Field.DefaultValue, DevicePinData.JamNotationField.Field.DefaultValue ); pin.Order = this.order++; return(pin); }
public Pin Create(LogicalCircuit logicalCircuit, PinType pinType, int bitWidth) { Pin pin = this.CreateItem(Guid.NewGuid(), logicalCircuit, bitWidth, pinType, BasePin.DefaultSide(pinType), PinData.InvertedField.Field.DefaultValue, this.UniqueName(BasePin.DefaultName(pinType), logicalCircuit), PinData.NoteField.Field.DefaultValue, PinData.JamNotationField.Field.DefaultValue ); this.CreateDevicePin(pin); return(pin); }