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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     using System.Runtime.InteropServices;
  6.     using System.Windows.Forms;
  7.     internal class x2ada8799c851d3c1 : x2edc3f693fe78d2e
  8.     {
  9.         private int x01b557925841ae51;
  10.         private Control x256c9720723a7c14;
  11.         public x2ada8799c851d3c1(Control control, SkinEngine engine) : base(control, engine)
  12.         {
  13.         }
  14.         protected override void DoInit()
  15.         {
  16.             base.DoInit();
  17.             if (base.Ctrl.Controls.Count > 0)
  18.             {
  19.                 this.x256c9720723a7c14 = base.Ctrl.Controls[0];
  20.                 this.x256c9720723a7c14.Paint += new PaintEventHandler(this.x36ba227d26d9f4d3);
  21.             }
  22.             base.Ctrl.MouseDown += new MouseEventHandler(this.x2c376bc5808866ab);
  23.             base.Ctrl.MouseUp += new MouseEventHandler(this.x311c106b70013575);
  24.         }
  25.         private void x2c376bc5808866ab(object xe0292b9ed559da7d, MouseEventArgs xfbf34718e704c6bc)
  26.         {
  27.             if (xfbf34718e704c6bc.Button == MouseButtons.Left)
  28.             {
  29.                 Rectangle rectangle;
  30.                 Rectangle rectangle2;
  31.                 this.x9c2d0a8c2d93d7c6(out rectangle, out rectangle2);
  32.                 Point p = new Point(xfbf34718e704c6bc.X, xfbf34718e704c6bc.Y);
  33.                 if (x448fd9ab43628c71.InRect(p, rectangle))
  34.                 {
  35.                     this.x01b557925841ae51 = -1;
  36.                 }
  37.                 else if (x448fd9ab43628c71.InRect(p, rectangle2))
  38.                 {
  39.                     this.x01b557925841ae51 = 1;
  40.                 }
  41.                 else
  42.                 {
  43.                     this.x01b557925841ae51 = 0;
  44.                 }
  45.             }
  46.         }
  47.         private void x311c106b70013575(object xe0292b9ed559da7d, MouseEventArgs xfbf34718e704c6bc)
  48.         {
  49.             this.x01b557925841ae51 = 0;
  50.         }
  51.         private void x36ba227d26d9f4d3(object xe0292b9ed559da7d, PaintEventArgs xfbf34718e704c6bc)
  52.         {
  53.             if (base.CanPaint)
  54.             {
  55.                 Brush brush;
  56.                 Graphics graphics = xfbf34718e704c6bc.Graphics;
  57.                 int width = this.x256c9720723a7c14.Width;
  58.                 int height = this.x256c9720723a7c14.Height;
  59.                 Rectangle rect = new Rectangle(0, 0, width, height);
  60.                 Bitmap image = new Bitmap(width, height);
  61.                 Rectangle rectangle2 = new Rectangle(0, 0, this.x256c9720723a7c14.Width, this.x256c9720723a7c14.Height / 2);
  62.                 Rectangle rectangle3 = new Rectangle(0, this.x256c9720723a7c14.Height / 2, this.x256c9720723a7c14.Width, this.x256c9720723a7c14.Height / 2);
  63.                 Graphics g = Graphics.FromImage(image);
  64.                 if (this.x01b557925841ae51 == -1)
  65.                 {
  66.                     brush = base.Engine.Res.Brushes.SKIN2_TOOLBARDOWNCOLOR;
  67.                 }
  68.                 else
  69.                 {
  70.                     brush = base.Engine.Res.Brushes.SKIN2_FORMCOLOR;
  71.                 }
  72.                 g.FillRectangle(brush, rectangle2);
  73.                 if (this.x01b557925841ae51 == 1)
  74.                 {
  75.                     brush = base.Engine.Res.Brushes.SKIN2_TOOLBARDOWNCOLOR;
  76.                 }
  77.                 else
  78.                 {
  79.                     brush = base.Engine.Res.Brushes.SKIN2_FORMCOLOR;
  80.                 }
  81.                 g.FillRectangle(brush, rectangle3);
  82.                 int x = (((rectangle2.Right - rectangle2.Left) - 6) / 2) + rectangle2.Left;
  83.                 int y = (((rectangle2.Bottom - rectangle2.Top) + 3) / 2) + rectangle2.Top;
  84.                 if (this.x01b557925841ae51 == -1)
  85.                 {
  86.                     x++;
  87.                     y++;
  88.                 }
  89.                 x448fd9ab43628c71.DrawArrowUp(g, x, y, base.Ctrl.Enabled);
  90.                 x = (((rectangle3.Right - rectangle3.Left) - 6) / 2) + rectangle3.Left;
  91.                 y = (((rectangle3.Bottom - rectangle3.Top) - 3) / 2) + rectangle3.Top;
  92.                 if (this.x01b557925841ae51 == 1)
  93.                 {
  94.                     x++;
  95.                     y++;
  96.                 }
  97.                 x448fd9ab43628c71.DrawArrowDown(g, x, y, base.Ctrl.Enabled);
  98.                 graphics.DrawImageUnscaled(image, rect);
  99.                 g.Dispose();
  100.                 image.Dispose();
  101.             }
  102.         }
  103.         private void x6e1c0299f4a4ec84(object xe0292b9ed559da7d, MouseEventArgs xfbf34718e704c6bc)
  104.         {
  105.             this.x01b557925841ae51 = 0;
  106.         }
  107.         private void x9c2d0a8c2d93d7c6(out Rectangle x704d5d75fd559aed, out Rectangle x68123086ccad0951)
  108.         {
  109.             int x = 0;
  110.             x704d5d75fd559aed = new Rectangle(x, 0, this.x256c9720723a7c14.Width, this.x256c9720723a7c14.Height / 2);
  111.             x68123086ccad0951 = new Rectangle(x, this.x256c9720723a7c14.Height / 2, this.x256c9720723a7c14.Width, this.x256c9720723a7c14.Height / 2);
  112.         }
  113.         protected override bool ChangeBackColor
  114.         {
  115.             get
  116.             {
  117.                 return false;
  118.             }
  119.         }
  120.     }
  121. }