public SelectControl(LinkControl linkedControl) { InitializeComponent(); this.linkedControl = linkedControl; gridView.Name = linkedControl.LinkType.Additional; view = Program.Context.ViewToGridManager.bindToView(gridView); 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; }
public ViewControl(string viewName, int maxHeight) { InitializeComponent(); this.gridView.Name = this.viewName = viewName; this.Edit.Text = "..."; this.Edit.Width = 30; this.Edit.UseColumnTextForButtonValue = true; view = Program.Context.ViewToGridManager.bindToView(gridView); addForm = FormFactory.createAddForm(viewName, this); addForm.StartPosition = FormStartPosition.CenterParent; updateForm = FormFactory.createUpdateForm(viewName, this); updateForm.StartPosition = FormStartPosition.CenterParent; this.gridView.Height = maxHeight - 50; if (view.Insertable == false) this.Add.Visible = false; if (view.Updateable == false) this.Edit.Visible = false; // this. }
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; } }
public ViewControl(string viewName, int maxHeight) { InitializeComponent(); this.gridView.Name = this.viewName = viewName; this.Edit.Text = "..."; this.Edit.Width = 30; this.Edit.UseColumnTextForButtonValue = true; view = Program.Context.ViewToGridManager.bindToView(gridView); addForm = FormFactory.createAddForm(viewName, this); addForm.StartPosition = FormStartPosition.CenterParent; updateForm = FormFactory.createUpdateForm(viewName, this); updateForm.StartPosition = FormStartPosition.CenterParent; this.gridView.Height = maxHeight - 50; if (view.Insertable == false) { this.Add.Visible = false; } if (view.Updateable == false) { this.Edit.Visible = false; } // this. }
private void ViewControl_VisibleChanged(object sender, EventArgs e) { view = Program.Context.ViewToGridManager.reconnect(gridView); }
private void Reload_Click(object sender, EventArgs e) { view = Program.Context.ViewToGridManager.reconnect(gridView); }