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 (fc2 == null) { fc2 = new FlowConnector(this.button2, (c as FlowComponent).GetPinInput(), parentDiagram); parentDiagram.AddFlowConnector(fc2); } if (fc2 != null) { fc2.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 (NextControl != null) { (NextControl as FlowComponent).SlideControl(this.Width / 2, c.Height + 20); (c as FlowComponent).SetDefaultNextControl(NextControl); } this.NextControl = 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); 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(); }