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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     internal class xdbcc71de92f8e117 : x5b126f5f998c28e9
  6.     {
  7.         public xdbcc71de92f8e117(IntPtr handle, SkinEngine engine) : base(handle, engine)
  8.         {
  9.         }
  10.         protected override void PaintControl()
  11.         {
  12.             int index = 1;
  13.             switch (((uint) ((int) x61467fe65a98f20c.SendMessage(base.Handle, 240, IntPtr.Zero, IntPtr.Zero))))
  14.             {
  15.                 case 1:
  16.                     if (this.Enabled)
  17.                     {
  18.                         index = 1;
  19.                     }
  20.                     else
  21.                     {
  22.                         index = 4;
  23.                     }
  24.                     break;
  25.                 case 2:
  26.                     if (this.Enabled)
  27.                     {
  28.                         index = 2;
  29.                     }
  30.                     else
  31.                     {
  32.                         index = 5;
  33.                     }
  34.                     break;
  35.                 default:
  36.                     if (this.Enabled)
  37.                     {
  38.                         index = 3;
  39.                     }
  40.                     else
  41.                     {
  42.                         index = 6;
  43.                     }
  44.                     break;
  45.             }
  46.             Bitmap image = base.Engine.Res.SplitBitmaps.SKIN2_CHECKBOX[index];
  47.             int width = image.Width;
  48.             int height = image.Height;
  49.             if (width < 14)
  50.             {
  51.                 width = 14;
  52.             }
  53.             else if (width > 15)
  54.             {
  55.                 width = 15;
  56.             }
  57.             if (height < 14)
  58.             {
  59.                 height = 14;
  60.             }
  61.             else if (height > 15)
  62.             {
  63.                 height = 15;
  64.             }
  65.             using (Bitmap bitmap2 = new Bitmap(width, height))
  66.             {
  67.                 Rectangle rectangle;
  68.                 Rectangle rectangle2;
  69.                 using (Graphics graphics = Graphics.FromImage(bitmap2))
  70.                 {
  71.                     graphics.FillRectangle(base.Engine.Res.Brushes.SKIN2_FORMCOLOR, 0, 0, width, height);
  72.                     rectangle = new Rectangle(0, 0, width, height);
  73.                     rectangle2 = new Rectangle(0, 0, image.Width, image.Height);
  74.                     graphics.DrawImage(image, rectangle, rectangle2, GraphicsUnit.Pixel);
  75.                 }
  76.                 IntPtr windowDC = x61467fe65a98f20c.GetWindowDC(base.Handle);
  77.                 using (Graphics graphics2 = Graphics.FromHdc(windowDC))
  78.                 {
  79.                     rectangle2 = new Rectangle(0, 0, width, height);
  80.                     rectangle = rectangle2;
  81.                     graphics2.DrawImage(bitmap2, rectangle, rectangle2, GraphicsUnit.Pixel);
  82.                 }
  83.                 x61467fe65a98f20c.ReleaseDC(base.Handle, windowDC);
  84.             }
  85.         }
  86.     }
  87. }