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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using System;
  4.     using System.Drawing;
  5.     using System.Text;
  6.     using System.Windows.Forms;
  7.     internal class xb052c904ac95dc43 : xd24df615efe9450e
  8.     {
  9.         private bool x66bf3eedd0ff9957;
  10.         private bool xa8a1d8725b684fc0;
  11.         private bool xc670990170293979;
  12.         private bool xdfdb4d7af566dc92;
  13.         public xb052c904ac95dc43(IntPtr handle, SkinEngine engine) : base(handle, engine)
  14.         {
  15.             this.x66bf3eedd0ff9957 = true;
  16.             this.xc670990170293979 = true;
  17.             int windowTextLengthA = x61467fe65a98f20c.GetWindowTextLengthA(base.Handle);
  18.             if (windowTextLengthA == 8)
  19.             {
  20.                 StringBuilder lpString = new StringBuilder(windowTextLengthA, windowTextLengthA + 1);
  21.                 x61467fe65a98f20c.GetWindowText(base.Handle, lpString, windowTextLengthA);
  22.                 if (lpString.ToString(0, 4) == "打印预览")
  23.                 {
  24.                     this.xc670990170293979 = false;
  25.                 }
  26.             }
  27.         }
  28.         protected override void AfterWndProc(ref Message m)
  29.         {
  30.             base.AfterWndProc(ref m);
  31.             uint msg = (uint) m.Msg;
  32.             if (msg == 5)
  33.             {
  34.                 xae4dd1cafd2eb77c.RECT lpRect = new xae4dd1cafd2eb77c.RECT();
  35.                 if (((x61467fe65a98f20c.GetWindowRect(base.Handle, ref lpRect) && !this.xdfdb4d7af566dc92) && (!this.x66bf3eedd0ff9957 && !base.Initializing)) && (this.BorderStyle == FormBorderStyle.FixedDialog))
  36.                 {
  37.                     this.xdfdb4d7af566dc92 = true;
  38.                     this.ApplySkin();
  39.                     x61467fe65a98f20c.MoveWindow(base.Handle, lpRect.left, lpRect.top, lpRect.right - lpRect.left, (((((lpRect.bottom - lpRect.top) + this.TitleHeight) + this.MenuHeight) - SystemInformation.CaptionHeight) + base.Engine.BottomBorderHeight) - 4, true);
  40.                 }
  41.                 this.RegionWindow();
  42.             }
  43.             else if ((msg == 15) && !this.xa8a1d8725b684fc0)
  44.             {
  45.                 this.RegionWindow();
  46.             }
  47.         }
  48.         protected override void ApplySkin()
  49.         {
  50.             if (this.CanPaint)
  51.             {
  52.                 int cx = 0;
  53.                 int cy = 0;
  54.                 int num3 = 4;
  55.                 int num4 = 4;
  56.                 int num5 = 4;
  57.                 num3 = Math.Max(base.Engine.LeftBorderWidth, base.cxBorder);
  58.                 num4 = Math.Max(base.Engine.RightBorderWidth, base.cxBorder);
  59.                 num5 = Math.Max(base.Engine.BottomBorderHeight, base.cyBorder);
  60.                 cy = ((this.ClientRectangle.Height + base.Engine.TitleHeight) + this.MenuHeight) + num5;
  61.                 cx = (this.ClientRectangle.Width + num3) + num4;
  62.                 this.x66bf3eedd0ff9957 = true;
  63.                 x61467fe65a98f20c.SetWindowPos(base.Handle, IntPtr.Zero, 0, 0, cx, cy, 0x16);
  64.                 this.x66bf3eedd0ff9957 = false;
  65.             }
  66.         }
  67.         protected override bool BeforeWndProc(ref Message m)
  68.         {
  69.             switch (((uint) m.Msg))
  70.             {
  71.                 case 5:
  72.                     if (!this.xc670990170293979)
  73.                     {
  74.                         break;
  75.                     }
  76.                     return false;
  77.                 case 0x135:
  78.                 case 0x138:
  79.                     m.Result = base.Engine.BackColorBrush;
  80.                     x31775329b2a4ff52.SetBkMode(m.WParam, 1);
  81.                     return false;
  82.             }
  83.             return base.BeforeWndProc(ref m);
  84.         }
  85.         protected override void DoSysMenu()
  86.         {
  87.         }
  88.         protected override void DoSysMenu(Point p)
  89.         {
  90.         }
  91.         protected override Point PointToScreen(Point point)
  92.         {
  93.             x61467fe65a98f20c.ClientToScreen(base.Handle, ref point);
  94.             return point;
  95.         }
  96.         protected override void RegionWindow()
  97.         {
  98.             base.RegionWindow();
  99.             this.xa8a1d8725b684fc0 = true;
  100.         }
  101.         protected override void SkinControls()
  102.         {
  103.             IntPtr topWindow = x61467fe65a98f20c.GetTopWindow(base.Handle);
  104.             ulong windowLong = 0L;
  105.             while (topWindow != IntPtr.Zero)
  106.             {
  107.                 x5b126f5f998c28e9 xbffce;
  108.                 if (base.ControlTable.ContainsKey(topWindow))
  109.                 {
  110.                     topWindow = x61467fe65a98f20c.GetWindow(topWindow, 2);
  111.                     continue;
  112.                 }
  113.                 StringBuilder lpClassName = new StringBuilder(260);
  114.                 windowLong = x61467fe65a98f20c.GetWindowLong(topWindow, -16);
  115.                 x61467fe65a98f20c.GetClassName(topWindow, lpClassName, 260);
  116.                 if ((windowLong & ((ulong) 0x40000000L)) != 0x40000000L)
  117.                 {
  118.                     topWindow = x61467fe65a98f20c.GetWindow(topWindow, 2);
  119.                     continue;
  120.                 }
  121.                 string name = lpClassName.ToString().ToUpper();
  122.                 switch (name)
  123.                 {
  124.                     case "COMBOBOX":
  125.                     {
  126.                         if ((windowLong & ((ulong) 3L)) != 1L)
  127.                         {
  128.                             break;
  129.                         }
  130.                         topWindow = x61467fe65a98f20c.GetWindow(topWindow, 2);
  131.                         continue;
  132.                     }
  133.                     case "COMBOBOXEX32":
  134.                     {
  135.                         xbffce = x735ffd864c9f9835.Create(x61467fe65a98f20c.GetTopWindow(topWindow), name, base.Engine);
  136.                         base.ControlTable.Add(topWindow, xbffce);
  137.                         continue;
  138.                     }
  139.                     case "BUTTON":
  140.                         if ((windowLong & ((ulong) 7L)) == 7L)
  141.                         {
  142.                             topWindow = x61467fe65a98f20c.GetWindow(topWindow, 2);
  143.                             continue;
  144.                         }
  145.                         if ((((windowLong & ((ulong) 3L)) == 3L) || ((windowLong & ((ulong) 2L)) == 2L)) || ((windowLong & ((ulong) 5L)) == 5L))
  146.                         {
  147.                             name = name + "_CHECKBOX";
  148.                         }
  149.                         else if (((windowLong & ((ulong) 9L)) == 9L) || ((windowLong & ((ulong) 4L)) == 4L))
  150.                         {
  151.                             name = name + "_RADIOBUTTON";
  152.                         }
  153.                         break;
  154.                 }
  155.                 xbffce = x735ffd864c9f9835.Create(topWindow, name, base.Engine);
  156.                 base.ControlTable.Add(topWindow, xbffce);
  157.             }
  158.         }
  159.         protected override FormBorderStyle BorderStyle
  160.         {
  161.             get
  162.             {
  163.                 if ((x61467fe65a98f20c.GetWindowLong(base.Handle, -16) & 0x40000) == 0x40000)
  164.                 {
  165.                     return FormBorderStyle.Sizable;
  166.                 }
  167.                 return FormBorderStyle.FixedDialog;
  168.             }
  169.         }
  170.         protected override Rectangle ClientRectangle
  171.         {
  172.             get
  173.             {
  174.                 Rectangle lpRect = new Rectangle(0, 0, 0, 0);
  175.                 x61467fe65a98f20c.GetClientRect(base.Handle, ref lpRect);
  176.                 return lpRect;
  177.             }
  178.         }
  179.         protected override bool ControlBox
  180.         {
  181.             get
  182.             {
  183.                 return true;
  184.             }
  185.         }
  186.         protected override int Height
  187.         {
  188.             get
  189.             {
  190.                 xae4dd1cafd2eb77c.RECT lpRect = new xae4dd1cafd2eb77c.RECT();
  191.                 x61467fe65a98f20c.GetWindowRect(base.Handle, ref lpRect);
  192.                 return (lpRect.bottom - lpRect.top);
  193.             }
  194.         }
  195.         protected override bool HelpButton
  196.         {
  197.             get
  198.             {
  199.                 return false;
  200.             }
  201.         }
  202.         protected override System.Drawing.Icon Icon
  203.         {
  204.             get
  205.             {
  206.                 return null;
  207.             }
  208.         }
  209.         protected override bool IsDisposed
  210.         {
  211.             get
  212.             {
  213.                 return false;
  214.             }
  215.         }
  216.         protected override bool IsMdiChild
  217.         {
  218.             get
  219.             {
  220.                 return false;
  221.             }
  222.         }
  223.         protected override bool IsMdiContainer
  224.         {
  225.             get
  226.             {
  227.                 return false;
  228.             }
  229.         }
  230.         protected override bool MaximizeBox
  231.         {
  232.             get
  233.             {
  234.                 ulong windowLong = x61467fe65a98f20c.GetWindowLong(base.Handle, -16);
  235.                 return ((windowLong & ((ulong) 0x10000L)) == 0x10000L);
  236.             }
  237.         }
  238.         protected override bool MinimizeBox
  239.         {
  240.             get
  241.             {
  242.                 ulong windowLong = x61467fe65a98f20c.GetWindowLong(base.Handle, -16);
  243.                 return ((windowLong & ((ulong) 0x20000L)) == 0x20000L);
  244.             }
  245.         }
  246.         protected override System.Drawing.Region Region
  247.         {
  248.             get
  249.             {
  250.                 return null;
  251.             }
  252.             set
  253.             {
  254.                 IntPtr windowDC = x61467fe65a98f20c.GetWindowDC(base.Handle);
  255.                 using (Graphics graphics = Graphics.FromHdc(windowDC))
  256.                 {
  257.                     if (value != null)
  258.                     {
  259.                         IntPtr hrgn = value.GetHrgn(graphics);
  260.                         x61467fe65a98f20c.SetWindowRgn(base.Handle, hrgn, true);
  261.                         x31775329b2a4ff52.DeleteObject(hrgn);
  262.                     }
  263.                     else
  264.                     {
  265.                         x61467fe65a98f20c.SetWindowRgn(base.Handle, IntPtr.Zero, true);
  266.                     }
  267.                 }
  268.                 x61467fe65a98f20c.ReleaseDC(base.Handle, windowDC);
  269.             }
  270.         }
  271.         protected override System.Windows.Forms.RightToLeft RightToLeft
  272.         {
  273.             get
  274.             {
  275.                 if ((x61467fe65a98f20c.GetWindowLong(base.Handle, -20) & 0x1000) != 0x1000)
  276.                 {
  277.                     return System.Windows.Forms.RightToLeft.No;
  278.                 }
  279.                 return System.Windows.Forms.RightToLeft.Yes;
  280.             }
  281.         }
  282.         protected override bool RightToLeftLayout
  283.         {
  284.             get
  285.             {
  286.                 return false;
  287.             }
  288.         }
  289.         protected override object Tag
  290.         {
  291.             get
  292.             {
  293.                 return new object();
  294.             }
  295.         }
  296.         protected override string Text
  297.         {
  298.             get
  299.             {
  300.                 int windowTextLengthA = x61467fe65a98f20c.GetWindowTextLengthA(base.Handle);
  301.                 if (windowTextLengthA > 0)
  302.                 {
  303.                     windowTextLengthA++;
  304.                     StringBuilder lpString = new StringBuilder(windowTextLengthA);
  305.                     x61467fe65a98f20c.GetWindowText(base.Handle, lpString, windowTextLengthA);
  306.                     if (lpString != null)
  307.                     {
  308.                         return lpString.ToString();
  309.                     }
  310.                 }
  311.                 return "";
  312.             }
  313.         }
  314.         protected override int Width
  315.         {
  316.             get
  317.             {
  318.                 xae4dd1cafd2eb77c.RECT lpRect = new xae4dd1cafd2eb77c.RECT();
  319.                 x61467fe65a98f20c.GetWindowRect(base.Handle, ref lpRect);
  320.                 return (lpRect.right - lpRect.left);
  321.             }
  322.         }
  323.     }
  324. }