Esempio n. 1
0
 void showMdi(SfForm child)
 {
     if ((Application.OpenForms[child.Name]) == null)
     {
         child.MdiParent = this;
         child.Show();
     }
     else
     {
         (Application.OpenForms[child.Name]).WindowState = FormWindowState.Maximized;
         (Application.OpenForms[child.Name]).BringToFront();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Occurs when chlicking on the New Menu
        /// </summary>
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            count++;
            SfForm childForm = new SfForm();

            childForm.MdiParent = this;
            childForm.Height    = 170;
            childForm.Text      = "MDI Child - " + count;
            childForm.Name      = "SfForm" + count;
            childForm.Icon      = ico;
            this.windowToolStripMenuItem.DropDownItems.Add(childForm.Text, null, On_ChildMenuClick);
            childForm.Show();
            childForm.FormClosed += ChildForm_FormClosed;
        }
Esempio n. 3
0
        /// <summary>
        /// Occurs when chlicking on the New Menu
        /// </summary>
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            count++;
            SfForm childForm = new SfForm();

            childForm.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            childForm.AutoScaleMode       = AutoScaleMode.Font;
            childForm.MdiParent           = this;
            childForm.Height = (int)DpiAware.LogicalToDeviceUnits(170.0f);
            childForm.Text   = "MDI Child - " + count;
            childForm.Name   = "SfForm" + count;
            childForm.Icon   = ico;
            this.windowToolStripMenuItem.DropDownItems.Add(childForm.Text, null, On_ChildMenuClick);
            childForm.Show();
            childForm.FormClosed += ChildForm_FormClosed;
        }