コード例 #1
0
        private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
        {
            if (dockPanel == null)
            {
                throw(new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
            }

            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;
                Size          = dockPanel.DefaultFloatWindowSize;
            }

            m_dockPanel = dockPanel;
            Owner       = DockPanel.FindForm();
            DockPanel.AddFloatWindow(this);
            if (pane != null)
            {
                pane.FloatWindow = this;
            }

            ResumeLayout();
        }