Exemplo n.º 1
0
        dp2SearchForm GetDp2SearchForm()
        {
            dp2SearchForm dp2_searchform = null;

            dp2_searchform = this.MainForm.TopDp2SearchForm;

            if (dp2_searchform == null)
            {
                // 新开一个dp2检索窗
                FormWindowState old_state = this.WindowState;

                dp2_searchform = new dp2SearchForm();
                dp2_searchform.MainForm = this.MainForm;
                dp2_searchform.MdiParent = this.MainForm;
                dp2_searchform.WindowState = FormWindowState.Minimized;
                dp2_searchform.Show();

                this.WindowState = old_state;
                this.Activate();

                // 需要等待初始化操作彻底完成
                dp2_searchform.WaitLoadFinish();
            }

            return dp2_searchform;
        }
Exemplo n.º 2
0
        dp2SearchForm GetDp2SearchForm()
        {
            dp2SearchForm dp2_searchform = null;

            if (this.LinkedSearchForm != null
                && this.LinkedSearchForm.IsValid() == true   // 2008/3/17
                && this.LinkedSearchForm is dp2SearchForm)
            {
                dp2_searchform = (dp2SearchForm)this.LinkedSearchForm;
            }
            else
            {
                dp2_searchform = this.MainForm.TopDp2SearchForm;

                if (dp2_searchform == null)
                {
                    // 新开一个dp2检索窗
                    FormWindowState old_state = this.WindowState;

                    dp2_searchform = new dp2SearchForm();
                    dp2_searchform.MainForm = this.MainForm;
                    dp2_searchform.MdiParent = this.MainForm;
                    dp2_searchform.WindowState = FormWindowState.Minimized;
                    dp2_searchform.Show();

                    // 2008/3/17
                    this.WindowState = old_state;
                    this.Activate();

                    // 需要等待初始化操作彻底完成
                    dp2_searchform.WaitLoadFinish();
                }
            }

            return dp2_searchform;
        }