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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     using System.Windows.Forms;
  6.     internal class xc56e4251b5681836 : x8917d01b98173f4c
  7.     {
  8.         private x867b4abdb49f9449 x6092b63e9c2b4ce6;
  9.         private x867b4abdb49f9449 xa1f39a0e58651210;
  10.         public xc56e4251b5681836(Control control, SkinEngine engine) : base(control, engine)
  11.         {
  12.             this.xf149df02f1aa3d56();
  13.             if (control is CheckedListBox)
  14.             {
  15.                 this.x641297c2f10f25b0.Visible = false;
  16.             }
  17.             control.VisibleChanged += new EventHandler(this.xbad904bdcc347055);
  18.             control.SizeChanged += new EventHandler(this.xe8a173d72f8f3729);
  19.             control.LocationChanged += new EventHandler(this.x9fca9353a2d2087c);
  20.             control.Resize += new EventHandler(this.xb82f209246987e7a);
  21.             control.EnabledChanged += new EventHandler(this.xc68edf742e725d77);
  22.         }
  23.         protected override void AfterWndProc(ref Message m)
  24.         {
  25.             if ((base.CanPaint && base.Engine.SkinScrollBar) && this.CanScroll)
  26.             {
  27.                 if (m.Msg == 15)
  28.                 {
  29.                     x40255b11ef821fa3.PAINTSTRUCT paintstruct;
  30.                     x61467fe65a98f20c.BeginPaint(base.Handle, out paintstruct);
  31.                     this.PaintControl();
  32.                     x61467fe65a98f20c.EndPaint(base.Handle, ref paintstruct);
  33.                 }
  34.                 base.AfterWndProc(ref m);
  35.             }
  36.         }
  37.         protected override bool BeforeWndProc(ref Message m)
  38.         {
  39.             if (base.CanPaint)
  40.             {
  41.                 if (!base.Engine.SkinScrollBar)
  42.                 {
  43.                     return base.BeforeWndProc(ref m);
  44.                 }
  45.                 if (!this.CanScroll)
  46.                 {
  47.                     return base.BeforeWndProc(ref m);
  48.                 }
  49.                 uint msg = (uint) m.Msg;
  50.                 switch (msg)
  51.                 {
  52.                     case 0x114:
  53.                     case 0x115:
  54.                         this.PaintControl();
  55.                         break;
  56.                     default:
  57.                         if ((msg == 0x200) && (base.Ctrl is TextBox))
  58.                         {
  59.                             this.PaintControl();
  60.                         }
  61.                         break;
  62.                 }
  63.             }
  64.             return base.BeforeWndProc(ref m);
  65.         }
  66.         protected override void OnCurrentSkinChanged(object sender, SkinChangedEventArgs e)
  67.         {
  68.             base.OnCurrentSkinChanged(sender, e);
  69.             this.xf149df02f1aa3d56();
  70.         }
  71.         protected override void PaintControl()
  72.         {
  73.             base.PaintControl();
  74.             if ((((base.Ctrl.ClientRectangle.Width > 0) && (base.Ctrl.ClientRectangle.Height > 0)) && base.CanPaint) && base.Engine.SkinScrollBar)
  75.             {
  76.                 Rectangle rectangle;
  77.                 x40255b11ef821fa3.SCROLLBARINFO psbi = new x40255b11ef821fa3.SCROLLBARINFO();
  78.                 psbi.cbSize = 60;
  79.                 IntPtr windowDC = x61467fe65a98f20c.GetWindowDC(base.Handle);
  80.                 xae4dd1cafd2eb77c.RECT lpRect = new xae4dd1cafd2eb77c.RECT();
  81.                 x61467fe65a98f20c.GetWindowRect(base.Handle, ref lpRect);
  82.                 int left = 0;
  83.                 if (x61467fe65a98f20c.GetScrollBarInfo(base.Handle, 0xfffffffb, ref psbi))
  84.                 {
  85.                     rectangle = new Rectangle(psbi.rcScrollBar.left - lpRect.left, psbi.rcScrollBar.top - lpRect.top, psbi.rcScrollBar.right - psbi.rcScrollBar.left, psbi.rcScrollBar.bottom - psbi.rcScrollBar.top);
  86.                     if (((rectangle.X >= 0) && (rectangle.Y >= 0)) && ((rectangle.Width > 0) && (rectangle.Height > 0)))
  87.                     {
  88.                         rectangle.X += base.Ctrl.Left;
  89.                         rectangle.Y += base.Ctrl.Top;
  90.                         if ((base.Ctrl.RightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  91.                         {
  92.                             left = rectangle.Left;
  93.                         }
  94.                         else
  95.                         {
  96.                             left = rectangle.Right;
  97.                         }
  98.                         if (base.Ctrl.Parent is TableLayoutPanel)
  99.                         {
  100.                             rectangle.X += base.Ctrl.Parent.Left;
  101.                             rectangle.Y += base.Ctrl.Parent.Top;
  102.                         }
  103.                         if (this.x641297c2f10f25b0.Bounds != rectangle)
  104.                         {
  105.                             this.x641297c2f10f25b0.Bounds = rectangle;
  106.                         }
  107.                         this.x641297c2f10f25b0.Repaint(psbi);
  108.                     }
  109.                     else if (this.xa1f39a0e58651210 != null)
  110.                     {
  111.                         this.x641297c2f10f25b0.Visible = false;
  112.                     }
  113.                 }
  114.                 else if (this.xa1f39a0e58651210 != null)
  115.                 {
  116.                     this.x641297c2f10f25b0.Visible = false;
  117.                 }
  118.                 if (x61467fe65a98f20c.GetScrollBarInfo(base.Handle, 0xfffffffa, ref psbi))
  119.                 {
  120.                     rectangle = new Rectangle(psbi.rcScrollBar.left - lpRect.left, psbi.rcScrollBar.top - lpRect.top, psbi.rcScrollBar.right - psbi.rcScrollBar.left, psbi.rcScrollBar.bottom - psbi.rcScrollBar.top);
  121.                     if (((rectangle.X >= 0) && (rectangle.Y >= 0)) && ((rectangle.Width > 0) && (rectangle.Height > 0)))
  122.                     {
  123.                         rectangle.X += base.Ctrl.Left;
  124.                         rectangle.Y += base.Ctrl.Top;
  125.                         if (left != 0)
  126.                         {
  127.                             if ((base.Ctrl.RightToLeft & RightToLeft.Yes) == RightToLeft.Yes)
  128.                             {
  129.                                 rectangle = Rectangle.FromLTRB(left, rectangle.Top, rectangle.Right, rectangle.Bottom);
  130.                             }
  131.                             else
  132.                             {
  133.                                 rectangle = Rectangle.FromLTRB(rectangle.Left, rectangle.Top, left, rectangle.Bottom);
  134.                             }
  135.                         }
  136.                         if (base.Ctrl.Parent is TableLayoutPanel)
  137.                         {
  138.                             rectangle.X += base.Ctrl.Parent.Left;
  139.                             rectangle.Y += base.Ctrl.Parent.Top;
  140.                         }
  141.                         if (this.x17ac55c3881d8810.Bounds != rectangle)
  142.                         {
  143.                             this.x17ac55c3881d8810.Bounds = rectangle;
  144.                         }
  145.                         this.x17ac55c3881d8810.Repaint(psbi);
  146.                     }
  147.                     else if (this.x6092b63e9c2b4ce6 != null)
  148.                     {
  149.                         this.x17ac55c3881d8810.Visible = false;
  150.                     }
  151.                 }
  152.                 else if (this.x6092b63e9c2b4ce6 != null)
  153.                 {
  154.                     this.x17ac55c3881d8810.Visible = false;
  155.                 }
  156.                 x61467fe65a98f20c.ReleaseDC(base.Handle, windowDC);
  157.             }
  158.         }
  159.         private void x9fca9353a2d2087c(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  160.         {
  161.             this.xf149df02f1aa3d56();
  162.         }
  163.         private void xb82f209246987e7a(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  164.         {
  165.             this.xf149df02f1aa3d56();
  166.         }
  167.         private void xbad904bdcc347055(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  168.         {
  169.             this.xf149df02f1aa3d56();
  170.         }
  171.         private void xc68edf742e725d77(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  172.         {
  173.             this.PaintControl();
  174.         }
  175.         private void xdf8f78b46a8ed400(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  176.         {
  177.             this.PaintControl();
  178.         }
  179.         private void xe8a173d72f8f3729(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  180.         {
  181.             this.xf149df02f1aa3d56();
  182.             this.PaintControl();
  183.         }
  184.         private void xf149df02f1aa3d56()
  185.         {
  186.             if (this.x6092b63e9c2b4ce6 != null)
  187.             {
  188.                 this.x17ac55c3881d8810.Visible = ((base.CanPaint & base.Ctrl.Visible) & base.Engine.SkinScrollBar) & this.CanScroll;
  189.             }
  190.             if (this.xa1f39a0e58651210 != null)
  191.             {
  192.                 this.x641297c2f10f25b0.Visible = ((base.CanPaint & base.Ctrl.Visible) & base.Engine.SkinScrollBar) & this.CanScroll;
  193.             }
  194.         }
  195.         protected virtual bool CanScroll
  196.         {
  197.             get
  198.             {
  199.                 return true;
  200.             }
  201.         }
  202.         private x867b4abdb49f9449 x17ac55c3881d8810
  203.         {
  204.             get
  205.             {
  206.                 if (this.x6092b63e9c2b4ce6 == null)
  207.                 {
  208.                     this.x6092b63e9c2b4ce6 = new x867b4abdb49f9449(base.Ctrl, base.Engine, true);
  209.                 }
  210.                 return this.x6092b63e9c2b4ce6;
  211.             }
  212.         }
  213.         private x867b4abdb49f9449 x641297c2f10f25b0
  214.         {
  215.             get
  216.             {
  217.                 if (this.xa1f39a0e58651210 == null)
  218.                 {
  219.                     this.xa1f39a0e58651210 = new x867b4abdb49f9449(base.Ctrl, base.Engine, false);
  220.                 }
  221.                 return this.xa1f39a0e58651210;
  222.             }
  223.         }
  224.     }
  225. }