ARCed.UI.FloatWindow.InternalConstruct C# (CSharp) Method

InternalConstruct() private method

private InternalConstruct ( DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds ) : void
dockPanel DockPanel
pane DockPane
boundsSpecified bool
bounds System.Drawing.Rectangle
return void
        private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
        {
            if (dockPanel == null)
                throw (new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));

            this.m_nestedPanes = new NestedPaneCollection(this);

            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            ShowInTaskbar = false;
            if (dockPanel.RightToLeft != RightToLeft)
                RightToLeft = dockPanel.RightToLeft;
            if (RightToLeftLayout != dockPanel.RightToLeftLayout)
                RightToLeftLayout = dockPanel.RightToLeftLayout;

            SuspendLayout();

            if (!boundsSpecified)
            {
                Bounds = bounds;
                StartPosition = FormStartPosition.Manual;
            }
            else
            {
                StartPosition = FormStartPosition.WindowsDefaultLocation;
            }

            if (pane != null)
                pane.FloatWindow = this;

            this.m_dockPanel = dockPanel;
            Owner = this.DockPanel.FindForm();

            Size = bounds.Size;
            // Suspend child controls from resizing every pixel
            ResizeBegin += (s, e) => SuspendLayout();
            ResizeEnd += (s, e) => ResumeLayout(true);

            this.DockPanel.AddFloatWindow(this);

            ResumeLayout();
        }