コード例 #1
0
ファイル: MainForm.cs プロジェクト: sharespy/Astroder
 private void splitContainer1_Panel2_SizeChanged(object sender, EventArgs e)
 {
     if (splitContainer1.Panel2.Controls.Count != 0 && splitContainer1.Panel2.Controls[0] is DetailForm)
     {
         DetailForm first = splitContainer1.Panel2.Controls[0] as DetailForm;
         first.WindowState = FormWindowState.Normal;
         first.WindowState = FormWindowState.Maximized;
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: sharespy/Astroder
        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();
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: sharespy/Astroder
 private void closeAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.ActiveMdiChild.Name == "StarsViewerForm")
         {
             DetailForm starsViewer = (DetailForm)this.ActiveMdiChild;
             starsViewer.Close();
         }
         else
         {
             QuoteManagerForm objfrmSChild = (QuoteManagerForm)this.ActiveMdiChild;
             objfrmSChild.Close();
         }
     }
     catch
     {
     }
 }
コード例 #4
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();
                }
            }
        }