示例#1
0
        private void launchDetailForm()
        {
            MaximizePanel2();

            DetailForm newStudy = new DetailForm(History);

            newStudy.Tag  = this;
            newStudy.Text = History.Name;

            newStudy.MdiParent = GlobalItems.MdiWindow;
            //newStudy.Parent = this;

            Panel2.Controls.Add(newStudy);
            newStudy.Parent = Panel2;
            newStudy.Dock   = DockStyle.Fill;

            newStudy.Show();
        }
示例#2
0
        private void launchDetailForm()
        {
            if (this.Tag == null)
            {
                MainForm main = (this.ParentForm is MainForm) ? (this.ParentForm as MainForm) : null;

                if (main != null)
                {
                    main.MaximizePanel2();
                }

                DetailForm newStudy = new DetailForm(History);
                newStudy.Tag  = this;
                newStudy.Text = History.Name;

                newStudy.MdiParent = GlobalItems.MdiWindow;
                //newStudy.Parent = this;

                this.FormClosed += new FormClosedEventHandler(newStudy.OnQuoteManagerForm_FormClosed);

                GlobalItems.MdiWindow.Panel2.Controls.Add(newStudy);
                newStudy.Parent = GlobalItems.MdiWindow.Panel2;
                newStudy.Dock   = DockStyle.Fill;

                newStudy.Show();

                this.Tag = newStudy;
            }
            else
            {
                if (this.Tag is DetailForm)
                {
                    DetailForm detail = (DetailForm)(this.Tag);

                    detail.ReloadHistory(History);

                    detail.Display();
                }
            }
        }