public void SetNegationNextControl(Control c) { //throw new NotImplementedException(); //facem pe draq in patru aici si adaugam controlul pe forma parentDiagram.SuspendLayout(); parentDiagram.AddFlowComponent(c); if (fc1 == null) { fc1 = new FlowConnector(this.button1, (c as FlowComponent).GetPinInput(), parentDiagram); parentDiagram.AddFlowConnector(fc1); } if (fc1 != null) { fc1.SetEndControl((c as FlowComponent).GetPinInput()); } c.Left = this.Left - (c.Width - this.Width) / 2; c.Top = this.Bottom + 20; (c as FlowComponent).SlideControl(-this.Width / 2, 0); if (OtherControl != null) { (OtherControl as FlowComponent).SlideControl(-this.Width / 2, c.Height + 20); (c as FlowComponent).SetDefaultNextControl(OtherControl); } this.OtherControl = c; parentDiagram.ResumeLayout(); }
public void SetDefaultNextControl(Control c) { //throw new NotImplementedException(); //facem pe draq in patru aici si adaugam controlul pe forma parentDiagram.SuspendLayout(); parentDiagram.AddFlowComponent(c); if (fc == null) { fc = new FlowConnector(this.button1, (c as FlowComponent).GetPinInput(), parentDiagram); parentDiagram.AddFlowConnector(fc); } //se va modifica (acum e varza codul) if (fc != null) { fc.SetEndControl((c as FlowComponent).GetPinInput()); } c.Left = this.Left - (c.Width - this.Width) / 2; c.Top = this.Bottom + 20; if (NextControl != null) { (NextControl as FlowComponent).SlideControl(0, c.Height + 20); (c as FlowComponent).SetDefaultNextControl(NextControl); } this.NextControl = c; parentDiagram.ResumeLayout(); }