xebe00acade2e10a1.cs
上传用户:xlxx0122
上传日期:2015-04-24
资源大小:3904k
文件大小:30k
源码类别:

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     using System.Drawing.Drawing2D;
  6.     using System.Drawing.Imaging;
  7.     using System.Windows.Forms;
  8.     internal class xebe00acade2e10a1 : ToolStripRenderer
  9.     {
  10.         private ToolStripProfessionalRenderer x0f4884030a491f49 = new ToolStripProfessionalRenderer();
  11.         private ImageAttributes x233f092c536593eb = new ImageAttributes();
  12.         private ToolStripSystemRenderer x4b7855aec919b975 = new ToolStripSystemRenderer();
  13.         private SkinEngine xdc87e2b99332cd4a;
  14.         public xebe00acade2e10a1(SkinEngine engine)
  15.         {
  16.             this.xdc87e2b99332cd4a = engine;
  17.             this.x233f092c536593eb.SetWrapMode(WrapMode.Tile);
  18.         }
  19.         protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
  20.         {
  21.             this.x0f4884030a491f49.DrawArrow(e);
  22.         }
  23.         protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e)
  24.         {
  25.             this.x11d38b1ae9f5b99b(e);
  26.         }
  27.         protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs e)
  28.         {
  29.             this.x11d38b1ae9f5b99b(e);
  30.             if (e.Item is ToolStripDropDownButton)
  31.             {
  32.                 ToolStripDropDownButton item = (ToolStripDropDownButton) e.Item;
  33.                 if (item.ShowDropDownArrow)
  34.                 {
  35.                     Brush brush;
  36.                     Rectangle rect = new Rectangle(e.Item.ContentRectangle.Right, e.Item.ContentRectangle.Top, e.Item.Width - e.Item.ContentRectangle.Width, e.Item.Height);
  37.                     rect.X++;
  38.                     rect.Width -= 4;
  39.                     rect.Y -= 2;
  40.                     rect.Height--;
  41.                     if (e.Item.Selected)
  42.                     {
  43.                         brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  44.                         e.Graphics.FillRectangle(brush, rect);
  45.                         using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  46.                         {
  47.                             e.Graphics.DrawLine(pen, rect.Left, rect.Bottom, rect.Right, rect.Bottom);
  48.                             e.Graphics.DrawLine(pen, rect.Left, rect.Top, rect.Right, rect.Top);
  49.                             e.Graphics.DrawLine(pen, rect.Right, rect.Top, rect.Right, rect.Bottom);
  50.                         }
  51.                     }
  52.                     if (e.Item.Pressed)
  53.                     {
  54.                         brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  55.                         e.Graphics.FillRectangle(brush, rect);
  56.                         using (Pen pen2 = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  57.                         {
  58.                             e.Graphics.DrawLine(pen2, rect.Left, rect.Bottom, rect.Right, rect.Bottom);
  59.                             e.Graphics.DrawLine(pen2, rect.Left, rect.Top, rect.Right, rect.Top);
  60.                             e.Graphics.DrawLine(pen2, rect.Right, rect.Top, rect.Right, rect.Bottom);
  61.                         }
  62.                     }
  63.                     if (!e.Item.Selected && !e.Item.Pressed)
  64.                     {
  65.                         this.xf2f6451a5d77af97(item, e);
  66.                     }
  67.                 }
  68.             }
  69.         }
  70.         protected override void OnRenderGrip(ToolStripGripRenderEventArgs e)
  71.         {
  72.             this.x0f4884030a491f49.DrawGrip(e);
  73.         }
  74.         protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
  75.         {
  76.             this.x0f4884030a491f49.DrawItemCheck(e);
  77.         }
  78.         protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
  79.         {
  80.             if (e.Item is ToolStripMenuItem)
  81.             {
  82.                 ToolStripMenuItem item = (ToolStripMenuItem) e.Item;
  83.                 if (item.Owner is MenuStrip)
  84.                 {
  85.                     if (item.Pressed || item.Selected)
  86.                     {
  87.                         e.TextColor = this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOPSELECTEDMENUFONTCOLOR;
  88.                     }
  89.                     else
  90.                     {
  91.                         e.TextColor = this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOPMENUFONTCOLOR;
  92.                     }
  93.                 }
  94.                 else if (item.Pressed || item.Selected)
  95.                 {
  96.                     e.TextColor = this.xdc87e2b99332cd4a.Res.Colors.SKIN2_SELECTEDMENUFONTCOLOR;
  97.                 }
  98.                 else
  99.                 {
  100.                     e.TextColor = this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUITEMFONTCOLOR;
  101.                 }
  102.                 this.x4b7855aec919b975.DrawItemText(e);
  103.             }
  104.             else
  105.             {
  106.                 this.x0f4884030a491f49.DrawItemText(e);
  107.             }
  108.         }
  109.         protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
  110.         {
  111.             Brush brush;
  112.             if ((((e.Item.OwnerItem == null) && (e.ToolStrip != null)) && ((e.ToolStrip.BackgroundImage != null) && !e.Item.Pressed)) && !e.Item.Selected)
  113.             {
  114.                 base.OnRenderMenuItemBackground(e);
  115.                 if (e.Item.BackgroundImage == null)
  116.                 {
  117.                     return;
  118.                 }
  119.             }
  120.             if (!(e.Item is ToolStripMenuItem))
  121.             {
  122.                 this.x0f4884030a491f49.DrawMenuItemBackground(e);
  123.                 return;
  124.             }
  125.             ToolStripMenuItem item = (ToolStripMenuItem) e.Item;
  126.             Rectangle rect = new Rectangle(0, 0, item.Width, item.Height);
  127.             if (item.Owner is MenuStrip)
  128.             {
  129.                 rect.X += 2;
  130.                 rect.Width -= 3;
  131.                 if (!item.Pressed && !item.Selected)
  132.                 {
  133.                     goto Label_032B;
  134.                 }
  135.                 brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOPSELECTEDMENUCOLOR;
  136.                 e.Graphics.FillRectangle(brush, rect);
  137.                 using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOPSELECTEDMENUBORDERCOLOR))
  138.                 {
  139.                     e.Graphics.DrawRectangle(pen, new Rectangle(2, 0, rect.Width - 1, rect.Height - 1));
  140.                     goto Label_032B;
  141.                 }
  142.             }
  143.             rect.X += 2;
  144.             rect.Width -= 3;
  145.             if (item.Pressed || item.Selected)
  146.             {
  147.                 brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_SELECTEDMENUCOLOR;
  148.             }
  149.             else
  150.             {
  151.                 brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_MENUITEMCOLOR;
  152.             }
  153.             e.Graphics.FillRectangle(brush, rect);
  154.             if (item.Selected && item.Enabled)
  155.             {
  156.                 brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_SELECTEDMENUCOLOR;
  157.                 e.Graphics.FillRectangle(brush, rect.X, rect.Y, 0x1a, rect.Height);
  158.                 using (Pen pen2 = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_SELECTEDMENUBORDERCOLOR))
  159.                 {
  160.                     e.Graphics.DrawRectangle(pen2, new Rectangle(2, 0, rect.Width - 1, rect.Height - 1));
  161.                     goto Label_032B;
  162.                 }
  163.             }
  164.             if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR)
  165.             {
  166.                 using (LinearGradientBrush brush2 = new LinearGradientBrush(new Rectangle(rect.X, rect.Y, 0x1a, rect.Height), this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR, LinearGradientMode.Horizontal))
  167.                 {
  168.                     e.Graphics.FillRectangle(brush2, rect.X, rect.Y, 0x1a, rect.Height);
  169.                     goto Label_032B;
  170.                 }
  171.             }
  172.             e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_LEFTBARSTARTCOLOR, rect.X, rect.Y, 0x1a, rect.Height);
  173.         Label_032B:
  174.             if (!item.Selected && !item.Pressed)
  175.             {
  176.                 this.xf2f6451a5d77af97(item, e);
  177.             }
  178.         }
  179.         protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e)
  180.         {
  181.             if (e.Item is ToolStripOverflowButton)
  182.             {
  183.                 Rectangle rectangle;
  184.                 Brush brush;
  185.                 ToolStripOverflowButton item = (ToolStripOverflowButton) e.Item;
  186.                 if (e.ToolStrip.Orientation == Orientation.Horizontal)
  187.                 {
  188.                     rectangle = Rectangle.FromLTRB(item.Size.Width - 10, 0, item.Size.Width, item.Size.Height);
  189.                 }
  190.                 else
  191.                 {
  192.                     rectangle = Rectangle.FromLTRB(0, item.Size.Height - 10, item.Size.Width, item.Size.Height);
  193.                 }
  194.                 using (brush = new SolidBrush(this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUITEMCOLOR))
  195.                 {
  196.                     e.Graphics.FillRectangle(brush, rectangle);
  197.                 }
  198.                 if (item.Selected)
  199.                 {
  200.                     brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  201.                     e.Graphics.FillRectangle(brush, rectangle);
  202.                 }
  203.                 if (item.Pressed)
  204.                 {
  205.                     brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARDOWNCOLOR;
  206.                     e.Graphics.FillRectangle(brush, rectangle);
  207.                 }
  208.                 if (!e.Item.Selected && !e.Item.Pressed)
  209.                 {
  210.                     this.xf2f6451a5d77af97(e.Item, e);
  211.                 }
  212.                 rectangle = Rectangle.FromLTRB(item.Size.Width - 10, item.Size.Height - 10, item.Size.Width, item.Size.Height);
  213.                 if (e.ToolStrip.Orientation == Orientation.Horizontal)
  214.                 {
  215.                     e.Graphics.DrawLine(Pens.Black, rectangle.Left + 3, rectangle.Top, rectangle.Right - 3, rectangle.Top);
  216.                     ToolStripArrowRenderEventArgs args = new ToolStripArrowRenderEventArgs(e.Graphics, item, rectangle, Color.Black, ArrowDirection.Down);
  217.                     this.x0f4884030a491f49.DrawArrow(args);
  218.                 }
  219.                 else
  220.                 {
  221.                     e.Graphics.DrawLine(Pens.Black, rectangle.Left, rectangle.Top + 3, rectangle.Left, rectangle.Bottom - 3);
  222.                     ToolStripArrowRenderEventArgs args2 = new ToolStripArrowRenderEventArgs(e.Graphics, item, rectangle, Color.Black, ArrowDirection.Right);
  223.                     this.x0f4884030a491f49.DrawArrow(args2);
  224.                 }
  225.             }
  226.         }
  227.         protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e)
  228.         {
  229.             if (!(e.Item is ToolStripSeparator))
  230.             {
  231.                 this.x0f4884030a491f49.DrawSeparator(e);
  232.                 return;
  233.             }
  234.             ToolStripSeparator item = (ToolStripSeparator) e.Item;
  235.             if (!(item.Owner is ToolStripDropDownMenu))
  236.             {
  237.                 goto Label_01AB;
  238.             }
  239.             Rectangle rect = new Rectangle(0, 0, item.Width, item.Height);
  240.             Brush brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_MENUITEMCOLOR;
  241.             e.Graphics.FillRectangle(brush, rect);
  242.             if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR)
  243.             {
  244.                 using (LinearGradientBrush brush2 = new LinearGradientBrush(new Rectangle(rect.X, rect.Y, 0x1a, rect.Height), this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR, LinearGradientMode.Horizontal))
  245.                 {
  246.                     e.Graphics.FillRectangle(brush2, rect.X, rect.Y, 0x1a, rect.Height);
  247.                     goto Label_014B;
  248.                 }
  249.             }
  250.             e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_LEFTBARSTARTCOLOR, rect.X, rect.Y, 0x1a, rect.Height);
  251.         Label_014B:
  252.             using (Pen pen = new Pen(Color.FromArgb(0x84, 130, 0x84), 1f))
  253.             {
  254.                 e.Graphics.DrawLine(pen, (rect.Left + 0x1a) + 4, rect.Top + 2, rect.Right, rect.Top + 2);
  255.                 return;
  256.             }
  257.         Label_01AB:
  258.             this.x0f4884030a491f49.DrawSeparator(e);
  259.         }
  260.         protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e)
  261.         {
  262.             this.x11d38b1ae9f5b99b(e);
  263.             Rectangle arrowRectangle = Rectangle.FromLTRB(e.Item.ContentRectangle.Right - 10, e.Item.ContentRectangle.Top, e.Item.ContentRectangle.Right, e.Item.ContentRectangle.Bottom);
  264.             if (e.Item.Selected && !e.Item.Pressed)
  265.             {
  266.                 using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  267.                 {
  268.                     e.Graphics.DrawLine(pen, arrowRectangle.Left, arrowRectangle.Top - 1, arrowRectangle.Left, arrowRectangle.Bottom);
  269.                 }
  270.             }
  271.             if (!e.Item.Selected && !e.Item.Pressed)
  272.             {
  273.                 this.xf2f6451a5d77af97(e.Item, e);
  274.             }
  275.             ToolStripArrowRenderEventArgs args = new ToolStripArrowRenderEventArgs(e.Graphics, e.Item, arrowRectangle, Color.Black, ArrowDirection.Down);
  276.             this.x0f4884030a491f49.DrawArrow(args);
  277.         }
  278.         protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
  279.         {
  280.             if (e.ToolStrip.BackgroundImage != null)
  281.             {
  282.                 this.xa8c2e639f6764635(e.ToolStrip.BackgroundImage, e);
  283.             }
  284.             else
  285.             {
  286.                 Brush brush;
  287.                 if (e.ToolStrip is MenuStrip)
  288.                 {
  289.                     Bitmap image = this.xdc87e2b99332cd4a.Res.Bitmaps.SKIN2_MENUBAR;
  290.                     if (image != null)
  291.                     {
  292.                         e.Graphics.DrawImage(image, e.AffectedBounds, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  293.                     }
  294.                     else
  295.                     {
  296.                         if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUBARENDCOLOR)
  297.                         {
  298.                             using (brush = new LinearGradientBrush(e.AffectedBounds, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_MENUBARENDCOLOR, LinearGradientMode.Vertical))
  299.                             {
  300.                                 e.Graphics.FillRectangle(brush, e.AffectedBounds);
  301.                                 return;
  302.                             }
  303.                         }
  304.                         e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_MENUBARSTARTCOLOR, e.AffectedBounds);
  305.                     }
  306.                 }
  307.                 else
  308.                 {
  309.                     if (e.ToolStrip is StatusStrip)
  310.                     {
  311.                         using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_CONTROLBORDERCOLOR, 1f))
  312.                         {
  313.                             e.Graphics.DrawLine(pen, e.AffectedBounds.X, e.AffectedBounds.Y, e.AffectedBounds.Right, e.AffectedBounds.Y);
  314.                             return;
  315.                         }
  316.                     }
  317.                     if (e.ToolStrip is ToolStripDropDownMenu)
  318.                     {
  319.                         Rectangle affectedBounds = e.AffectedBounds;
  320.                         affectedBounds.X += 2;
  321.                         affectedBounds.Width -= 4;
  322.                         affectedBounds.Y += 2;
  323.                         affectedBounds.Height -= 4;
  324.                         brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_MENUITEMCOLOR;
  325.                         e.Graphics.FillRectangle(brush, affectedBounds);
  326.                         if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR)
  327.                         {
  328.                             using (LinearGradientBrush brush2 = new LinearGradientBrush(new Rectangle(affectedBounds.X, affectedBounds.Y, 0x1a, affectedBounds.Height), this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_LEFTBARENDCOLOR, LinearGradientMode.Horizontal))
  329.                             {
  330.                                 e.Graphics.FillRectangle(brush2, affectedBounds.X, affectedBounds.Y, 0x1a, affectedBounds.Height);
  331.                                 return;
  332.                             }
  333.                         }
  334.                         e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_LEFTBARSTARTCOLOR, affectedBounds.X, affectedBounds.Y, 0x1a, affectedBounds.Height);
  335.                     }
  336.                     else
  337.                     {
  338.                         Bitmap bitmap2;
  339.                         if (e.ToolStrip.LayoutStyle == ToolStripLayoutStyle.HorizontalStackWithOverflow)
  340.                         {
  341.                             bitmap2 = this.xdc87e2b99332cd4a.Res.Bitmaps.SKIN2_TOOLBAR;
  342.                             if (bitmap2 != null)
  343.                             {
  344.                                 using (Bitmap bitmap3 = (Bitmap) bitmap2.Clone())
  345.                                 {
  346.                                     bitmap3.RotateFlip(RotateFlipType.Rotate90FlipNone);
  347.                                     e.Graphics.DrawImage(bitmap3, e.AffectedBounds, 0, 0, bitmap2.Width, bitmap2.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  348.                                     return;
  349.                                 }
  350.                             }
  351.                             if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARENDCOLOR)
  352.                             {
  353.                                 using (brush = new LinearGradientBrush(e.AffectedBounds, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARENDCOLOR, LinearGradientMode.Vertical))
  354.                                 {
  355.                                     e.Graphics.FillRectangle(brush, e.AffectedBounds);
  356.                                     return;
  357.                                 }
  358.                             }
  359.                             e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARSTARTCOLOR, e.AffectedBounds);
  360.                         }
  361.                         else
  362.                         {
  363.                             bitmap2 = this.xdc87e2b99332cd4a.Res.Bitmaps.SKIN2_TOOLBAR;
  364.                             if (bitmap2 != null)
  365.                             {
  366.                                 e.Graphics.DrawImage(bitmap2, e.AffectedBounds, 0, 0, bitmap2.Width, bitmap2.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  367.                             }
  368.                             else
  369.                             {
  370.                                 if (this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARSTARTCOLOR != this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARENDCOLOR)
  371.                                 {
  372.                                     using (brush = new LinearGradientBrush(e.AffectedBounds, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARSTARTCOLOR, this.xdc87e2b99332cd4a.Res.Colors.SKIN2_TOOLBARENDCOLOR, LinearGradientMode.Horizontal))
  373.                                     {
  374.                                         e.Graphics.FillRectangle(brush, e.AffectedBounds);
  375.                                         return;
  376.                                     }
  377.                                 }
  378.                                 e.Graphics.FillRectangle(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARSTARTCOLOR, e.AffectedBounds);
  379.                             }
  380.                         }
  381.                     }
  382.                 }
  383.             }
  384.         }
  385.         protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
  386.         {
  387.             if (!(e.ToolStrip is MenuStrip) && !(e.ToolStrip is StatusStrip))
  388.             {
  389.                 if (e.ToolStrip is ToolStripDropDownMenu)
  390.                 {
  391.                     using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Colors.SKIN2_SELECTEDMENUBORDERCOLOR))
  392.                     {
  393.                         e.Graphics.DrawRectangle(pen, e.AffectedBounds.X, e.AffectedBounds.Y, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1);
  394.                         return;
  395.                     }
  396.                 }
  397.                 Rectangle affectedBounds = e.AffectedBounds;
  398.                 using (Pen pen2 = new Pen(this.xdc87e2b99332cd4a.Res.Colors.SKIN2_CONTROLBORDERCOLOR))
  399.                 {
  400.                     e.Graphics.DrawLine(pen2, affectedBounds.Left, affectedBounds.Bottom - 1, affectedBounds.Right - 4, affectedBounds.Bottom - 1);
  401.                     e.Graphics.DrawLine(pen2, affectedBounds.Right - 1, affectedBounds.Top, affectedBounds.Right - 1, affectedBounds.Bottom - 4);
  402.                     e.Graphics.DrawBezier(pen2, new Point(affectedBounds.Right - 4, affectedBounds.Bottom - 1), new Point(affectedBounds.Right - 3, affectedBounds.Bottom - 2), new Point(affectedBounds.Right - 2, affectedBounds.Bottom - 3), new Point(affectedBounds.Right - 1, affectedBounds.Bottom - 4));
  403.                 }
  404.             }
  405.         }
  406.         protected override void OnRenderToolStripStatusLabelBackground(ToolStripItemRenderEventArgs e)
  407.         {
  408.             this.x0f4884030a491f49.DrawToolStripStatusLabelBackground(e);
  409.         }
  410.         private void x11d38b1ae9f5b99b(ToolStripItemRenderEventArgs xfbf34718e704c6bc)
  411.         {
  412.             Brush brush;
  413.             Rectangle rect = new Rectangle(xfbf34718e704c6bc.Item.ContentRectangle.X - 2, xfbf34718e704c6bc.Item.ContentRectangle.Y - 2, xfbf34718e704c6bc.Item.ContentRectangle.Width + 3, xfbf34718e704c6bc.Item.ContentRectangle.Height + 3);
  414.             this.xf2f6451a5d77af97(xfbf34718e704c6bc.Item, xfbf34718e704c6bc);
  415.             if (xfbf34718e704c6bc.Item.Selected)
  416.             {
  417.                 brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  418.                 xfbf34718e704c6bc.Graphics.FillRectangle(brush, rect);
  419.                 using (Pen pen = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  420.                 {
  421.                     xfbf34718e704c6bc.Graphics.DrawRectangle(pen, rect);
  422.                 }
  423.             }
  424.             if (xfbf34718e704c6bc.Item is ToolStripButton)
  425.             {
  426.                 ToolStripButton item = (ToolStripButton) xfbf34718e704c6bc.Item;
  427.                 if (item.Checked)
  428.                 {
  429.                     brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  430.                     xfbf34718e704c6bc.Graphics.FillRectangle(brush, rect);
  431.                     using (Pen pen2 = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  432.                     {
  433.                         xfbf34718e704c6bc.Graphics.DrawRectangle(pen2, rect);
  434.                     }
  435.                 }
  436.             }
  437.             if (xfbf34718e704c6bc.Item.Pressed)
  438.             {
  439.                 if ((xfbf34718e704c6bc.Item is ToolStripDropDownButton) || (xfbf34718e704c6bc.Item is ToolStripSplitButton))
  440.                 {
  441.                     brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARONCOLOR;
  442.                 }
  443.                 else
  444.                 {
  445.                     brush = this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARDOWNCOLOR;
  446.                 }
  447.                 xfbf34718e704c6bc.Graphics.FillRectangle(brush, rect);
  448.                 using (Pen pen3 = new Pen(this.xdc87e2b99332cd4a.Res.Brushes.SKIN2_TOOLBARBORDERCOLOR))
  449.                 {
  450.                     xfbf34718e704c6bc.Graphics.DrawRectangle(pen3, rect);
  451.                 }
  452.             }
  453.         }
  454.         private void xa8c2e639f6764635(Image xe058541ca798c059, ToolStripRenderEventArgs xfbf34718e704c6bc)
  455.         {
  456.             Rectangle rectangle2;
  457.             int width = xfbf34718e704c6bc.ToolStrip.Width;
  458.             int height = xfbf34718e704c6bc.ToolStrip.Height;
  459.             if (xe058541ca798c059 == null)
  460.             {
  461.                 return;
  462.             }
  463.             Rectangle srcRect = new Rectangle(0, 0, xe058541ca798c059.Width, xe058541ca798c059.Height);
  464.             switch (xfbf34718e704c6bc.ToolStrip.BackgroundImageLayout)
  465.             {
  466.                 case ImageLayout.None:
  467.                     rectangle2 = srcRect;
  468.                     xfbf34718e704c6bc.Graphics.DrawImage(xe058541ca798c059, rectangle2, srcRect, GraphicsUnit.Pixel);
  469.                     return;
  470.                 case ImageLayout.Tile:
  471.                 {
  472.                     rectangle2 = new Rectangle(0, 0, width, height);
  473.                     Rectangle dstRect = new Rectangle(0, 0, srcRect.Width, srcRect.Height);
  474.                     using (TextureBrush brush = new TextureBrush(xe058541ca798c059, dstRect, this.x233f092c536593eb))
  475.                     {
  476.                         xfbf34718e704c6bc.Graphics.FillRectangle(brush, rectangle2);
  477.                         return;
  478.                     }
  479.                 }
  480.                 case ImageLayout.Center:
  481.                     if (width <= xe058541ca798c059.Width)
  482.                     {
  483.                         rectangle2 = new Rectangle(0, 0, xe058541ca798c059.Width, xe058541ca798c059.Height);
  484.                     }
  485.                     else
  486.                     {
  487.                         rectangle2 = new Rectangle((width - xe058541ca798c059.Width) / 2, 0, xe058541ca798c059.Width, xe058541ca798c059.Height);
  488.                     }
  489.                     goto Label_00AC;
  490.                 case ImageLayout.Stretch:
  491.                     rectangle2 = new Rectangle(0, 0, width, height);
  492.                     xfbf34718e704c6bc.Graphics.DrawImage(xe058541ca798c059, rectangle2, srcRect, GraphicsUnit.Pixel);
  493.                     return;
  494.                 case ImageLayout.Zoom:
  495.                     if (xe058541ca798c059.Height > 0)
  496.                     {
  497.                         float num3 = ((float) height) / ((float) xe058541ca798c059.Height);
  498.                         int num4 = (int) (xe058541ca798c059.Width * num3);
  499.                         if (width <= num4)
  500.                         {
  501.                             rectangle2 = new Rectangle(0, 0, xe058541ca798c059.Width, height);
  502.                         }
  503.                         else
  504.                         {
  505.                             rectangle2 = new Rectangle((width - num4) / 2, 0, num4, height);
  506.                         }
  507.                         xfbf34718e704c6bc.Graphics.DrawImage(xe058541ca798c059, rectangle2, srcRect, GraphicsUnit.Pixel);
  508.                     }
  509.                     return;
  510.                 default:
  511.                     return;
  512.             }
  513.         Label_00AC:
  514.             xfbf34718e704c6bc.Graphics.DrawImage(xe058541ca798c059, rectangle2, srcRect, GraphicsUnit.Pixel);
  515.         }
  516.         private void xf2f6451a5d77af97(ToolStripItem xccb63ca5f63dc470, ToolStripItemRenderEventArgs xfbf34718e704c6bc)
  517.         {
  518.             Rectangle rectangle2;
  519.             if (xccb63ca5f63dc470.BackgroundImage == null)
  520.             {
  521.                 return;
  522.             }
  523.             Image backgroundImage = xccb63ca5f63dc470.BackgroundImage;
  524.             Rectangle srcRect = new Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height);
  525.             switch (xccb63ca5f63dc470.BackgroundImageLayout)
  526.             {
  527.                 case ImageLayout.None:
  528.                     rectangle2 = srcRect;
  529.                     xfbf34718e704c6bc.Graphics.DrawImage(backgroundImage, rectangle2, srcRect, GraphicsUnit.Pixel);
  530.                     return;
  531.                 case ImageLayout.Tile:
  532.                 {
  533.                     rectangle2 = new Rectangle(0, 0, xccb63ca5f63dc470.Width, xccb63ca5f63dc470.Height);
  534.                     Rectangle dstRect = new Rectangle(0, 0, srcRect.Width, srcRect.Height);
  535.                     using (TextureBrush brush = new TextureBrush(backgroundImage, dstRect, this.x233f092c536593eb))
  536.                     {
  537.                         xfbf34718e704c6bc.Graphics.FillRectangle(brush, rectangle2);
  538.                         return;
  539.                     }
  540.                 }
  541.                 case ImageLayout.Center:
  542.                     if (xccb63ca5f63dc470.Width <= backgroundImage.Width)
  543.                     {
  544.                         rectangle2 = new Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height);
  545.                     }
  546.                     else
  547.                     {
  548.                         rectangle2 = new Rectangle((xccb63ca5f63dc470.Width - backgroundImage.Width) / 2, 0, backgroundImage.Width, backgroundImage.Height);
  549.                     }
  550.                     goto Label_00A5;
  551.                 case ImageLayout.Stretch:
  552.                     rectangle2 = new Rectangle(0, 0, xccb63ca5f63dc470.Width, xccb63ca5f63dc470.Height);
  553.                     xfbf34718e704c6bc.Graphics.DrawImage(backgroundImage, rectangle2, srcRect, GraphicsUnit.Pixel);
  554.                     return;
  555.                 case ImageLayout.Zoom:
  556.                     if (backgroundImage.Height > 0)
  557.                     {
  558.                         float num = ((float) xccb63ca5f63dc470.Height) / ((float) backgroundImage.Height);
  559.                         int width = (int) (backgroundImage.Width * num);
  560.                         if (xccb63ca5f63dc470.Width <= width)
  561.                         {
  562.                             rectangle2 = new Rectangle(0, 0, backgroundImage.Width, xccb63ca5f63dc470.Height);
  563.                         }
  564.                         else
  565.                         {
  566.                             rectangle2 = new Rectangle((xccb63ca5f63dc470.Width - width) / 2, 0, width, xccb63ca5f63dc470.Height);
  567.                         }
  568.                         xfbf34718e704c6bc.Graphics.DrawImage(backgroundImage, rectangle2, srcRect, GraphicsUnit.Pixel);
  569.                     }
  570.                     return;
  571.                 default:
  572.                     return;
  573.             }
  574.         Label_00A5:
  575.             xfbf34718e704c6bc.Graphics.DrawImage(backgroundImage, rectangle2, srcRect, GraphicsUnit.Pixel);
  576.         }
  577.     }
  578. }