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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     using System.Windows.Forms;
  6.     internal class xcf289f871d952cfd : x5b126f5f998c28e9
  7.     {
  8.         public xcf289f871d952cfd(IntPtr handle, SkinEngine engine) : base(handle, engine)
  9.         {
  10.         }
  11.         protected override void AfterWndProc(ref Message m)
  12.         {
  13.             x40255b11ef821fa3.PAINTSTRUCT paintstruct;
  14.             uint msg = (uint) m.Msg;
  15.             if (msg <= 15)
  16.             {
  17.                 if ((msg != 12) && (msg != 15))
  18.                 {
  19.                     return;
  20.                 }
  21.             }
  22.             else
  23.             {
  24.                 switch (msg)
  25.                 {
  26.                     case 0x201:
  27.                     case 0x202:
  28.                         this.PaintControl();
  29.                         return;
  30.                     case 0x203:
  31.                     case 20:
  32.                         goto Label_0035;
  33.                 }
  34.                 return;
  35.             }
  36.         Label_0035:
  37.             x61467fe65a98f20c.BeginPaint(base.Handle, out paintstruct);
  38.             this.PaintControl();
  39.             x61467fe65a98f20c.EndPaint(base.Handle, ref paintstruct);
  40.         }
  41.         protected override void PaintControl()
  42.         {
  43.             int num;
  44.             if ((x61467fe65a98f20c.SendMessage(base.Handle, 240, IntPtr.Zero, IntPtr.Zero).ToInt32() & 1L) == 1L)
  45.             {
  46.                 if (this.Enabled)
  47.                 {
  48.                     num = 1;
  49.                 }
  50.                 else
  51.                 {
  52.                     num = 3;
  53.                 }
  54.             }
  55.             else if (this.Enabled)
  56.             {
  57.                 num = 2;
  58.             }
  59.             else
  60.             {
  61.                 num = 4;
  62.             }
  63.             Bitmap image = base.Engine.Res.SplitBitmaps.SKIN2_RADIOBUTTON[num];
  64.             int width = image.Width;
  65.             int height = image.Height;
  66.             if (width < 14)
  67.             {
  68.                 width = 14;
  69.             }
  70.             else if (width > 15)
  71.             {
  72.                 width = 15;
  73.             }
  74.             if (height < 14)
  75.             {
  76.                 height = 14;
  77.             }
  78.             else if (height > 15)
  79.             {
  80.                 height = 15;
  81.             }
  82.             using (Bitmap bitmap2 = new Bitmap(width, height))
  83.             {
  84.                 Rectangle rectangle;
  85.                 Rectangle rectangle2;
  86.                 using (Graphics graphics = Graphics.FromImage(bitmap2))
  87.                 {
  88.                     rectangle = new Rectangle(0, 0, image.Width, image.Height);
  89.                     rectangle2 = new Rectangle(0, 0, width, height);
  90.                     graphics.FillRectangle(base.Engine.Res.Brushes.SKIN2_FORMCOLOR, 0, 0, width, height);
  91.                     graphics.DrawImage(image, rectangle2, rectangle, GraphicsUnit.Pixel);
  92.                 }
  93.                 IntPtr windowDC = x61467fe65a98f20c.GetWindowDC(base.Handle);
  94.                 using (Graphics graphics2 = Graphics.FromHdc(windowDC))
  95.                 {
  96.                     rectangle = new Rectangle(0, 0, width, height);
  97.                     rectangle2 = rectangle;
  98.                     graphics2.DrawImage(bitmap2, rectangle2, rectangle, GraphicsUnit.Pixel);
  99.                 }
  100.                 x61467fe65a98f20c.ReleaseDC(base.Handle, windowDC);
  101.             }
  102.         }
  103.     }
  104. }