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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Collections;
  5.     using System.ComponentModel;
  6.     using System.Drawing;
  7.     using System.Drawing.Drawing2D;
  8.     using System.Drawing.Imaging;
  9.     using System.Drawing.Text;
  10.     using System.Reflection;
  11.     using System.Runtime.InteropServices;
  12.     using System.Windows.Forms;
  13.     using x293b01486f981425;
  14.     internal class x448fd9ab43628c71
  15.     {
  16.         public const int AlignWidth = 0;
  17.         public const byte Encript1 = 0x44;
  18.         public static byte Encript2 = 0x38;
  19.         public const byte Encript3 = 0x21;
  20.         public static byte Encript4 = 0x33;
  21.         public const byte IV1 = 0x63;
  22.         public static byte IV2 = 0x76;
  23.         public static byte IV3 = 0xa1;
  24.         public static byte IV4 = 0xa6;
  25.         private static bool x02a9729195580525 = false;
  26.         internal static Hashtable x1c12011307e0a753;
  27.         private static Color x27d07b3cbf2c9479 = Color.FromArgb(0xff, 0, 0xff);
  28.         private static StringFormat x488379a1c8afe803;
  29.         private static Pen x4f0034703b20af0f;
  30.         private static bool x605ccaa3586218f6 = false;
  31.         private static ImageAttributes x68a7ff53010868dc = new ImageAttributes();
  32.         private static ImageAttributes xa11b666f50e9398f = new ImageAttributes();
  33.         private static StringFormat xad5d7fbaf75245c8;
  34.         private static ImageAttributes xc7766c1739984987 = new ImageAttributes();
  35.         private static StringFormat xd02bd90925d5d5ca;
  36.         private static StringFormat xe8c22659bee459d5;
  37.         static x448fd9ab43628c71()
  38.         {
  39.             IV4 = 0xb5;
  40.             x4f0034703b20af0f = new Pen(Color.Black, 1f);
  41.             x4f0034703b20af0f.DashStyle = DashStyle.Dot;
  42.             x488379a1c8afe803 = new StringFormat();
  43.             x488379a1c8afe803.Alignment = StringAlignment.Center;
  44.             x488379a1c8afe803.LineAlignment = StringAlignment.Center;
  45.             x488379a1c8afe803.HotkeyPrefix = HotkeyPrefix.Show;
  46.             xd02bd90925d5d5ca = new StringFormat();
  47.             xd02bd90925d5d5ca.Alignment = StringAlignment.Near;
  48.             xd02bd90925d5d5ca.LineAlignment = StringAlignment.Center;
  49.             xd02bd90925d5d5ca.HotkeyPrefix = HotkeyPrefix.Show;
  50.             xe8c22659bee459d5 = new StringFormat();
  51.             xe8c22659bee459d5.Alignment = StringAlignment.Near;
  52.             xe8c22659bee459d5.LineAlignment = StringAlignment.Center;
  53.             xe8c22659bee459d5.HotkeyPrefix = HotkeyPrefix.Show;
  54.             xe8c22659bee459d5.FormatFlags = StringFormatFlags.DirectionRightToLeft;
  55.             xad5d7fbaf75245c8 = new StringFormat();
  56.             xad5d7fbaf75245c8.Alignment = StringAlignment.Far;
  57.             xad5d7fbaf75245c8.LineAlignment = StringAlignment.Center;
  58.             xad5d7fbaf75245c8.HotkeyPrefix = HotkeyPrefix.None;
  59.             xc7766c1739984987.SetWrapMode(WrapMode.TileFlipX);
  60.             x68a7ff53010868dc.SetWrapMode(WrapMode.TileFlipY);
  61.             xa11b666f50e9398f.SetNoOp();
  62.             xa11b666f50e9398f.SetWrapMode(WrapMode.TileFlipXY);
  63.             IV2 = 0x77;
  64.             Encript2 = 0x44;
  65.             x1c12011307e0a753 = new Hashtable();
  66.             x1c12011307e0a753.Add("flcRzsRtDNr2XBiCoY7NrAC352AiFA/4YuLs4nDCyOHZX5xvWtgH/g==", null);
  67.             x1c12011307e0a753.Add("isBx30VBCC0GTnJuOKmQ0jK7I8NqeyOjDigXGIG5v1dN7aw4qc3Ogw==", null);
  68.         }
  69.         private x448fd9ab43628c71()
  70.         {
  71.         }
  72.         public static void CalcLayoutRect(ContentAlignment align, Rectangle clientRect, RightToLeft rightToLeft, out Rectangle rect, out StringFormat format)
  73.         {
  74.             format = new StringFormat();
  75.             if (rightToLeft == RightToLeft.Yes)
  76.             {
  77.                 format.FormatFlags = StringFormatFlags.DirectionRightToLeft;
  78.             }
  79.             format.HotkeyPrefix = HotkeyPrefix.Show;
  80.             rect = Rectangle.FromLTRB(clientRect.Left, clientRect.Top, clientRect.Right, clientRect.Bottom);
  81.             switch (align)
  82.             {
  83.                 case ContentAlignment.TopLeft:
  84.                     format.Alignment = StringAlignment.Near;
  85.                     format.LineAlignment = StringAlignment.Near;
  86.                     return;
  87.                 case ContentAlignment.TopCenter:
  88.                     format.Alignment = StringAlignment.Center;
  89.                     format.LineAlignment = StringAlignment.Near;
  90.                     return;
  91.                 case ContentAlignment.TopRight:
  92.                     format.Alignment = StringAlignment.Far;
  93.                     format.LineAlignment = StringAlignment.Near;
  94.                     return;
  95.                 case ContentAlignment.MiddleLeft:
  96.                     format.Alignment = StringAlignment.Near;
  97.                     format.LineAlignment = StringAlignment.Center;
  98.                     return;
  99.                 case ContentAlignment.BottomCenter:
  100.                     format.Alignment = StringAlignment.Center;
  101.                     format.LineAlignment = StringAlignment.Far;
  102.                     return;
  103.                 case ContentAlignment.BottomRight:
  104.                     format.Alignment = StringAlignment.Far;
  105.                     format.LineAlignment = StringAlignment.Far;
  106.                     return;
  107.                 case ContentAlignment.MiddleRight:
  108.                     format.Alignment = StringAlignment.Far;
  109.                     format.LineAlignment = StringAlignment.Center;
  110.                     return;
  111.                 case ContentAlignment.BottomLeft:
  112.                     format.Alignment = StringAlignment.Near;
  113.                     format.LineAlignment = StringAlignment.Far;
  114.                     return;
  115.             }
  116.             format.Alignment = StringAlignment.Center;
  117.             format.LineAlignment = StringAlignment.Center;
  118.         }
  119.         public static Rectangle CalcLayoutRect(ContentAlignment align, RightToLeft rightToLeft, Rectangle clientRect, int width, int height)
  120.         {
  121.             return CalcLayoutRect(align, rightToLeft, clientRect, width, height, 0);
  122.         }
  123.         public static Rectangle CalcLayoutRect(ContentAlignment align, RightToLeft rightToLeft, Rectangle clientRect, int width, int height, int alignWidth)
  124.         {
  125.             return CalcLayoutRect(align, rightToLeft, clientRect, width, height, alignWidth, alignWidth);
  126.         }
  127.         public static Rectangle CalcLayoutRect(ContentAlignment align, RightToLeft rightToLeft, Rectangle clientRect, int width, int height, int alignW, int alignH)
  128.         {
  129.             int num = alignW;
  130.             int num2 = alignH;
  131.             switch (align)
  132.             {
  133.                 case ContentAlignment.TopLeft:
  134.                     if ((rightToLeft & RightToLeft.Yes) != RightToLeft.Yes)
  135.                     {
  136.                         return new Rectangle(clientRect.Left + num, clientRect.Top + num2, width, height);
  137.                     }
  138.                     return new Rectangle((clientRect.Right - num) - width, clientRect.Top + num2, width, height);
  139.                 case ContentAlignment.TopCenter:
  140.                     return new Rectangle((clientRect.Width - width) / 2, clientRect.Top + num2, width, height);
  141.                 case ContentAlignment.TopRight:
  142.                     if ((rightToLeft & RightToLeft.Yes) != RightToLeft.Yes)
  143.                     {
  144.                         return new Rectangle((clientRect.Right - num) - width, clientRect.Top + num2, width, height);
  145.                     }
  146.                     return new Rectangle(clientRect.Left + num, clientRect.Top + num2, width, height);
  147.                 case ContentAlignment.MiddleLeft:
  148.                     if ((rightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  149.                     {
  150.                         return new Rectangle((clientRect.Right - num) - width, (clientRect.Height - height) / 2, width, height);
  151.                     }
  152.                     return new Rectangle(clientRect.Left + num, (clientRect.Height - height) / 2, width, height);
  153.                 case ContentAlignment.MiddleCenter:
  154.                     return new Rectangle((clientRect.Width - width) / 2, (clientRect.Height - height) / 2, width, height);
  155.                 case ContentAlignment.BottomCenter:
  156.                     return new Rectangle((clientRect.Width - width) / 2, (clientRect.Bottom - num2) - height, width, height);
  157.                 case ContentAlignment.BottomRight:
  158.                     if ((rightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  159.                     {
  160.                         return new Rectangle(clientRect.Left + num, (clientRect.Bottom - num2) - height, width, height);
  161.                     }
  162.                     return new Rectangle((clientRect.Right - num) - width, (clientRect.Bottom - num2) - height, width, height);
  163.                 case ContentAlignment.MiddleRight:
  164.                     if ((rightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  165.                     {
  166.                         return new Rectangle(clientRect.Left + num, (clientRect.Height - height) / 2, width, height);
  167.                     }
  168.                     return new Rectangle((clientRect.Right - num) - width, (clientRect.Height - height) / 2, width, height);
  169.                 case ContentAlignment.BottomLeft:
  170.                     if ((rightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  171.                     {
  172.                         return new Rectangle((clientRect.Right - num) - width, (clientRect.Bottom - num2) - height, width, height);
  173.                     }
  174.                     return new Rectangle(clientRect.Left + num, (clientRect.Bottom - num2) - height, width, height);
  175.             }
  176.             return new Rectangle((clientRect.Width - width) / 2, (clientRect.Height - height) / 2, width, height);
  177.         }
  178.         public static Color CalculateColor(Color front, Color back, int alpha)
  179.         {
  180.             Color color = Color.FromArgb(0xff, front);
  181.             Color color2 = Color.FromArgb(0xff, back);
  182.             float r = color.R;
  183.             float g = color.G;
  184.             float b = color.B;
  185.             float num4 = color2.R;
  186.             float num5 = color2.G;
  187.             float num6 = color2.B;
  188.             float num7 = ((r * alpha) / 255f) + (num4 * (((float) (0xff - alpha)) / 255f));
  189.             float num8 = ((g * alpha) / 255f) + (num5 * (((float) (0xff - alpha)) / 255f));
  190.             float num9 = ((b * alpha) / 255f) + (num6 * (((float) (0xff - alpha)) / 255f));
  191.             byte red = (byte) num7;
  192.             byte green = (byte) num8;
  193.             byte blue = (byte) num9;
  194.             return Color.FromArgb(0xff, red, green, blue);
  195.         }
  196.         public static string ConvertBase64StringToUpperCase(string str)
  197.         {
  198.             str = str.ToUpper();
  199.             string str2 = "";
  200.             foreach (char ch in str)
  201.             {
  202.                 char ch2 = ch;
  203.                 if (ch2 == '+')
  204.                 {
  205.                     str2 = str2 + 'J';
  206.                 }
  207.                 else if (ch2 != '/')
  208.                 {
  209.                     if (ch2 != '=')
  210.                     {
  211.                         goto Label_0061;
  212.                     }
  213.                     str2 = str2 + 'Z';
  214.                 }
  215.                 else
  216.                 {
  217.                     str2 = str2 + 'F';
  218.                 }
  219.                 goto Label_006E;
  220.             Label_0061:
  221.                 str2 = str2 + ch;
  222.             Label_006E:;
  223.             }
  224.             return str2;
  225.         }
  226.         public static void DrawArrowDown(Graphics g, int x, int y, bool enabled)
  227.         {
  228.             Pen white;
  229.             Brush gray;
  230.             Point[] points = new Point[3];
  231.             if (!enabled)
  232.             {
  233.                 white = Pens.White;
  234.                 gray = Brushes.White;
  235.                 points[0] = new Point(x + 1, y + 1);
  236.                 points[1] = new Point(x + 7, y + 1);
  237.                 points[2] = new Point(x + 4, y + 4);
  238.                 g.DrawPolygon(white, points);
  239.                 g.FillPolygon(gray, points);
  240.                 white = Pens.Gray;
  241.                 gray = Brushes.Gray;
  242.             }
  243.             else
  244.             {
  245.                 gray = Brushes.Black;
  246.                 white = Pens.Black;
  247.             }
  248.             points[0] = new Point(x, y);
  249.             points[1] = new Point(x + 6, y);
  250.             points[2] = new Point(x + 3, y + 3);
  251.             g.DrawPolygon(white, points);
  252.             g.FillPolygon(gray, points);
  253.         }
  254.         public static void DrawArrowLeft(Graphics g, int x, int y, bool enabled)
  255.         {
  256.             Brush white;
  257.             Point[] points = new Point[3];
  258.             if (!enabled)
  259.             {
  260.                 white = Brushes.White;
  261.                 points[0] = new Point(x + 1, y + 1);
  262.                 points[1] = new Point(x + 4, y + 4);
  263.                 points[2] = new Point(x + 4, y - 2);
  264.                 g.FillPolygon(white, points);
  265.                 white = Brushes.Gray;
  266.             }
  267.             else
  268.             {
  269.                 white = Brushes.Black;
  270.             }
  271.             points[0] = new Point(x, y);
  272.             points[1] = new Point(x + 3, y + 3);
  273.             points[2] = new Point(x + 3, y - 3);
  274.             g.FillPolygon(white, points);
  275.         }
  276.         public static void DrawArrowRight(Graphics g, int x, int y, bool enabled)
  277.         {
  278.             Brush white;
  279.             Point[] points = new Point[3];
  280.             if (!enabled)
  281.             {
  282.                 white = Brushes.White;
  283.                 points[0] = new Point(x + 1, y + 1);
  284.                 points[1] = new Point(x + 1, y + 7);
  285.                 points[2] = new Point(x + 4, y + 4);
  286.                 g.FillPolygon(white, points);
  287.                 white = Brushes.Gray;
  288.             }
  289.             else
  290.             {
  291.                 white = Brushes.Black;
  292.             }
  293.             points[0] = new Point(x, y);
  294.             points[1] = new Point(x, y + 6);
  295.             points[2] = new Point(x + 3, y + 3);
  296.             g.FillPolygon(white, points);
  297.         }
  298.         public static void DrawArrowUp(Graphics g, int x, int y, bool enabled)
  299.         {
  300.             Pen white;
  301.             Brush gray;
  302.             Point[] points = new Point[3];
  303.             if (!enabled)
  304.             {
  305.                 white = Pens.White;
  306.                 gray = Brushes.White;
  307.                 points[0] = new Point(x + 1, y + 1);
  308.                 points[1] = new Point(x + 7, y + 1);
  309.                 points[2] = new Point(x + 4, y - 2);
  310.                 g.DrawPolygon(white, points);
  311.                 g.FillPolygon(gray, points);
  312.                 white = Pens.Gray;
  313.                 gray = Brushes.Gray;
  314.             }
  315.             else
  316.             {
  317.                 gray = Brushes.Black;
  318.                 white = Pens.Black;
  319.             }
  320.             points[0] = new Point(x, y);
  321.             points[1] = new Point(x + 6, y);
  322.             points[2] = new Point(x + 3, y - 3);
  323.             g.DrawPolygon(white, points);
  324.             g.FillPolygon(gray, points);
  325.         }
  326.         public static string FormatStringWithWidth(Graphics g, string s, Font font, int width)
  327.         {
  328.             string text = s;
  329.             Font font2 = font;
  330.             int num = (int) g.MeasureString(s, font2).Width;
  331.             if (width > num)
  332.             {
  333.                 return text;
  334.             }
  335.             for (int i = 1; i < s.Length; i++)
  336.             {
  337.                 text = s.Substring(0, i) + "...";
  338.                 num = (int) g.MeasureString(text, font2).Width;
  339.                 if (num >= width)
  340.                 {
  341.                     return text;
  342.                 }
  343.             }
  344.             return s;
  345.         }
  346.         public static Font GetCaptionFont()
  347.         {
  348.             return new Font(SystemInformation.MenuFont, FontStyle.Bold);
  349.         }
  350.         public static string GetCommonDialogVersion()
  351.         {
  352.             x02a9729195580525 = true;
  353.             string fullName = Assembly.GetAssembly(typeof(CommonDialog)).FullName;
  354.             string str2 = null;
  355.             int index = fullName.IndexOf("Version=");
  356.             if (index != -1)
  357.             {
  358.                 index += 8;
  359.                 int num2 = fullName.IndexOf(",", index);
  360.                 if (num2 == -1)
  361.                 {
  362.                     num2 = fullName.Length - 1;
  363.                 }
  364.                 try
  365.                 {
  366.                     str2 = fullName.Substring(index, num2 - index);
  367.                 }
  368.                 catch
  369.                 {
  370.                 }
  371.             }
  372.             return str2;
  373.         }
  374.         public static StringFormat GetControlCaptionOutputStringFormat(ContentAlignment align, Control control)
  375.         {
  376.             StringFormat format = new StringFormat();
  377.             if ((control.RightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  378.             {
  379.                 format.FormatFlags = StringFormatFlags.DirectionRightToLeft;
  380.             }
  381.             format.HotkeyPrefix = HotkeyPrefix.Show;
  382.             switch (align)
  383.             {
  384.                 case ContentAlignment.TopLeft:
  385.                     format.Alignment = StringAlignment.Near;
  386.                     format.LineAlignment = StringAlignment.Near;
  387.                     return format;
  388.                 case ContentAlignment.TopCenter:
  389.                     format.Alignment = StringAlignment.Center;
  390.                     format.LineAlignment = StringAlignment.Near;
  391.                     return format;
  392.                 case ContentAlignment.TopRight:
  393.                     format.Alignment = StringAlignment.Far;
  394.                     format.LineAlignment = StringAlignment.Near;
  395.                     return format;
  396.                 case ContentAlignment.MiddleLeft:
  397.                     format.Alignment = StringAlignment.Near;
  398.                     format.LineAlignment = StringAlignment.Center;
  399.                     return format;
  400.                 case ContentAlignment.MiddleCenter:
  401.                     format.Alignment = StringAlignment.Center;
  402.                     format.LineAlignment = StringAlignment.Center;
  403.                     return format;
  404.                 case ContentAlignment.BottomCenter:
  405.                     format.Alignment = StringAlignment.Center;
  406.                     format.LineAlignment = StringAlignment.Far;
  407.                     return format;
  408.                 case ContentAlignment.BottomRight:
  409.                     format.Alignment = StringAlignment.Far;
  410.                     format.LineAlignment = StringAlignment.Far;
  411.                     return format;
  412.                 case ContentAlignment.MiddleRight:
  413.                     format.Alignment = StringAlignment.Far;
  414.                     format.LineAlignment = StringAlignment.Center;
  415.                     return format;
  416.                 case ContentAlignment.BottomLeft:
  417.                     format.Alignment = StringAlignment.Near;
  418.                     format.LineAlignment = StringAlignment.Far;
  419.                     return format;
  420.             }
  421.             format.Alignment = StringAlignment.Center;
  422.             format.LineAlignment = StringAlignment.Center;
  423.             return format;
  424.         }
  425.         public static Font GetMessageFont()
  426.         {
  427.             return SystemInformation.MenuFont;
  428.         }
  429.         public static string GetShortCutString(Shortcut shortcut)
  430.         {
  431.             char ch = (char) ((ushort) (shortcut & ((Shortcut) 0xffff)));
  432.             if ((ch < '0') || (ch > '9'))
  433.             {
  434.                 return TypeDescriptor.GetConverter(typeof(Keys)).ConvertToString((Keys) shortcut);
  435.             }
  436.             string str = "";
  437.             int num = (int) (((long) shortcut) & 0xffff0000L);
  438.             if ((num & 0x10000) != 0)
  439.             {
  440.                 str = str + "Shift+";
  441.             }
  442.             if ((num & 0x20000) != 0)
  443.             {
  444.                 str = str + "Ctrl+";
  445.             }
  446.             if ((num & 0x40000) != 0)
  447.             {
  448.                 str = str + "Alt+";
  449.             }
  450.             return (str + ch);
  451.         }
  452.         public static bool InRect(Point p, xae4dd1cafd2eb77c.RECT r)
  453.         {
  454.             return ((((p.X >= r.left) && (p.X <= r.right)) && (p.Y >= r.top)) && (p.Y <= r.bottom));
  455.         }
  456.         public static bool InRect(Point p, Rectangle r)
  457.         {
  458.             return ((((p.X >= r.Left) && (p.X <= r.Right)) && (p.Y >= r.Top)) && (p.Y <= r.Bottom));
  459.         }
  460.         public static bool InRect(int x, int y, Rectangle r)
  461.         {
  462.             return ((((x >= r.Left) && (x <= r.Right)) && (y >= r.Top)) && (y <= r.Bottom));
  463.         }
  464.         public static Point MakePoint(IntPtr lParam)
  465.         {
  466.             int num = lParam.ToInt32();
  467.             return new Point(num | 0xff, (num | 0xff00) >> 4);
  468.         }
  469.         public static void OffsetRect(ref xae4dd1cafd2eb77c.RECT rect, int dx, int dy)
  470.         {
  471.             rect.left += dx;
  472.             rect.right += dx;
  473.             rect.top += dy;
  474.             rect.bottom += dy;
  475.         }
  476.         public static void OffsetRect(ref Rectangle rect, int dx, int dy)
  477.         {
  478.             rect.X += dx;
  479.             rect.Y += dy;
  480.         }
  481.         public static void PaintSlider(SkinEngine Engine, Graphics g, Rectangle r, bool vScroll)
  482.         {
  483.             Bitmap bitmap;
  484.             Rectangle rectangle;
  485.             Rectangle rectangle2;
  486.             int bottom;
  487.             int top;
  488.             int right;
  489.             int left;
  490.             int num = 0;
  491.             if (vScroll)
  492.             {
  493.                 num = 0;
  494.             }
  495.             else
  496.             {
  497.                 num = 1;
  498.             }
  499.             if (vScroll)
  500.             {
  501.                 if (Engine.Res.ScrollBarRes.IsMacOS && (r.Height > 0x10))
  502.                 {
  503.                     SpitDrawVertical(Engine.Res.Bitmaps.SKIN2_SCROLLBAR, g, r, false);
  504.                 }
  505.                 else
  506.                 {
  507.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 0];
  508.                     if (r.Height <= (bitmap.Height * 2))
  509.                     {
  510.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  511.                         rectangle2 = new Rectangle(r.Left, r.Top, r.Width, r.Height / 2);
  512.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  513.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  514.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  515.                         rectangle2 = Rectangle.FromLTRB(r.Left, rectangle2.Bottom, r.Right, r.Bottom);
  516.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  517.                     }
  518.                     else if (r.Height <= ((bitmap.Height * 2) + Engine.Res.ScrollBarRes.Slider[num, 2].Height))
  519.                     {
  520.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  521.                         rectangle2 = new Rectangle(r.Left, r.Top, r.Width, bitmap.Height);
  522.                         bottom = rectangle2.Bottom;
  523.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  524.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  525.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  526.                         rectangle2 = new Rectangle(r.Left, r.Bottom - bitmap.Height, r.Width, bitmap.Height);
  527.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  528.                         top = rectangle2.Top;
  529.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 2];
  530.                         rectangle2 = Rectangle.FromLTRB(r.Left, bottom, r.Right, top);
  531.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  532.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  533.                     }
  534.                     else
  535.                     {
  536.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  537.                         rectangle2 = new Rectangle(r.Left, r.Top, r.Width, bitmap.Height);
  538.                         bottom = rectangle2.Bottom;
  539.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  540.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 2];
  541.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  542.                         rectangle2 = new Rectangle(r.Left, r.Top + ((r.Height - bitmap.Height) / 2), r.Width, bitmap.Height);
  543.                         top = rectangle2.Top;
  544.                         right = rectangle2.Bottom;
  545.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  546.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  547.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  548.                         rectangle2 = new Rectangle(r.Left, r.Bottom - bitmap.Height, r.Width, bitmap.Height);
  549.                         left = rectangle2.Top;
  550.                         g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  551.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 1];
  552.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  553.                         rectangle2 = Rectangle.FromLTRB(r.Left, bottom, r.Right, top);
  554.                         g.DrawImage(bitmap, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileY);
  555.                         bitmap = Engine.Res.ScrollBarRes.Slider[num, 3];
  556.                         rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  557.                         rectangle2 = Rectangle.FromLTRB(r.Left, right, r.Right, left);
  558.                         g.DrawImage(bitmap, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileY);
  559.                     }
  560.                 }
  561.             }
  562.             else if (Engine.Res.ScrollBarRes.IsMacOS && (r.Width > 0x10))
  563.             {
  564.                 SpitDrawHorizontal(Engine.Res.Bitmaps.SKIN2_SCROLLBAR, g, r, false);
  565.             }
  566.             else
  567.             {
  568.                 bitmap = Engine.Res.ScrollBarRes.Slider[num, 0];
  569.                 if (r.Width <= (bitmap.Width * 2))
  570.                 {
  571.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  572.                     rectangle2 = new Rectangle(r.Left, r.Top, r.Width / 2, r.Height);
  573.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  574.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  575.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  576.                     rectangle2 = Rectangle.FromLTRB(rectangle2.Right, r.Top, r.Right, r.Bottom);
  577.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  578.                 }
  579.                 else if (r.Width <= ((bitmap.Width * 2) + Engine.Res.ScrollBarRes.Slider[num, 2].Width))
  580.                 {
  581.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  582.                     rectangle2 = new Rectangle(r.Left, r.Top, bitmap.Width, r.Height);
  583.                     bottom = rectangle2.Right;
  584.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  585.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  586.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  587.                     rectangle2 = new Rectangle(r.Right - bitmap.Width, r.Top, bitmap.Width, r.Height);
  588.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  589.                     top = rectangle2.Left;
  590.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  591.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 2];
  592.                     rectangle2 = Rectangle.FromLTRB(bottom, r.Top, top, r.Bottom);
  593.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  594.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  595.                 }
  596.                 else
  597.                 {
  598.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  599.                     rectangle2 = new Rectangle(r.Left, r.Top, bitmap.Width, r.Height);
  600.                     bottom = rectangle2.Right;
  601.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  602.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 2];
  603.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  604.                     rectangle2 = new Rectangle(r.Left + ((r.Width - bitmap.Width) / 2), r.Top, bitmap.Width, r.Height);
  605.                     top = rectangle2.Left;
  606.                     right = rectangle2.Right;
  607.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  608.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 4];
  609.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  610.                     rectangle2 = new Rectangle(r.Right - bitmap.Width, r.Top, bitmap.Width, r.Height);
  611.                     left = rectangle2.Left;
  612.                     g.DrawImage(bitmap, rectangle2, rectangle, GraphicsUnit.Pixel);
  613.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 1];
  614.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  615.                     rectangle2 = Rectangle.FromLTRB(bottom, r.Top, top, r.Bottom);
  616.                     g.DrawImage(bitmap, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileX);
  617.                     bitmap = Engine.Res.ScrollBarRes.Slider[num, 3];
  618.                     rectangle = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
  619.                     rectangle2 = Rectangle.FromLTRB(right, r.Top, left, r.Bottom);
  620.                     g.DrawImage(bitmap, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileX);
  621.                 }
  622.             }
  623.         }
  624.         public static void RemoveAllControl(Control control)
  625.         {
  626.             if ((control != null) && (control.Controls.Count > 0))
  627.             {
  628.                 Button button = null;
  629.                 Form form = control.FindForm();
  630.                 if (form != null)
  631.                 {
  632.                     button = new Button();
  633.                     button.Visible = false;
  634.                     form.Controls.Add(button);
  635.                     form.ActiveControl = button;
  636.                 }
  637.                 control.Controls.Clear();
  638.                 if (form != null)
  639.                 {
  640.                     button.Dispose();
  641.                     form.Controls.Remove(button);
  642.                 }
  643.             }
  644.         }
  645.         public static void RemoveControl(Control.ControlCollection coll, Control item)
  646.         {
  647.             if ((coll != null) && (item != null))
  648.             {
  649.                 Button button = null;
  650.                 Form form = item.FindForm();
  651.                 if (form != null)
  652.                 {
  653.                     button = new Button();
  654.                     button.Visible = false;
  655.                     form.Controls.Add(button);
  656.                     form.ActiveControl = button;
  657.                 }
  658.                 coll.Remove(item);
  659.                 if (form != null)
  660.                 {
  661.                     button.Dispose();
  662.                     form.Controls.Remove(button);
  663.                 }
  664.             }
  665.         }
  666.         public static Bitmap RoundPicture(Bitmap src)
  667.         {
  668.             Bitmap bitmap = new Bitmap(src.Height, src.Width);
  669.             for (int i = 0; i < src.Height; i++)
  670.             {
  671.                 for (int j = 0; j < src.Width; j++)
  672.                 {
  673.                     bitmap.SetPixel(i, (src.Width - j) - 1, src.GetPixel(j, i));
  674.                 }
  675.             }
  676.             return bitmap;
  677.         }
  678.         public static int ShowSystemMessageBox(IntPtr hWnd, string l, string c, uint u)
  679.         {
  680.             return x61467fe65a98f20c.MessageBox(hWnd, l, c, u);
  681.         }
  682.         public static void SkinShowMessageBox()
  683.         {
  684.             MessageBox.Show(string.Intern(x1110bdd110cdcea4._d574bb1a8f3e9cbc("npldnfmfonhejhodoekebhcfdedfkgkfhgkhcchidmchilojkhpcakgdejndljeeihlenicfiijfkiagfcggijhmpkmnilmnjkinmcfpkimoabhjipkcgocbhiopkpdocallmpbm", 0x555ddb55)) + string.Intern(x1110bdd110cdcea4._d574bb1a8f3e9cbc("eppknpglkpnldpemkllmmkcnjkjnooaolohoiooomjfponmpnndadnkalmbbcniblmpbplgckmncbieddlldllcejhjealafglhfkkofblfgokmgdkdhojkhakbiofii", 0x595baf8c)), " ");
  685.         }
  686.         public static void SpitDrawHorizontal(Bitmap bmp, Graphics g, Rectangle r, bool transParent)
  687.         {
  688.             Rectangle rectangle;
  689.             Rectangle rectangle2;
  690.             int width = bmp.Width / 3;
  691.             if (width > r.Width)
  692.             {
  693.                 rectangle = new Rectangle(0, 0, bmp.Width, bmp.Height);
  694.                 rectangle2 = r;
  695.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  696.                 rectangle = new Rectangle(bmp.Width - 2, 0, 2, bmp.Height);
  697.                 rectangle2 = new Rectangle(r.Right - 2, 0, 2, bmp.Height);
  698.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  699.             }
  700.             else
  701.             {
  702.                 rectangle2 = new Rectangle(r.X, r.Y, width, r.Height);
  703.                 rectangle = new Rectangle(0, 0, width, bmp.Height);
  704.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  705.                 rectangle2 = Rectangle.FromLTRB(r.X + width, r.Y, r.Right - width, r.Bottom);
  706.                 rectangle = new Rectangle(width, 0, width, bmp.Height);
  707.                 g.DrawImage(bmp, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileX, null);
  708.                 rectangle2 = new Rectangle(r.Right - width, r.Y, width, r.Height);
  709.                 rectangle = new Rectangle(bmp.Width - width, 0, width, bmp.Height);
  710.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  711.             }
  712.         }
  713.         public static void SpitDrawVertical(Bitmap bmp, Graphics g, Rectangle r, bool transParent)
  714.         {
  715.             Rectangle rectangle;
  716.             Rectangle rectangle2;
  717.             int height = bmp.Height / 3;
  718.             if (height > r.Height)
  719.             {
  720.                 rectangle = new Rectangle(0, 0, bmp.Width, bmp.Height);
  721.                 rectangle2 = r;
  722.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  723.                 rectangle = new Rectangle(0, bmp.Height - 2, bmp.Width, 2);
  724.                 rectangle2 = new Rectangle(r.Left, r.Bottom - 2, r.Width, 2);
  725.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  726.             }
  727.             else
  728.             {
  729.                 rectangle2 = new Rectangle(r.X, r.Y, r.Width, height);
  730.                 rectangle = new Rectangle(0, 0, bmp.Width, height);
  731.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  732.                 rectangle2 = Rectangle.FromLTRB(r.X, r.Y + height, r.Right, r.Bottom - height);
  733.                 rectangle = new Rectangle(0, height, bmp.Width, height);
  734.                 g.DrawImage(bmp, rectangle2, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, GraphicsUnit.Pixel, DrawImageAttrTileX, null);
  735.                 rectangle2 = new Rectangle(r.X, r.Bottom - height, r.Width, height);
  736.                 rectangle = new Rectangle(0, bmp.Height - height, bmp.Width, height);
  737.                 g.DrawImage(bmp, rectangle2, rectangle, GraphicsUnit.Pixel);
  738.             }
  739.         }
  740.         public static Bitmap SplitBitmap(Bitmap source, int count, int index)
  741.         {
  742.             if ((source == null) || (count == 0))
  743.             {
  744.                 return null;
  745.             }
  746.             float width = ((float) source.Width) / ((float) count);
  747.             float height = source.Height;
  748.             RectangleF rect = new RectangleF(new PointF(width * (index - 1), 0f), new SizeF(width, height));
  749.             return source.Clone(rect, source.PixelFormat);
  750.         }
  751.         public static void SplitDraw(Bitmap src, Graphics gDest, Rectangle rect)
  752.         {
  753.             Color fuchsia = Color.Fuchsia;
  754.             if (rect.Bottom >= rect.Top)
  755.             {
  756.                 Rectangle rectangle7;
  757.                 int width = rect.Width;
  758.                 int height = rect.Height;
  759.                 Rectangle rectangle4 = new Rectangle(0, 0, 0, 0);
  760.                 Rectangle rectangle3 = rectangle4;
  761.                 Rectangle rectangle5 = rectangle4;
  762.                 Rectangle rectangle6 = rectangle4;
  763.                 Rectangle srcRect = Rectangle.FromLTRB(0, 0, src.Width / 2, src.Height / 2);
  764.                 Rectangle destRect = Rectangle.FromLTRB(0, 0, width / 2, height / 2);
  765.                 int num3 = Math.Min(srcRect.Width, destRect.Width);
  766.                 if (num3 < 0)
  767.                 {
  768.                     num3 = 0;
  769.                 }
  770.                 int num4 = Math.Min(srcRect.Height, destRect.Height);
  771.                 if (num4 < 0)
  772.                 {
  773.                     num4 = 0;
  774.                 }
  775.                 if ((num3 != 0) && (num4 != 0))
  776.                 {
  777.                     if (num3 < srcRect.Width)
  778.                     {
  779.                         srcRect.Width = num3;
  780.                     }
  781.                     if (num4 < srcRect.Height)
  782.                     {
  783.                         srcRect.Height = num4;
  784.                     }
  785.                     rectangle7 = new Rectangle(0, 0, num3, num4);
  786.                     gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  787.                     rectangle3 = new Rectangle(0, 0, num3, num4);
  788.                 }
  789.                 srcRect = Rectangle.FromLTRB(0, (src.Height - (src.Height / 2)) + 1, src.Width / 2, src.Height);
  790.                 destRect = Rectangle.FromLTRB(0, (height - (height / 2)) + 1, width / 2, height);
  791.                 if (destRect.Bottom > destRect.Top)
  792.                 {
  793.                     num3 = Math.Min(srcRect.Width, destRect.Width);
  794.                     if (num3 < 0)
  795.                     {
  796.                         num3 = 0;
  797.                     }
  798.                     num4 = Math.Min(srcRect.Height, destRect.Height);
  799.                     if (num4 < 0)
  800.                     {
  801.                         num4 = 0;
  802.                     }
  803.                     if ((num3 != 0) && (num4 != 0))
  804.                     {
  805.                         if (num4 < srcRect.Height)
  806.                         {
  807.                             srcRect.Y += srcRect.Height - num4;
  808.                             srcRect.Height = num4;
  809.                         }
  810.                         if (num3 < srcRect.Width)
  811.                         {
  812.                             srcRect.Width = num3;
  813.                         }
  814.                         rectangle7 = new Rectangle(0, rect.Bottom - num4, num3, num4);
  815.                         gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  816.                         rectangle4 = new Rectangle(0, rect.Bottom - num4, num3, num4);
  817.                     }
  818.                     srcRect = Rectangle.FromLTRB(0, src.Height / 2, src.Width / 2, src.Height - (src.Height / 2));
  819.                     destRect = Rectangle.FromLTRB(0, rectangle3.Bottom, rectangle3.Right, rectangle4.Top);
  820.                     if (destRect.Bottom > destRect.Top)
  821.                     {
  822.                         num3 = destRect.Width;
  823.                         num4 = destRect.Height;
  824.                         if ((num3 != 0) && (num4 != 0))
  825.                         {
  826.                             if (num3 < srcRect.Width)
  827.                             {
  828.                                 srcRect.Width = num3;
  829.                             }
  830.                             rectangle7 = new Rectangle(0, 0, num3, num4);
  831.                             gDest.DrawImage(src, destRect, srcRect, GraphicsUnit.Pixel);
  832.                         }
  833.                     }
  834.                     srcRect = Rectangle.FromLTRB((src.Width - (src.Width / 2)) + 1, 0, src.Width, src.Height / 2);
  835.                     destRect = Rectangle.FromLTRB((width - (width / 2)) + 1, 0, width, height / 2);
  836.                     if (destRect.Bottom > destRect.Top)
  837.                     {
  838.                         num3 = Math.Min(srcRect.Width, destRect.Width);
  839.                         if (num3 < 0)
  840.                         {
  841.                             num3 = 0;
  842.                         }
  843.                         num4 = Math.Min(srcRect.Height, destRect.Height);
  844.                         if (num4 < 0)
  845.                         {
  846.                             num4 = 0;
  847.                         }
  848.                         if ((num4 != 0) && (num3 != 0))
  849.                         {
  850.                             if (num3 < srcRect.Width)
  851.                             {
  852.                                 srcRect.X += srcRect.Width - num3;
  853.                                 srcRect.Width = num3;
  854.                             }
  855.                             if (num4 < srcRect.Height)
  856.                             {
  857.                                 srcRect.Height = num4;
  858.                             }
  859.                             rectangle7 = new Rectangle(rect.Right - num3, 0, num3, num4);
  860.                             gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  861.                             rectangle5 = new Rectangle(rect.Right - num3, 0, num3, num4);
  862.                         }
  863.                         srcRect = Rectangle.FromLTRB((src.Width - (src.Width / 2)) + 1, (src.Height - (src.Height / 2)) + 1, src.Width, src.Height);
  864.                         destRect = Rectangle.FromLTRB((width - (width / 2)) + 1, (height - (height / 2)) + 1, width, height);
  865.                         if (destRect.Bottom > destRect.Top)
  866.                         {
  867.                             num3 = Math.Min(srcRect.Width, destRect.Width);
  868.                             if (num3 < 0)
  869.                             {
  870.                                 num3 = 0;
  871.                             }
  872.                             num4 = Math.Min(srcRect.Height, destRect.Height);
  873.                             if (num4 < 0)
  874.                             {
  875.                                 num4 = 0;
  876.                             }
  877.                             if ((num3 != 0) && (num4 != 0))
  878.                             {
  879.                                 if (num3 < srcRect.Width)
  880.                                 {
  881.                                     srcRect.X += srcRect.Width - num3;
  882.                                     srcRect.Width = num3;
  883.                                 }
  884.                                 if (num4 < srcRect.Height)
  885.                                 {
  886.                                     srcRect.Y += srcRect.Height - num4;
  887.                                     srcRect.Height = num4;
  888.                                 }
  889.                                 rectangle7 = new Rectangle(rect.Right - num3, rect.Bottom - num4, num3, num4);
  890.                                 gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  891.                                 rectangle6 = new Rectangle(rect.Right - num3, rect.Bottom - num4, num3, num4);
  892.                             }
  893.                             srcRect = Rectangle.FromLTRB((src.Width - (src.Width / 2)) + 1, src.Height - (src.Height / 2), src.Width, (src.Height / 2) + 2);
  894.                             destRect = Rectangle.FromLTRB(rectangle5.Left, rectangle5.Bottom, rectangle5.Right, rectangle6.Top);
  895.                             if (destRect.Bottom > destRect.Top)
  896.                             {
  897.                                 num3 = destRect.Width;
  898.                                 num4 = destRect.Height;
  899.                                 if ((num3 != 0) && (num4 != 0))
  900.                                 {
  901.                                     if (num3 < srcRect.Width)
  902.                                     {
  903.                                         srcRect.X += srcRect.Width - num3;
  904.                                         srcRect.Width = num3;
  905.                                     }
  906.                                     rectangle7 = new Rectangle(destRect.X, destRect.Y, num3, num4);
  907.                                     gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  908.                                 }
  909.                             }
  910.                             srcRect = Rectangle.FromLTRB(src.Width / 2, 0, (src.Width - (src.Width / 2)) + 1, src.Height / 2);
  911.                             destRect = Rectangle.FromLTRB(rectangle3.Right, 0, rectangle5.Left, rectangle3.Bottom);
  912.                             if (destRect.Bottom > destRect.Top)
  913.                             {
  914.                                 num3 = destRect.Width;
  915.                                 num4 = destRect.Height;
  916.                                 if ((num3 != 0) && (num4 != 0))
  917.                                 {
  918.                                     if (num4 < srcRect.Height)
  919.                                     {
  920.                                         srcRect.Height = num4;
  921.                                     }
  922.                                     rectangle7 = new Rectangle(destRect.X, destRect.Y, num3, num4);
  923.                                     gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  924.                                 }
  925.                             }
  926.                             srcRect = Rectangle.FromLTRB(src.Width / 2, src.Height / 2, (src.Width - (src.Width / 2)) + 1, src.Height - (src.Height / 2));
  927.                             destRect = Rectangle.FromLTRB(rectangle3.Right, rectangle3.Bottom, rectangle5.Left, rectangle6.Top - 1);
  928.                             if (destRect.Bottom > destRect.Top)
  929.                             {
  930.                                 num3 = destRect.Width;
  931.                                 num4 = destRect.Height;
  932.                                 if ((num3 != 0) && (num3 != 0))
  933.                                 {
  934.                                     rectangle7 = new Rectangle(destRect.X, destRect.Y, num3, num4);
  935.                                     gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  936.                                 }
  937.                             }
  938.                             srcRect = Rectangle.FromLTRB(src.Width / 2, src.Height - (src.Height / 2), (src.Width - (src.Width / 2)) + 1, src.Height);
  939.                             destRect = Rectangle.FromLTRB(rectangle3.Right - 1, rectangle4.Top - 1, rectangle6.Left, rectangle6.Bottom);
  940.                             if (destRect.Bottom > destRect.Top)
  941.                             {
  942.                                 num3 = destRect.Width;
  943.                                 num4 = destRect.Height;
  944.                                 if ((num3 != 0) && (num4 != 0))
  945.                                 {
  946.                                     if (num4 < srcRect.Height)
  947.                                     {
  948.                                         srcRect.Y += srcRect.Height - num4;
  949.                                         srcRect.Height = num4;
  950.                                     }
  951.                                     rectangle7 = new Rectangle(destRect.X, destRect.Y, num3, num4);
  952.                                     gDest.DrawImage(src, rectangle7, srcRect, GraphicsUnit.Pixel);
  953.                                 }
  954.                             }
  955.                         }
  956.                     }
  957.                 }
  958.             }
  959.         }
  960.         public static void StretchDrawWithHeader(Graphics g, Bitmap bmp, Rectangle dest, Rectangle src, int header)
  961.         {
  962.             Rectangle srcRect = new Rectangle(src.X, src.Y, src.Width, header);
  963.             Rectangle destRect = new Rectangle(dest.X, dest.Y, dest.Width, header);
  964.             g.DrawImage(bmp, destRect, srcRect, GraphicsUnit.Pixel);
  965.             srcRect = new Rectangle(src.X, src.Y + header, src.Width, src.Height - header);
  966.             destRect = new Rectangle(dest.X, dest.Y + header, dest.Width, dest.Height - header);
  967.             g.DrawImage(bmp, destRect, srcRect, GraphicsUnit.Pixel);
  968.         }
  969.         public static Color TabBackgroundFromBaseColor(Color backColor)
  970.         {
  971.             if (((backColor.R == 0xd4) && (backColor.G == 0xd0)) && (backColor.B == 200))
  972.             {
  973.                 return Color.FromArgb(0xf7, 0xf3, 0xe9);
  974.             }
  975.             if (((backColor.R == 0xec) && (backColor.G == 0xe9)) && (backColor.B == 0xd8))
  976.             {
  977.                 return Color.FromArgb(0xff, 0xfb, 0xe9);
  978.             }
  979.             int red = 0xff - ((0xff - backColor.R) / 2);
  980.             int green = 0xff - ((0xff - backColor.G) / 2);
  981.             int blue = 0xff - ((0xff - backColor.B) / 2);
  982.             return Color.FromArgb(red, green, blue);
  983.         }
  984.         public static Color DefaultTransparentColor
  985.         {
  986.             get
  987.             {
  988.                 return x27d07b3cbf2c9479;
  989.             }
  990.         }
  991.         public static ImageAttributes DrawImageAttrTileX
  992.         {
  993.             get
  994.             {
  995.                 return xc7766c1739984987;
  996.             }
  997.         }
  998.         public static ImageAttributes DrawImageAttrTileXY
  999.         {
  1000.             get
  1001.             {
  1002.                 return xa11b666f50e9398f;
  1003.             }
  1004.         }
  1005.         public static ImageAttributes DrawImageAttrTileY
  1006.         {
  1007.             get
  1008.             {
  1009.                 return x68a7ff53010868dc;
  1010.             }
  1011.         }
  1012.         public static Pen FocusRectanglePen
  1013.         {
  1014.             get
  1015.             {
  1016.                 return x4f0034703b20af0f;
  1017.             }
  1018.         }
  1019.         public static bool IsNeedHookCommonDialog
  1020.         {
  1021.             get
  1022.             {
  1023.                 if (!x02a9729195580525)
  1024.                 {
  1025.                     switch (GetCommonDialogVersion())
  1026.                     {
  1027.                         case "1.0.3300.0":
  1028.                         case "1.0.5000.0":
  1029.                             x605ccaa3586218f6 = false;
  1030.                             goto Label_0035;
  1031.                     }
  1032.                     x605ccaa3586218f6 = true;
  1033.                 }
  1034.             Label_0035:
  1035.                 return x605ccaa3586218f6;
  1036.             }
  1037.         }
  1038.         public static bool IsVista
  1039.         {
  1040.             get
  1041.             {
  1042.                 return (((Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 6)) && (Environment.OSVersion.Version.Minor == 0));
  1043.             }
  1044.         }
  1045.         public static StringFormat MainMenuStringFormat
  1046.         {
  1047.             get
  1048.             {
  1049.                 return x488379a1c8afe803;
  1050.             }
  1051.         }
  1052.         public static StringFormat MenuItemShortcutFormat
  1053.         {
  1054.             get
  1055.             {
  1056.                 return xad5d7fbaf75245c8;
  1057.             }
  1058.         }
  1059.         public static StringFormat MenuItemStringFormat
  1060.         {
  1061.             get
  1062.             {
  1063.                 return xd02bd90925d5d5ca;
  1064.             }
  1065.         }
  1066.         public static StringFormat MenuItemStringFormatR
  1067.         {
  1068.             get
  1069.             {
  1070.                 return xe8c22659bee459d5;
  1071.             }
  1072.         }
  1073.         public static Font TitleFont
  1074.         {
  1075.             get
  1076.             {
  1077.                 return GetCaptionFont();
  1078.             }
  1079.         }
  1080.     }
  1081. }