public ProcConnectionWPF( BlockWPF startBlock, BlockWPF endBlock, Point relativeStartPosition, Point relativeEndPosition, int startPort, int endPort, ConnectPointWPF start, ConnectPointWPF end) : base(startBlock, endBlock) { startPoint = start; endPoint = end; // startBlock неможет быть EndBlockWPF или ResourceWPF if ((startBlock is EndBlockWPF) || (startBlock is ResourceWPF)) { throw new ArgumentException("Неверное значение", "startBlock"); } // endBloc неможет быть StartBlockWPF или ResourceWPF if ((endBlock is StartBlockWPF) || (startBlock is ResourceWPF)) { throw new ArgumentException("Неверное значение", "endBlock"); } this.relativeStartPosition = relativeStartPosition; this.relativeEndPosition = relativeEndPosition; this.StartPort = startPort; this.EndPort = endPort; MakeLine(); SetZIndex(this, 1); }
public ResConnectionWPF(BlockWPF startBlock, BlockWPF endBlock) : base(startBlock, endBlock) { // startBlock должен быть ресурсом if (!(this.startBlock is ResourceWPF)) { BlockWPF temp = this.startBlock; this.startBlock = this.endBlock; this.endBlock = temp; } if (!(this.startBlock is ResourceWPF)) { throw new ArgumentException("Отсутствует ресурс"); } MakeLine(); Stroke = Brushes.Gray; // установить ZIndex //SetZIngex(); SetZIndex(this, 1); }
public ConnectionWPF(BlockWPF startBlock, BlockWPF endBlock) { this.startBlock = startBlock; this.endBlock = endBlock; }