public void Show( WinSupport.BaseEditUserControl editUserControl, CSLA.BusinessBase businessObject, System.Windows.Forms.Form parent) { this.Show(editUserControl, businessObject, parent, ""); }
public void Show( WinSupport.BaseEditUserControl editUserControl, CSLA.BusinessBase businessObject, System.Windows.Forms.Form parent, string title, int openingWidth) { this.Show(editUserControl, businessObject, parent, title, openingWidth, 0); }
public System.Windows.Forms.DialogResult ShowDialog( WinSupport.BaseEditUserControl editUserControl, CSLA.BusinessBase businessObject, string parentPrimaryKey, System.Windows.Forms.Form parent) { this.ShowDialog(editUserControl, businessObject, parentPrimaryKey, parent, ""); return(this.mDlgResult); }
protected void SetupForm( BaseEditUserControl editUserControl, CSLA.BusinessBase busObject, string parentPrimaryKey, System.Windows.Forms.Form parent, string title, int openingWidth, int openingHeight, bool isModal) { int iWidth = 0; int iHeight = 0; this.mEditUserControl = editUserControl; this.mEditUserControl.DataChanged += new BaseEditUserControl.DataChangedHandler(this.uc_DataChanged); this.mEditUserControl.BringToFront(); this.pnlEdit.Controls.Add(editUserControl); mObject = (BusinessObjectSupport.IBusinessObject)busObject; if ((title == null) || (title.Trim().Length == 0)) { this.Text = editUserControl.Caption; } else { this.Text = title; } if (!isModal && parent != null && parent.IsMdiContainer) { this.MdiParent = parent; } ((IEditUserControl)this.mEditUserControl).SetupControl(mObject, parentPrimaryKey); mCallingForm = parent; if (openingWidth == 0) { iWidth = this.ClientSize.Width + 1; } else { iWidth = openingWidth; } if (openingHeight == 0) { iHeight = this.ClientSize.Height + 1; } else { iHeight = openingHeight; } if (iHeight < this.CallingForm.ClientSize.Height) { iHeight = this.CallingForm.ClientSize.Height; } this.ClientSize = new System.Drawing.Size(iWidth, iHeight); SetState(); }
public void Show( WinSupport.BaseEditUserControl editUserControl, CSLA.BusinessBase businessObject, System.Windows.Forms.Form parent, string title, int openingWidth, int openingHeight) { this.SetupForm(editUserControl, businessObject, "", parent, title, openingWidth, openingHeight, false); base.Show(); }
public System.Windows.Forms.DialogResult ShowDialog( WinSupport.BaseEditUserControl editUserControl, CSLA.BusinessBase businessObject, string parentPrimaryKey, System.Windows.Forms.Form parent, string title, int openingWidth, int openingHeight) { this.SetupForm(editUserControl, businessObject, parentPrimaryKey, parent, title, openingWidth, openingHeight, true); base.ShowDialog(parent); return(this.mDlgResult); }