コード例 #1
0
        /// <summary>
        /// Add a form to the List of forms in the collection.
        /// </summary>
        /// <param name="formType">The type of the form to create (can be null).</param>
        /// <param name="createSubPage">Create a sub page to the form.</param>
        /// <returns>A CCForm when successfull, null when failed.</returns>
        public virtual CCForm AddForm(String formType, bool createSubPage)
        {
            try
            {
                if (forms == null)
                {
                    forms = new List <CCForm>();
                }

                //-- Add a new form --\\
                CCForm frm = new CCForm(this.ParentCreator, null, formType, createSubPage ? new CCPage(this.ParentCreator, null, null, null) : null);
                forms.Add(frm);

                frm.CCParent         = this;
                frm.ParentCreator    = this.ParentCreator;
                frm.NamedParent      = this.Name;
                frm.ParentCollection = this.EflowOwner as ITisCollectionData;
                frm.SetParents();
                return(frm);
            }
            catch (Exception ex)
            {
                ILog.LogError(ex, false);
                throw ex;
            }
        }
コード例 #2
0
        /// <summary>
        /// Add a form to the List of forms in the collection.
        /// </summary>
        /// <param name="formType">The form to add.</param>
        /// <returns>A CCForm when successfull, null when failed.</returns>
        public virtual CCForm AddForm(CCForm form)
        {
            try
            {
                if (forms == null)
                {
                    forms = new List <CCForm>();
                }

                //-- Add a new form --\\
                if (form != null)
                {
                    form.CCParent = this;
                    forms.Add(form);
                    form.CCParent         = this;
                    form.ParentCreator    = this.ParentCreator;
                    form.NamedParent      = this.Name;
                    form.ParentCollection = this.EflowOwner as ITisCollectionData;
                    form.SetParents();
                }

                return(form);
            }
            catch (Exception ex)
            {
                ILog.LogError(ex, false);
                throw ex;
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: hubeizys/SgProduceManager
        private void bt_zhuangbei_touru_Click(object sender, EventArgs e)
        {
            CCForm cc = new CCForm();

            cc.Dock     = DockStyle.Fill;
            cc.TopLevel = false;
            this.xtraTabControl1.SelectedTabPage.Controls.Add(cc);
            cc.BringToFront();
            cc.Show();
        }