private void AdjustAutoOrientationForDocking(PanelDockStyle dockStyle) { if (Orientation == Orientation.Auto && ((GetOrientation() == Orientation.Vertical && (dockStyle == PanelDockStyle.Bottom || dockStyle == PanelDockStyle.Top)) || (GetOrientation() == Orientation.Horizontal && (dockStyle == PanelDockStyle.Left || dockStyle == PanelDockStyle.Right)))) { MapSize size = new MapSize(this, Size.Height, Size.Width); PanelMargins panelMargins2 = base.Margins = new PanelMargins(base.Margins.Bottom, base.Margins.Right, base.Margins.Top, base.Margins.Left); Size = size; } }
private void AdjustAutoOrientationForDocking(PanelDockStyle dockStyle) { if (this.Orientation == Orientation.Auto) { if (this.GetOrientation() != Orientation.Vertical || (dockStyle != PanelDockStyle.Bottom && dockStyle != PanelDockStyle.Top)) { if (this.GetOrientation() != 0) { return; } if (dockStyle != PanelDockStyle.Left && dockStyle != PanelDockStyle.Right) { return; } } MapSize size = new MapSize(this, this.Size.Height, this.Size.Width); PanelMargins panelMargins2 = base.Margins = new PanelMargins(base.Margins.Bottom, base.Margins.Right, base.Margins.Top, base.Margins.Left); this.Size = size; } }