private Form GetMdiParentForm() { if (DockPanel == null) { return(null); } if (!DockPanel.MdiIntegration) { return(null); } if (DockState != DockState.Document) { return(null); } Form parentMdi = DockPanel.FindForm(); if (parentMdi != null) { if (!parentMdi.IsMdiContainer) { parentMdi = null; } } return(parentMdi); }
private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds) { if (dockPanel == null) { throw(new ArgumentNullException(ResourceHelper.GetString("FloatWindow.Constructor.NullDockPanel"))); } m_dockList = new DockList(this); FormBorderStyle = FormBorderStyle.SizableToolWindow; ShowInTaskbar = false; SuspendLayout(); if (boundsSpecified) { Bounds = bounds; StartPosition = FormStartPosition.Manual; } else { StartPosition = FormStartPosition.WindowsDefaultLocation; } if (Environment.Version.Major == 1) { m_dummyControl = new DummyControl(); m_dummyControl.Bounds = Rectangle.Empty; Controls.Add(m_dummyControl); } m_dockPanel = dockPanel; Owner = DockPanel.FindForm(); DockPanel.AddFloatWindow(this); if (pane != null) { pane.FloatWindow = this; } ResumeLayout(); }