public void Disconnect(DX11OutputPin op) { if (op == this.ParentPin) { op.ChildrenPins.Remove(this); this.ParentPin = null; } }
public void Disconnect(DX11OutputPin op) { if (op == this.ParentPin) { op.ChildrenPins.Remove(this); this.ParentPin = null; } }
public bool RemovePin(string name, PinDirection direction) { if (direction == PinDirection.Input) { DX11InputPin ip = null; foreach (DX11InputPin vi in this.InputPins) { if (vi.Name == name) { ip = vi; } } if (ip != null) { //Diconnect parent if applicable if (ip.ParentPin != null) { if (ip.ParentPin.ChildrenPins.Contains(ip)) { ip.ParentPin.ChildrenPins.Remove(ip); } } this.InputPins.Remove(ip); } return(ip != null); } if (direction == PinDirection.Output) { DX11OutputPin op = null; foreach (DX11OutputPin vo in this.OutputPins) { if (vo.Name == name) { op = vo; } } if (op != null) { foreach (DX11InputPin vip in op.ChildrenPins) { vip.ParentPin = null; } op.ChildrenPins.Clear(); this.OutputPins.Remove(op); } return(op != null); } return(false); }
public void Connect(DX11OutputPin op) { this.ParentPin = op; op.ChildrenPins.Add(this); }
public void Connect(DX11OutputPin op) { this.ParentPin = op; op.ChildrenPins.Add(this); }