private Brush xe70d5b03e620fb01( Rectangle xda73fcb97c77d998, LinearGradientMode x23e85093ba3a7d1d, Color x6d9a095d183b6b50, Color x60a2487f840b534c) { Color color = RendererBase.InterpolateColors(x6d9a095d183b6b50, x60a2487f840b534c, 0.25f); LinearGradientBrush linearGradientBrush = new LinearGradientBrush(xda73fcb97c77d998, x6d9a095d183b6b50, x60a2487f840b534c, x23e85093ba3a7d1d); ColorBlend colorBlend; do { colorBlend = new ColorBlend(3); colorBlend.Colors = new Color[3] { x6d9a095d183b6b50, color, x60a2487f840b534c }; }while (false); colorBlend.Positions = new float[3] { 0.0f, 0.5f, 1f }; linearGradientBrush.InterpolationColors = colorBlend; return((Brush)linearGradientBrush); }
protected internal override void DrawDocumentStripTab( Graphics graphics, Rectangle bounds, Rectangle contentBounds, Image image, string text, Font font, Color backColor, Color foreColor, DrawItemState state, bool drawSeparator) { Color x477e9d1180ece053 = RendererBase.InterpolateColors(backColor, SystemColors.ControlLightLight, 0.78f); bool xb0f87b71823b1d4e = (state & DrawItemState.Checked) == DrawItemState.Checked; if ((state & DrawItemState.Selected) != DrawItemState.Selected) { xa811784015ed8842.xf8aac789a7846004(graphics, bounds, contentBounds, image, this.ImageSize, text, font, x477e9d1180ece053, backColor, SystemBrushes.ControlText, this.xcee7f670c3cc8729, this.x0b2889b8ff5ec580, this.x0e8b6412ec502dbf, false, this.DocumentTabSize, this.DocumentTabExtra, this.TextFormat, xb0f87b71823b1d4e); } else { xa811784015ed8842.xf8aac789a7846004(graphics, bounds, contentBounds, image, this.ImageSize, text, font, x477e9d1180ece053, backColor, SystemBrushes.ControlText, this.x994b52371e1ca7a9, this.x80caa5727f6ffe52, this.x9196c174a89a4ce4, true, this.DocumentTabSize, this.DocumentTabExtra, this.TextFormat, xb0f87b71823b1d4e); if (false) { ; } } }
protected override void CalculateLayout(RendererBase renderer, Rectangle bounds, bool floating, out Rectangle titlebarBounds, out Rectangle tabstripBounds, out Rectangle clientBounds, out Rectangle joinCatchmentBounds) { titlebarBounds = Rectangle.Empty; tabstripBounds = bounds; tabstripBounds.Height = renderer.DocumentTabStripSize; bounds.Offset(0, renderer.DocumentTabStripSize); bounds.Height -= renderer.DocumentTabStripSize; clientBounds = bounds; joinCatchmentBounds = tabstripBounds; }
private void method_20(RendererBase renderer, Graphics graphics, Font font_0, DockControl dockControl_2) { DrawItemState drawItemState = DrawItemState.Default; if (this.SelectedControl == dockControl_2) { drawItemState |= DrawItemState.Selected; if (base.DockContainer.Manager != null) { if (base.DockContainer.Manager.ActiveTabbedDocument == dockControl_2) { drawItemState |= DrawItemState.Focus; } } } if (this.dockControl_1 == dockControl_2) { drawItemState |= DrawItemState.HotLight; } if (!dockControl_2.Enabled) { drawItemState |= DrawItemState.Disabled; } bool drawSeparator = true; if (this.SelectedControl != null) { if (base.Controls.IndexOf(dockControl_2) == base.Controls.IndexOf(this.SelectedControl) - 1) { drawSeparator = false; } } Rectangle tabBounds = dockControl_2.TabBounds; if (this.Boolean_2 && dockControl_2.AllowClose) { tabBounds.Width -= 17; } if ((drawItemState & DrawItemState.Focus) != DrawItemState.Focus) { renderer.DrawDocumentStripTab(graphics, dockControl_2.TabBounds, tabBounds, dockControl_2.TabImage, dockControl_2.TabText, font_0, dockControl_2.BackColor, dockControl_2.ForeColor, drawItemState, drawSeparator); } else { using (Font font = new Font(font_0, FontStyle.Bold)) { renderer.DrawDocumentStripTab(graphics, dockControl_2.TabBounds, tabBounds, dockControl_2.TabImage, dockControl_2.TabText, font, dockControl_2.BackColor, dockControl_2.ForeColor, drawItemState, drawSeparator); } } }
protected internal virtual void Layout(RendererBase renderer, Graphics graphics, Rectangle bounds, bool floating) { Bounds = bounds; }
private void method_19(RendererBase renderer, Graphics g, Rectangle bounds) { int num = 0; int num2 = bounds.Width - (renderer.TabStripMetrics.Padding.Left + renderer.TabStripMetrics.Padding.Right); int[] array = new int[Controls.Count]; int num3 = 0; foreach (DockControl dockControl in Controls) { dockControl.bool_3 = false; int num4 = renderer.MeasureTabStripTab(g, dockControl.TabImage, dockControl.TabText, dockControl.Font, DrawItemState.Default).Width; if (dockControl.MinimumTabWidth != 0) { num4 = Math.Max(num4, dockControl.MinimumTabWidth); } if (dockControl.MaximumTabWidth != 0 && dockControl.MaximumTabWidth < num4) { num4 = dockControl.MaximumTabWidth; dockControl.bool_3 = true; } num += num4; array[num3++] = num4; } if (num > num2) { int num5 = num - num2; for (int i = 0; i < num3; i++) { array[i] -= (int)(num5 * (array[i] / (float)num)); Controls[i].bool_3 = true; } } bounds = renderer.TabStripMetrics.RemovePadding(bounds); int num6 = bounds.Left; num3 = 0; for (int j = 0; j < Controls.Count; j++) { DockControl dockControl2 = Controls[j]; BoxModel tabMetrics = renderer.TabMetrics; Rectangle rectangle_6 = new Rectangle(num6 + tabMetrics.Margin.Left, bounds.Top + tabMetrics.Margin.Top, tabMetrics.Padding.Left + array[num3] + tabMetrics.Padding.Right, bounds.Height - (tabMetrics.Margin.Top + tabMetrics.Margin.Bottom)); dockControl2.TabBounds = rectangle_6; num6 += rectangle_6.Width + tabMetrics.ExtraWidth; num3++; } }
internal void method_10(Graphics g, RendererBase renderer, DockButtonInfo class17_4, SandDockButtonType buttonType, bool bool_7) { if (!class17_4.Visible) return; var state = DrawItemState.Default; if (ClickedDockButton == class17_4) { state |= DrawItemState.HotLight; if (bool_2) { state |= DrawItemState.Selected; } } if (!bool_7) { state |= DrawItemState.Disabled; } renderer.DrawDocumentStripButton(g, class17_4.Bounds, buttonType, state); }
protected internal virtual void LayoutCollapsed(RendererBase renderer, Rectangle bounds) { rectangle_1 = bounds; rectangle_1.Offset(0, renderer.TitleBarMetrics.Margin.Top); rectangle_1.Height = renderer.TitleBarMetrics.Height - (renderer.TitleBarMetrics.Margin.Top + renderer.TitleBarMetrics.Margin.Bottom); method_17(); bounds.Offset(0, renderer.TitleBarMetrics.Height); bounds.Height -= renderer.TitleBarMetrics.Height; rectangle_3 = bounds; rectangle_2 = Rectangle.Empty; foreach (DockControl dockControl in Controls) { Rectangle bounds2 = renderer.AdjustDockControlClientBounds(this, dockControl, rectangle_3); dockControl.method_0(dockControl == _selectedControl); dockControl.Bounds = bounds2; } }
protected override void ApplyStandardColors() { if (SystemInformation.HighContrast) { if (false) { if (true) { goto label_8; } } else { do { this.LayoutBackgroundColor1 = SystemColors.Control; this.LayoutBackgroundColor2 = SystemColors.Control; this.x994b52371e1ca7a9 = SystemColors.ActiveCaption; do { this.xcee7f670c3cc8729 = SystemColors.ControlDark; }while (false); if (true) { this.x80caa5727f6ffe52 = SystemColors.Control; this.x0b2889b8ff5ec580 = SystemColors.Control; } else { goto label_7; } }while (false); if (true) { goto label_13; } else { goto label_22; } } } else { goto label_11; } label_3: this.x488edc060a6f4707 = SystemColors.ControlText; if (true) { return; } goto label_8; label_7: do { this.x5bdc84993d5749e9 = SystemColors.Highlight; this.xf6500c4730a3d95a = RendererBase.InterpolateColors(this.x5bdc84993d5749e9, SystemColors.Window, 0.7f); this.xfc7b03fc2744e317 = this.xf6500c4730a3d95a; this.x39abd2ac7b4ba43a = this.LayoutBackgroundColor2; if (true) { goto label_6; } label_4: this.xd1edc46cbe592968 = SystemColors.Control; this.x43b04232fee73e15 = SystemColors.ControlLightLight; if (false) { continue; } goto label_3; label_6: this.x5ab33f59f391d4a9 = RendererBase.InterpolateColors(SystemColors.Control, Color.Black, 0.03f); this.x6ea95002bd1a98a3 = Color.FromArgb(212, 213, 216); this.xef5a1f47abc9b7b1 = Color.FromArgb(212, 213, 216); this._x273909d58eb80850 = SystemColors.ControlDark; goto label_4; }while (false); label_8: this.x9196c174a89a4ce4 = SystemColors.ControlLightLight; this.x0e8b6412ec502dbf = SystemColors.Control; goto label_7; label_11: this.LayoutBackgroundColor1 = SystemColors.Control; if (true) { this.LayoutBackgroundColor2 = RendererBase.InterpolateColors(SystemColors.Control, SystemColors.Window, 0.8f); this.x994b52371e1ca7a9 = SystemColors.ControlDark; this.xcee7f670c3cc8729 = SystemColors.ControlDark; if (true) { this.x80caa5727f6ffe52 = SystemColors.ControlLightLight; if (true) { this.x0b2889b8ff5ec580 = SystemColors.Control; goto label_22; } else { goto label_14; } } } else { goto label_7; } label_13: this.x9196c174a89a4ce4 = SystemColors.Control; label_14: this.x0e8b6412ec502dbf = SystemColors.Control; goto label_7; label_22: if (true) { goto label_8; } }
internal override void vmethod_4(RendererBase renderer, Graphics g, Font font) { if (DockContainer == null) return; var container = DockContainer.Manager?.DockSystemContainer; foreach (Rectangle bounds in _splitterRects) renderer.DrawSplitter(container, DockContainer, g, bounds, _splitMode); foreach (LayoutSystemBase layoutSystem in LayoutSystems) { if (!(layoutSystem is ControlLayoutSystem) || !((ControlLayoutSystem)layoutSystem).Collapsed || !DockContainer.Boolean_6) { var clip = g.Clip; g.SetClip(layoutSystem.Bounds); layoutSystem.vmethod_4(renderer, g, font); g.Clip = clip; } } }
public void DrawTabControlTab( Graphics graphics, Rectangle bounds, Image image, string text, Font font, Color backColor, Color foreColor, DrawItemState state, bool drawSeparator) { int height = bounds.Height; if (((drawSeparator ? 1 : 0) & 0) != 0) { goto label_12; } else { goto label_62; } label_11: bounds.Inflate(-2, 0); label_12: bool flag1; if ((uint)flag1 >= 0U) { goto label_9; } else { goto label_13; } label_8: if (bounds.Width <= 4) { return; } if (flag1) { using (Font font1 = new Font(font, FontStyle.Bold)) { TextRenderer.DrawText((IDeviceContext)graphics, text, font1, bounds, foreColor, this.xae3b2752a89e7464); return; } } else { TextRenderer.DrawText((IDeviceContext)graphics, text, font, bounds, foreColor, this.xae3b2752a89e7464); return; } label_9: if (image == null) { goto label_8; } label_10: Rectangle destRect = new Rectangle(bounds.X, bounds.Y + bounds.Height / 2 - image.Height / 2, image.Width, image.Height); graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); bounds.X += image.Width + 4; bounds.Width -= image.Width + 4; goto label_8; label_13: if ((uint)drawSeparator + (uint)flag1 <= uint.MaxValue) { if ((uint)drawSeparator - (uint)flag1 <= uint.MaxValue) { goto label_10; } else { goto label_47; } } else { goto label_40; } label_19: Color color1 = this.x62b1822fa10e8658; label_20: using (Pen pen1 = new Pen(color1)) { graphics.DrawLines(pen1, this.x23c99552401d90a0(bounds, true)); while (!flag1) { Color color2 = RendererBase.InterpolateColors(this.x31d8d8063d8f3c74, this.x68e7227781326461, 0.5f); if (((flag1 ? 1 : 0) | int.MinValue) != 0) { using (Pen pen2 = new Pen(color2)) { graphics.DrawLines(pen2, new System.Drawing.Point[3] { new System.Drawing.Point(bounds.Right - 4, bounds.Y + 1), new System.Drawing.Point(bounds.Right - 2, bounds.Y + 3), new System.Drawing.Point(bounds.Right - 2, bounds.Bottom - 2) }); break; } } } } Color color3; if (flag1) { using (Pen pen = new Pen(color3)) graphics.DrawLine(pen, bounds.X + 1, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1); } SmoothingMode smoothingMode; graphics.SmoothingMode = smoothingMode; if ((state & DrawItemState.Checked) == DrawItemState.Checked) { goto label_17; } label_15: bounds.X += this.TabControlTabExtra + 6; bounds.Width -= this.TabControlTabExtra + 6; goto label_11; label_17: Rectangle rectangle = bounds; if (true) { rectangle.X += this.TabControlTabExtra; rectangle.Width -= this.TabControlTabExtra; rectangle.Inflate(-4, -3); ++rectangle.X; ++rectangle.Height; if ((uint)flag1 >= 0U) { ControlPaint.DrawFocusRectangle(graphics, rectangle); goto label_15; } else { goto label_12; } } else if (((flag1 ? 1 : 0) & 0) == 0) { goto label_19; } label_39: if (flag1) { goto label_19; } label_40: color1 = this.x31d8d8063d8f3c74; goto label_20; label_42: using (Pen pen = new Pen(!flag1 ? this.x68e7227781326461 : this.xd9caa88fffee2844)) { graphics.DrawLines(pen, this.x23c99552401d90a0(bounds, false)); goto label_39; } label_47: Color color1_1; using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(bounds, color1_1, color3, LinearGradientMode.Vertical)) graphics.FillPolygon((Brush)linearGradientBrush, this.x23c99552401d90a0(bounds, false)); smoothingMode = graphics.SmoothingMode; graphics.SmoothingMode = SmoothingMode.AntiAlias; if ((uint)flag1 - (uint)drawSeparator <= uint.MaxValue) { goto label_42; } label_58: Color color4; if (!flag1) { color4 = this.x51e4f0f96f7fc653; goto label_60; } label_59: color4 = this.x6cefc7bb40cf5d76; label_60: color1_1 = color4; color3 = (uint)drawSeparator - (uint)drawSeparator < 0U || !flag1 ? this.xb9bbdee8e645fa7b : this.x05d7ee48911d8dba; if (this.TabColorBlend <= 0.0) { if (false) { return; } goto label_47; } else { color1_1 = RendererBase.InterpolateColors(color1_1, backColor, (float)this.TabColorBlend); color3 = RendererBase.InterpolateColors(color3, backColor, (float)this.TabColorBlend); goto label_47; } label_62: bool flag2; if ((uint)flag2 - (uint)drawSeparator >= 0U) { flag1 = (state & DrawItemState.Selected) == DrawItemState.Selected; if (false) { if (true) { goto label_59; } else { goto label_58; } } else if (false) { goto label_11; } else { goto label_58; } } else { goto label_42; } }
protected internal override void Layout(RendererBase renderer, Graphics graphics, Rectangle bounds, bool floating) { base.Layout(renderer, graphics, bounds, floating); this.method_21(renderer, graphics, this.rectangle_2); this.method_22(renderer, graphics, this.rectangle_2); }
internal override void vmethod_4(RendererBase renderer, Graphics g, Font font) { renderer.DrawDocumentStripBackground(g, this.rectangle_2); renderer.DrawDocumentClientBackground(g, this.rectangle_3, SelectedControl == null ? SystemColors.Control : this.SelectedControl.BackColor); Region clip = g.Clip; Rectangle rectangle_ = this.rectangle_2; rectangle_.X += this.LeftPadding; rectangle_.Width -= this.LeftPadding; rectangle_.Width -= this.RightPadding; g.SetClip(rectangle_); for (int i = base.Controls.Count - 1; i >= 0; i--) { DockControl dockControl = base.Controls[i]; this.method_20(renderer, g, dockControl.Font, dockControl); } if (this.SelectedControl != null) { this.method_20(renderer, g, this.SelectedControl.Font, this.SelectedControl); } if (this.Boolean_2) { base.method_10(g, renderer, this.class17_6, SandDockButtonType.Close, true); } g.Clip = clip; if (!this.Boolean_2) { base.method_10(g, renderer, this.class17_6, SandDockButtonType.Close, true); } base.method_10(g, renderer, this.class17_5, SandDockButtonType.ScrollRight, this.class17_5.bool_1); base.method_10(g, renderer, this.class17_4, SandDockButtonType.ScrollLeft, this.class17_4.bool_1); base.method_10(g, renderer, this.class17_7, SandDockButtonType.ActiveFiles, true); }
private void method_22(RendererBase renderer, Graphics graphics, Rectangle rectangle_5) { int num = 3; foreach (DockControl dockControl in base.Controls) { dockControl.bool_3 = false; DrawItemState drawItemState = DrawItemState.Default; if (this.SelectedControl == dockControl) { drawItemState |= DrawItemState.Selected; if (base.DockContainer.Manager != null) { if (base.DockContainer.Manager.ActiveTabbedDocument == dockControl) { drawItemState |= DrawItemState.Focus; } } } int num2 = renderer.MeasureDocumentStripTab(graphics, dockControl.TabImage, dockControl.TabText, dockControl.Font, drawItemState).Width; if (this.Boolean_2 && dockControl.AllowClose) { num2 += 17; } if (dockControl.MinimumTabWidth != 0) { num2 = Math.Max(num2, dockControl.MinimumTabWidth); } if (dockControl.MaximumTabWidth != 0 && dockControl.MaximumTabWidth < num2) { num2 = dockControl.MaximumTabWidth; dockControl.bool_3 = true; } dockControl.TabBounds = new Rectangle(num, rectangle_5.Bottom - renderer.DocumentTabSize, num2, renderer.DocumentTabSize); num += num2 - renderer.DocumentTabExtra + 1; } if (base.Controls.Count != 0) { num += renderer.DocumentTabExtra; } num += 3; int num3 = rectangle_5.Width - this.LeftPadding - this.RightPadding; this.int_8 = num - num3; if (this.int_8 < 0) { this.int_8 = 0; } if (this.int_7 > this.int_8) { this.int_7 = this.int_8; } this.class17_4.bool_1 = (this.int_7 > 0); this.class17_5.bool_1 = (this.int_7 < this.int_8); foreach (DockControl dockControl2 in base.Controls) { Rectangle rectangle_6 = dockControl2.TabBounds; rectangle_6.Offset(rectangle_5.Left + this.LeftPadding - this.int_7, 0); dockControl2.TabBounds = rectangle_6; } if (this.Boolean_2 && this.SelectedControl != null && this.SelectedControl.AllowClose) { this.class17_6.Visible = true; Rectangle rectangle_7 = this.SelectedControl.TabBounds; this.class17_6.Bounds = new Rectangle(rectangle_7.Right - 17, rectangle_7.Top + 2, 14, rectangle_7.Height - 3); } }
private void method_21(RendererBase rendere, Graphics graphics, Rectangle rectangle_5) { int y = rectangle_5.Top + rectangle_5.Height / 2 - 7; int num = rectangle_5.Right - 2; if (this.SelectedControl != null && this.SelectedControl.AllowClose && !this.Boolean_2) { this.class17_6.Visible = true; this.class17_6.Bounds = new Rectangle(num - 14, y, 14, 15); num -= 15; } else { this.class17_6.Visible = false; } this.class17_5.Visible = false; this.class17_4.Visible = false; this.class17_7.Visible = false; switch (this.DocumentOverflowMode_0) { case DocumentOverflowMode.Scrollable: this.class17_5.Visible = true; this.class17_5.Bounds = new Rectangle(num - 14, y, 14, 15); num -= 15; this.class17_4.Visible = true; this.class17_4.Bounds = new Rectangle(num - 14, y, 14, 15); num -= 15; return; case DocumentOverflowMode.Menu: this.class17_7.Visible = true; this.class17_7.Bounds = new Rectangle(num - 14, y, 14, 15); num -= 15; return; default: return; } }
internal abstract void vmethod_4(RendererBase renderer, Graphics g, Font font);
protected override void ApplyStandardColors() { if (!SystemInformation.HighContrast) { goto label_11; } else { goto label_9; } label_2: while (true) { if (true) { goto label_4; } label_1: this.x4dea88af4363a77b = SystemColors.ControlLightLight; if (true) { return; } continue; label_4: this.x9a7470f809ffee0d = SystemColors.InactiveCaptionText; this.x693536a88ebe8191 = Color.Transparent; this.x503b1fd8602da9a9 = SystemColors.ControlLightLight; this.xb2b9c364e92661dd = Color.Transparent; this.x4056384aa48da1d1 = SystemColors.ControlLightLight; this.x2e1ef9b84f7ac14b = SystemInformation.HighContrast ? Color.Transparent : Color.FromArgb(100, SystemColors.Control); goto label_1; } goto label_10; label_7: this.xd1edc46cbe592968 = SystemColors.Control; this.x43b04232fee73e15 = this.xd1edc46cbe592968; this.x2d5bde28a1e8ae90 = SystemColors.ActiveCaption; this.xebb7eaf00d600976 = SystemColors.ActiveCaption; this.x6b97fa649c9b3a44 = SystemColors.ActiveCaptionText; if (true) { this.x8e2e7f87608d5b3b = SystemColors.InactiveCaption; goto label_2; } else { goto label_2; } label_9: this.LayoutBackgroundColor1 = SystemColors.Control; this.LayoutBackgroundColor2 = SystemColors.Control; this.ActiveDocumentBorderColor = SystemColors.ActiveCaption; label_10: this.InactiveDocumentBorderColor = SystemColors.ControlDark; goto label_7; label_11: this.LayoutBackgroundColor1 = SystemColors.Control; this.LayoutBackgroundColor2 = RendererBase.InterpolateColors(SystemColors.Control, SystemColors.Window, 0.8f); this.ActiveDocumentBorderColor = SystemColors.AppWorkspace; if (true) { goto label_8; } label_6: this.InactiveDocumentBorderColor = SystemColors.ControlDark; goto label_7; label_8: if (true) { if (true) { goto label_6; } else { goto label_2; } } else { goto label_9; } }
internal override void vmethod_4(RendererBase renderer, Graphics g, Font font) { if (DockContainer == null) return; var container = DockContainer.IsFloating || DockContainer.Manager?.DockSystemContainer == null ? DockContainer : DockContainer.Manager.DockSystemContainer; bool focused; if (IsInContainer && DockContainer.IsInDesign) { var selectionService = (ISelectionService)DockContainer.method_1(typeof(ISelectionService)); focused = selectionService.GetComponentSelected(SelectedControl); } else { focused = Boolean_1; } renderer.DrawControlClientBackground(g, rectangle_3,SelectedControl?.BackColor ?? SystemColors.Control); if ((Controls.Count > 1 || DockContainer.IsInDesign) && rectangle_2 != Rectangle.Empty) { int selectedTabOffset = 0; if (_selectedControl != null) { Rectangle rectangle_ = _selectedControl.TabBounds; selectedTabOffset = rectangle_.X - Bounds.Left; } renderer.DrawTabStripBackground(container, DockContainer, g, rectangle_2, selectedTabOffset); foreach (DockControl dockControl in Controls) { DrawItemState drawItemState = DrawItemState.Default; if (_selectedControl == dockControl) { drawItemState |= DrawItemState.Selected; } bool drawSeparator = true; if (_selectedControl != null) { if (Controls.IndexOf(dockControl) == Controls.IndexOf(_selectedControl) - 1) { drawSeparator = false; } } if (Controls.IndexOf(dockControl) == Controls.Count - 1 && renderer is WhidbeyRenderer) { drawSeparator = false; } renderer.DrawTabStripTab(g, dockControl.TabBounds, dockControl.CollapsedImage, dockControl.TabText, dockControl.Font, dockControl.BackColor, dockControl.ForeColor, drawItemState, drawSeparator); } } Rectangle rectangle = rectangle_1; if (rectangle != Rectangle.Empty && rectangle.Width > 0 && rectangle.Height > 0) { renderer.DrawTitleBarBackground(g, rectangle, focused); if (_closeDockButton.Visible) { rectangle.Width -= 21; } if (_pinDockButton.Visible) { rectangle.Width -= 21; } if (_positionDockButton.Visible) { rectangle.Width -= 21; } rectangle = renderer.TitleBarMetrics.RemovePadding(rectangle); if (rectangle.Width > 8) { renderer.DrawTitleBarText(g, rectangle, focused, (_selectedControl == null) ? "Empty Layout System" : _selectedControl.Text, (_selectedControl != null) ? _selectedControl.Font : DockContainer.Font); } if (_closeDockButton.Visible && _closeDockButton.Bounds.Left > rectangle_1.Left) { DrawItemState drawItemState2 = DrawItemState.Default; if (ClickedDockButton == _closeDockButton) { drawItemState2 |= DrawItemState.HotLight; if (bool_2) { drawItemState2 |= DrawItemState.Selected; } } renderer.DrawTitleBarButton(g, _closeDockButton.Bounds, SandDockButtonType.Close, drawItemState2, focused, false); } if (_pinDockButton.Visible && _pinDockButton.Bounds.Left > rectangle_1.Left) { DrawItemState drawItemState2 = DrawItemState.Default; if (ClickedDockButton == _pinDockButton) { drawItemState2 |= DrawItemState.HotLight; if (bool_2) { drawItemState2 |= DrawItemState.Selected; } } renderer.DrawTitleBarButton(g, _pinDockButton.Bounds, SandDockButtonType.Pin, drawItemState2, focused, Collapsed); } if (_positionDockButton.Visible && _positionDockButton.Bounds.Left > rectangle_1.Left) { DrawItemState drawItemState2 = DrawItemState.Default; if (ClickedDockButton == _positionDockButton) { drawItemState2 |= DrawItemState.HotLight; if (bool_2) { drawItemState2 |= DrawItemState.Selected; } } renderer.DrawTitleBarButton(g, _positionDockButton.Bounds, SandDockButtonType.WindowPosition, drawItemState2, focused, false); } } }
public void DrawTabControlBackground( Graphics graphics, Rectangle bounds, Color backColor, bool client) { if (bounds.Width <= 0) { return; } if (((client ? 1 : 0) | -1) != 0) { goto label_54; } label_12: Rectangle rect1; Color color1; Color color2; if (rect1.Height > 0) { using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(rect1, color2, color1, LinearGradientMode.Vertical)) graphics.FillRectangle((Brush)linearGradientBrush, rect1); } label_13: Rectangle rect2 = bounds; rect2.Y = rect2.Bottom - this.TabControlPadding.Height; rect2.Height = this.TabControlPadding.Height; label_14: using (SolidBrush solidBrush = new SolidBrush(color1)) graphics.FillRectangle((Brush)solidBrush, rect2); using (Pen pen = new Pen(this.x68e7227781326461)) { graphics.DrawLine(pen, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 2); graphics.DrawLine(pen, bounds.X, bounds.Bottom - 2, bounds.Right - 2, bounds.Bottom - 2); graphics.DrawLine(pen, bounds.Right - 2, bounds.Bottom - 2, bounds.Right - 2, bounds.Y); } using (Pen pen = new Pen(RendererBase.InterpolateColors(this.x68e7227781326461, SystemColors.Control, 0.8f))) { graphics.DrawLine(pen, bounds.X, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1); graphics.DrawLine(pen, bounds.Right - 1, bounds.Bottom - 1, bounds.Right - 1, bounds.Y); return; } label_54: while (bounds.Height > 0) { label_53: color2 = Color.FromArgb(252, 252, 254); color1 = Color.FromArgb(244, 243, 238); if (this.PageColorBlend > 0.0) { goto label_50; } label_42: while (!client) { if ((uint)client - (uint)client >= 0U) { label_37: if (false) { goto label_38; } label_32: Rectangle rect3 = bounds; if ((uint)client + (uint)client >= 0U) { if ((uint)client >= 0U) { rect3.Height = this.TabControlPadding.Height; if (true) { using (SolidBrush solidBrush = new SolidBrush(color2)) graphics.FillRectangle((Brush)solidBrush, rect3); rect1 = bounds; } if (true) { rect1.Y += this.TabControlPadding.Height; rect1.Height -= this.TabControlPadding.Height * 2; } if (true) { goto label_40; } else { goto label_37; } } else { goto label_50; } } else { goto label_14; } label_38: if ((uint)client - (uint)client <= uint.MaxValue) { if (true) { goto label_32; } } else { continue; } label_40: if (true) { if (rect1.Width > 0) { goto label_12; } else { goto label_13; } } else if ((uint)client <= uint.MaxValue) { goto label_13; } else { goto label_38; } } else { goto label_13; } } label_44: using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(bounds, color2, color1, LinearGradientMode.Vertical)) { graphics.FillRectangle((Brush)linearGradientBrush, bounds); break; } label_50: color2 = RendererBase.InterpolateColors(color2, backColor, (float)this.PageColorBlend); color1 = RendererBase.InterpolateColors(color1, backColor, (float)this.PageColorBlend); if ((uint)client - (uint)client >= 0U) { if (true) { if (true) { goto label_42; } else { goto label_44; } } else if (false) { goto label_53; } } else { goto label_13; } } }
protected virtual void CalculateLayout(RendererBase renderer, Rectangle bounds, bool floating, out Rectangle titlebarBounds, out Rectangle tabstripBounds, out Rectangle clientBounds, out Rectangle joinCatchmentBounds) { if (floating) { titlebarBounds = Rectangle.Empty; } else { titlebarBounds = bounds; titlebarBounds.Offset(0, renderer.TitleBarMetrics.Margin.Top); titlebarBounds.Height = renderer.TitleBarMetrics.Height - (renderer.TitleBarMetrics.Margin.Top + renderer.TitleBarMetrics.Margin.Bottom); method_17(); bounds.Offset(0, renderer.TitleBarMetrics.Height); bounds.Height -= renderer.TitleBarMetrics.Height; } if (Controls.Count <= 1 && !DockContainer.IsInDesign) { tabstripBounds = Rectangle.Empty; } else { tabstripBounds = bounds; tabstripBounds.Y = tabstripBounds.Bottom - renderer.TabStripMetrics.Height; tabstripBounds.Height = renderer.TabStripMetrics.Height; tabstripBounds = renderer.TabStripMetrics.RemoveMargin(tabstripBounds); bounds.Height -= renderer.TabStripMetrics.Height; } clientBounds = bounds; joinCatchmentBounds = titlebarBounds; }
protected internal override void Layout(RendererBase renderer, Graphics graphics, Rectangle bounds, bool floating) { base.Layout(renderer, graphics, bounds, floating); int num; LayoutSystemBase[] array = method_9(out num); if (num != 0) { if (num > 1) { floating = false; } int num2 = (_splitMode == Orientation.Horizontal) ? (bounds.Height - (num - 1) * 4) : (bounds.Width - (num - 1) * 4); float num3 = 0f; for (int i = 0; i < num; i++) { num3 += ((_splitMode == Orientation.Horizontal) ? array[i].WorkingSize.Height : array[i].WorkingSize.Width); } _splitterRects.Clear(); if (num2 > 0) { SizeF[] array2 = new SizeF[num]; for (int j = 0; j < num; j++) { array2[j] = array[j].WorkingSize; } if (num2 != num3) { float num4 = num2 - num3; for (int k = 0; k < num; k++) { float num5 = (_splitMode != Orientation.Horizontal) ? array2[k].Width : array2[k].Height; num5 += num4 * (num5 / num3); if (_splitMode != Orientation.Horizontal) { array2[k].Width = num5; } else { array2[k].Height = num5; } } num3 = 0f; for (int l = 0; l < num; l++) { num3 += ((_splitMode == Orientation.Horizontal) ? array2[l].Height : array2[l].Width); } num4 = num2 - num3; if (_splitMode != Orientation.Horizontal) { SizeF[] expr_1AE_cp_0 = array2; int expr_1AE_cp_1 = 0; expr_1AE_cp_0[expr_1AE_cp_1].Width = expr_1AE_cp_0[expr_1AE_cp_1].Width + num4; } else { SizeF[] expr_1C6_cp_0 = array2; int expr_1C6_cp_1 = 0; expr_1C6_cp_0[expr_1C6_cp_1].Height = expr_1C6_cp_0[expr_1C6_cp_1].Height + num4; } } int num6 = (_splitMode != Orientation.Horizontal) ? bounds.X : bounds.Y; for (int m = 0; m < num; m++) { int num7 = (_splitMode != Orientation.Horizontal) ? Convert.ToInt32(array2[m].Width) : Convert.ToInt32(array2[m].Height); num7 = Math.Max(num7, 4); if (_splitMode == Orientation.Horizontal) { if (m == num - 1) { num7 = bounds.Bottom - num6; } array[m].Layout(renderer, graphics, new Rectangle(bounds.X, num6, bounds.Width, num7), floating); } else { if (m == num - 1) { num7 = bounds.Right - num6; } array[m].Layout(renderer, graphics, new Rectangle(num6, bounds.Y, num7, bounds.Height), floating); } num6 += num7 + 4; } for (int n = 0; n < num - 1; n++) { bounds = array[n].Bounds; if (_splitMode != Orientation.Horizontal) { bounds.Offset(bounds.Width, 0); bounds.Width = 4; } else { bounds.Offset(0, bounds.Height); bounds.Height = 4; } _splitterRects.Add(bounds); } } } }
protected internal override void Layout(RendererBase renderer, Graphics graphics, Rectangle bounds, bool floating) { base.Layout(renderer, graphics, bounds, floating); method_18(); if (Collapsed && DockContainer.Boolean_6) return; CalculateLayout(renderer, bounds, floating, out rectangle_1, out rectangle_2, out rectangle_3, out rectangle_4); bool_4 = true; try { if (rectangle_1 != Rectangle.Empty) { method_17(); } method_19(renderer, graphics, rectangle_2); foreach (DockControl dockControl in Controls) { if (dockControl != SelectedControl) { dockControl.method_0(false); } } foreach (DockControl dockControl2 in Controls) { if (dockControl2 == SelectedControl) { Rectangle bounds2 = renderer.AdjustDockControlClientBounds(this, dockControl2, rectangle_3); dockControl2.Bounds = bounds2; dockControl2.method_0(true); } } } finally { bool_4 = false; } }