public void Disconnect(DX11OutputPin op)
 {
     if (op == this.ParentPin)
     {
         op.ChildrenPins.Remove(this);
         this.ParentPin = null;
     }
 }
Exemple #2
0
 public void Disconnect(DX11OutputPin op)
 {
     if (op == this.ParentPin)
     {
         op.ChildrenPins.Remove(this);
         this.ParentPin = null;
     }
 }
Exemple #3
0
        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);
 }
Exemple #5
0
 public void Connect(DX11OutputPin op)
 {
     this.ParentPin = op;
     op.ChildrenPins.Add(this);
 }