Пример #1
0
        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);
        }
Пример #2
0
        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)
                {
                    ;
                }
            }
        }
Пример #3
0
        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;
                }
            }
        }
Пример #4
0
        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;
            }
        }
Пример #5
0
        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;
            }
        }
Пример #6
0
        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;
            }
        }