Exemple #1
0
 public void Show(
     WinSupport.BaseEditUserControl editUserControl,
     CSLA.BusinessBase businessObject,
     System.Windows.Forms.Form parent)
 {
     this.Show(editUserControl, businessObject,
               parent, "");
 }
Exemple #2
0
        protected virtual void SetupForm(
            WinSupport.BaseEditUserControl editUserControl,
            WinSupport.BaseSelectUserControl selectUserControl,
            System.Type businessobjecttype,
            System.Windows.Forms.Form parent,
            string title,
            bool showToolbar,
            int openingWidth,
            int openingHeight)
        {
            bool showSelectUC = false;
            int  iWidth       = 0;
            int  iHeight      = 0;

            this.mEditUserControl              = editUserControl;
            this.mEditUserControl.DataChanged += new BaseEditUserControl.DataChangedHandler(this.uc_DataChanged);
            this.mEditUserControl.BringToFront();
            this.mSelectUserControl = selectUserControl;
            this.mSelectUserControl.SelectionMade += new BaseSelectUserControl.SelectionMadeHandler(this.selectUC_SelectionMade);
            this.mBusinessObjectType  = businessobjecttype;
            selectUserControl.Visible = false;
            this.pnlEdit.Controls.Add(editUserControl);
            if ((title == null) || (title.Trim().Length == 0))
            {
                this.Text = selectUserControl.Caption;
            }
            else
            {
                this.Text = title;
            }
            this.cboSelect.ValueMember   = "UniqueKey";
            this.cboSelect.DisplayMember = "DisplayText";
            this.MdiParent       = parent;
            this.ToolBar.Visible = showToolbar;
            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.MdiParent.ClientSize.Height)
            {
                iHeight = this.MdiParent.ClientSize.Height;
            }
            this.ClientSize = new System.Drawing.Size(iWidth, iHeight);
            SetState();
        }
Exemple #3
0
 public void ShowDialog(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessobjecttype,
     System.Windows.Forms.Form parent)
 {
     ShowDialog(editUserControl, selectUserControl, businessobjecttype,
                parent, true);
 }
Exemple #4
0
 public void Show(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessObjectType,
     System.Windows.Forms.Form parent,
     string title)
 {
     Show(editUserControl, selectUserControl, businessObjectType,
          parent, title, true);
 }
Exemple #5
0
 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);
 }
Exemple #6
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);
 }
Exemple #7
0
 public void ShowDialog(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessobjecttype,
     System.Windows.Forms.Form parent,
     string title,
     bool showToolbar)
 {
     this.ShowDialog(editUserControl, selectUserControl,
                     businessobjecttype, parent, title, showToolbar, 0, 0);
 }
Exemple #8
0
 public void Show(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessObjectType,
     System.Windows.Forms.Form parent,
     bool showToolbar)
 {
     Show(editUserControl, selectUserControl,
          businessObjectType, parent,
          "", showToolbar);
 }
Exemple #9
0
 public void Show(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessObjectType,
     System.Windows.Forms.Form parent,
     string title,
     bool showToolbar,
     int openingWidth)
 {
     this.Show(editUserControl, selectUserControl,
               businessObjectType, parent, title, showToolbar, openingWidth, 0);
 }
Exemple #10
0
 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();
 }
Exemple #11
0
 public void ShowDialog(
     WinSupport.BaseEditUserControl editUserControl,
     WinSupport.BaseSelectUserControl selectUserControl,
     System.Type businessobjecttype,
     System.Windows.Forms.Form parent,
     string title,
     bool showToolbar,
     int openingWidth,
     int openingHeight)
 {
     this.SetupForm(editUserControl, selectUserControl,
                    businessobjecttype, parent, title, showToolbar,
                    openingWidth, openingHeight);
     base.ShowDialog(parent);
 }
Exemple #12
0
 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);
 }