public AddControl(string viewName, ViewControl viewControl) { this.View = viewControl.View; this.gridView = viewControl.GridView; this.viewControl = viewControl; valueBoxes = Program.Context.ContentManager.generateContent(this, gridView, view); InitializeComponent(); SzpifControl last = valueBoxes[valueBoxes.Count - 1]; this.OKButton.Location = new Point(OKButton.Location.X, last.Location.Y + last.Size.Height); this.CancelButton.Location = new Point(CancelButton.Location.X, last.Location.Y + last.Size.Height); this.Height = OKButton.Location.Y + OKButton.Height + 40; this.Width = CancelButton.Location.X + CancelButton.Width + 20; }
public UpdateControl(string viewName, ViewControl viewControl) { contentManager = Program.Context.ContentManager; this.viewControl = viewControl; this.gridView = viewControl.GridView; this.view = viewControl.View; InitializeComponent(); valueBoxes = contentManager.generateContent(this, gridView, view); SzpifControl last = valueBoxes[valueBoxes.Count - 1]; this.OKButton.Location = new Point(OKButton.Location.X, last.Location.Y + last.Size.Height); this.deleteButton.Location = new Point(deleteButton.Location.X, last.Location.Y + last.Size.Height); this.cancelButton.Location = new Point(cancelButton.Location.X, last.Location.Y + last.Size.Height); this.Height = OKButton.Location.Y + OKButton.Height + 40; this.Width = cancelButton.Location.X + cancelButton.Width + 20; if (view.Deletable == false) { deleteButton.Visible = false; } }