Esempio n. 1
0
        void ActivateBrowseWindow(bool bShow)
        {
            if (this.browseWindow == null
                || (this.browseWindow != null && this.browseWindow.IsDisposed == true))
            {
                this.browseWindow = new BrowseSearchResultForm();
                MainForm.SetControlFont(this.browseWindow, this.MainForm.DefaultFont);

                this.browseWindow.MainForm = this.MainForm; // 2009/2/17 
                this.browseWindow.Text = "命中多条种记录。请从中选择一条";
                this.browseWindow.FormClosing -= browseWindow_FormClosing;
                this.browseWindow.FormClosing += browseWindow_FormClosing;
                this.browseWindow.FormClosed -= new FormClosedEventHandler(browseWindow_FormClosed);
                this.browseWindow.FormClosed += new FormClosedEventHandler(browseWindow_FormClosed);
                // this.browseWindow.MdiParent = this.MainForm;
                if (bShow == true)
                {
                    this.MainForm.AppInfo.LinkFormState(this.browseWindow, "browseWindow_state");
                    this.browseWindow.Show();
                }

                this.browseWindow.OpenDetail -= new OpenDetailEventHandler(browseWindow_OpenDetail);
                this.browseWindow.OpenDetail += new OpenDetailEventHandler(browseWindow_OpenDetail);
            }
            else
            {
                if (this.browseWindow.Visible == false
                    && bShow == true)
                {
                    /*
                    this.MainForm.AppInfo.LinkFormState(this.browseWindow, "browseWindow_state");
                    this.browseWindow.Visible = true;
                     * */
                    ShowBrowseWindow(-1);
                }

                this.browseWindow.BringToFront();
                this.browseWindow.RecordsList.Items.Clear();
            }
        }
Esempio n. 2
0
 void browseWindow_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (browseWindow != null)
     {
         this.MainForm.AppInfo.UnlinkFormState(browseWindow);
         this.browseWindow = null;
     }
 }
Esempio n. 3
0
 void CloseBrowseWindow()
 {
     if (this.browseWindow != null)
     {
         this.browseWindow.Close();
         this.browseWindow = null;
     }
 }