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

.net编程

开发平台:

C#

  1. namespace Sunisoft.IrisSkin
  2. {
  3.     using Sunisoft.IrisSkin.InternalControls;
  4.     using System;
  5.     using System.Collections;
  6.     using System.Drawing;
  7.     using System.Drawing.Drawing2D;
  8.     using System.Windows.Forms;
  9.     internal class xa427f1b2281f554b : xd24df615efe9450e
  10.     {
  11.         private x3c41176af7e54b01 x5486200f56f78413;
  12.         private bool x71d812f69bdec219;
  13.         private Color x7c26c2d810682d2e;
  14.         private MainMenu x946d4396b0c9cde4;
  15.         private xa1883d0b59b7005b xad9f8190f430c699;
  16.         private x095234c5c1abb370 xf6c8424d43a8aa53;
  17.         internal xa427f1b2281f554b(IntPtr handle, SkinEngine engine) : base(handle, engine)
  18.         {
  19.             base.Target = (Form) Control.FromHandle(handle);
  20.             this.x7c26c2d810682d2e = base.Target.BackColor;
  21.             this.x5486200f56f78413 = new x3c41176af7e54b01(base.Engine);
  22.             this.x30c11b5a89921b08();
  23.             if (base.Target.ContextMenu != null)
  24.             {
  25.                 this.xad9f8190f430c699 = new xa1883d0b59b7005b(base.Engine, base.Target.ContextMenu);
  26.             }
  27.             this.x33251e4c534e7926();
  28.             base.ChildTable = new Hashtable();
  29.             if (base.Target.IsMdiContainer)
  30.             {
  31.                 this.x08d09b54d1a926bd();
  32.             }
  33.             this.x05931f73c2d66689();
  34.             if (base.Target.ContextMenuStrip != null)
  35.             {
  36.                 this.xf6c8424d43a8aa53 = new x095234c5c1abb370(base.Target.ContextMenuStrip, base.Engine);
  37.             }
  38.             if (base.Target.MainMenuStrip != null)
  39.             {
  40.                 base.Target.MainMenuStrip.LocationChanged += new EventHandler(this.x1d183dacf6b4e43c);
  41.             }
  42.         }
  43.         protected override bool BeforeWndProc(ref Message m)
  44.         {
  45.             if ((m.Msg == 0x20d3) && (m.WParam.ToInt32() == 0x20d3))
  46.             {
  47.                 this.xbe3f57786c90d37f();
  48.             }
  49.             return base.BeforeWndProc(ref m);
  50.         }
  51.         protected override void OnCurrentSkinChanged(object sender, SkinChangedEventArgs e)
  52.         {
  53.             if (!this.CanPaint)
  54.             {
  55.                 if (this.x5486200f56f78413 != null)
  56.                 {
  57.                     this.x5486200f56f78413.MdiContainer = null;
  58.                     if (base.Target.Controls.Contains(this.x5486200f56f78413))
  59.                     {
  60.                         base.Target.Controls.Remove(this.x5486200f56f78413);
  61.                     }
  62.                 }
  63.                 if ((base.Target.Menu != this.x946d4396b0c9cde4) && (this.x946d4396b0c9cde4 != null))
  64.                 {
  65.                     base.Target.Menu = this.x946d4396b0c9cde4;
  66.                 }
  67.                 this.x33251e4c534e7926();
  68.                 if (this.CanPaintChild)
  69.                 {
  70.                     this.x7ca6c09f91bb596a();
  71.                 }
  72.             }
  73.             else
  74.             {
  75.                 this.x30c11b5a89921b08();
  76.                 this.x33251e4c534e7926();
  77.                 this.x7ca6c09f91bb596a();
  78.                 this.RegionWindow();
  79.             }
  80.             this.x05931f73c2d66689();
  81.             base.OnCurrentSkinChanged(sender, e);
  82.         }
  83.         protected override void PaintBorder(Graphics g)
  84.         {
  85.             Rectangle rectangle;
  86.             Rectangle rectangle2;
  87.             Rectangle rectangle3;
  88.             Rectangle rectangle4;
  89.             base.PaintBorder(g);
  90.             if (((base.Engine.LeftBorderWidth >= base.cxBorder) && (base.Engine.RightBorderWidth >= base.cxBorder)) || (this.x946d4396b0c9cde4 == null))
  91.             {
  92.                 goto Label_0357;
  93.             }
  94.             int height = this.x5486200f56f78413.Height;
  95.             Bitmap image = base.Engine.Res.Bitmaps.SKIN2_MENUBAR;
  96.             if (base.Engine.LeftBorderWidth < base.cxBorder)
  97.             {
  98.                 rectangle = new Rectangle(base.Engine.LeftBorderWidth, base.Engine.TitleHeight + this.x5486200f56f78413.Top, base.cxBorder - base.Engine.LeftBorderWidth, height);
  99.                 if (image != null)
  100.                 {
  101.                     if (image.Width > (base.cxBorder - base.Engine.LeftBorderWidth))
  102.                     {
  103.                         rectangle2 = new Rectangle(0, 0, base.cxBorder - base.Engine.LeftBorderWidth, image.Height);
  104.                     }
  105.                     else
  106.                     {
  107.                         rectangle2 = new Rectangle(0, 0, image.Width, image.Height);
  108.                     }
  109.                     g.DrawImage(image, rectangle, rectangle2.X, rectangle2.Y, rectangle2.Width, rectangle2.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  110.                 }
  111.                 else
  112.                 {
  113.                     if (base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR != base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR)
  114.                     {
  115.                         using (LinearGradientBrush brush = new LinearGradientBrush(rectangle, base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR, base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR, LinearGradientMode.Vertical))
  116.                         {
  117.                             g.FillRectangle(brush, rectangle);
  118.                             goto Label_01CD;
  119.                         }
  120.                     }
  121.                     g.FillRectangle(base.Engine.Res.Brushes.SKIN2_MENUBARSTARTCOLOR, rectangle);
  122.                 }
  123.             }
  124.         Label_01CD:
  125.             if (base.Engine.RightBorderWidth < base.cxBorder)
  126.             {
  127.                 rectangle = new Rectangle(this.Width - base.cxBorder, this.x5486200f56f78413.Top + base.Engine.TitleHeight, base.cxBorder - base.Engine.RightBorderWidth, height);
  128.                 if (image != null)
  129.                 {
  130.                     if (image.Width > (base.cxBorder - base.Engine.RightBorderWidth))
  131.                     {
  132.                         rectangle2 = new Rectangle((image.Width - base.cxBorder) + base.Engine.RightBorderWidth, 0, base.cxBorder - base.Engine.RightBorderWidth, image.Height);
  133.                     }
  134.                     else
  135.                     {
  136.                         rectangle2 = new Rectangle(0, 0, image.Width, image.Height);
  137.                     }
  138.                     g.DrawImage(image, rectangle, rectangle2.X, rectangle2.Y, rectangle2.Width, rectangle2.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  139.                 }
  140.                 else
  141.                 {
  142.                     if (base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR != base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR)
  143.                     {
  144.                         using (LinearGradientBrush brush2 = new LinearGradientBrush(rectangle, base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR, base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR, LinearGradientMode.Vertical))
  145.                         {
  146.                             g.FillRectangle(brush2, rectangle);
  147.                             goto Label_0357;
  148.                         }
  149.                     }
  150.                     g.FillRectangle(base.Engine.Res.Brushes.SKIN2_MENUBARSTARTCOLOR, rectangle);
  151.                 }
  152.             }
  153.         Label_0357:
  154.             if (((base.Engine.LeftBorderWidth >= base.cxBorder) && (base.Engine.RightBorderWidth >= base.cxBorder)) || (base.Target.MainMenuStrip == null))
  155.             {
  156.                 return;
  157.             }
  158.             int num2 = base.Target.MainMenuStrip.Height;
  159.             Bitmap bitmap2 = base.Engine.Res.Bitmaps.SKIN2_MENUBAR;
  160.             if (base.Engine.LeftBorderWidth < base.cxBorder)
  161.             {
  162.                 rectangle3 = new Rectangle(base.Engine.LeftBorderWidth, base.Engine.TitleHeight + base.Target.MainMenuStrip.Top, base.cxBorder - base.Engine.LeftBorderWidth, num2);
  163.                 if (bitmap2 != null)
  164.                 {
  165.                     if (bitmap2.Width > (base.cxBorder - base.Engine.LeftBorderWidth))
  166.                     {
  167.                         rectangle4 = new Rectangle(0, 0, base.cxBorder - base.Engine.LeftBorderWidth, bitmap2.Height);
  168.                     }
  169.                     else
  170.                     {
  171.                         rectangle4 = new Rectangle(0, 0, bitmap2.Width, bitmap2.Height);
  172.                     }
  173.                     g.DrawImage(bitmap2, rectangle3, rectangle4.X, rectangle4.Y, rectangle4.Width, rectangle4.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  174.                 }
  175.                 else
  176.                 {
  177.                     if (base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR != base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR)
  178.                     {
  179.                         using (LinearGradientBrush brush3 = new LinearGradientBrush(rectangle3, base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR, base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR, LinearGradientMode.Vertical))
  180.                         {
  181.                             g.FillRectangle(brush3, rectangle3);
  182.                             goto Label_0539;
  183.                         }
  184.                     }
  185.                     g.FillRectangle(base.Engine.Res.Brushes.SKIN2_MENUBARSTARTCOLOR, rectangle3);
  186.                 }
  187.             }
  188.         Label_0539:
  189.             if (base.Engine.RightBorderWidth < base.cxBorder)
  190.             {
  191.                 rectangle3 = new Rectangle(this.Width - base.cxBorder, base.Engine.TitleHeight + base.Target.MainMenuStrip.Top, base.cxBorder - base.Engine.RightBorderWidth, num2);
  192.                 if (bitmap2 != null)
  193.                 {
  194.                     if (bitmap2.Width > (base.cxBorder - base.Engine.RightBorderWidth))
  195.                     {
  196.                         rectangle4 = new Rectangle((bitmap2.Width - base.cxBorder) + base.Engine.RightBorderWidth, 0, base.cxBorder - base.Engine.RightBorderWidth, bitmap2.Height);
  197.                     }
  198.                     else
  199.                     {
  200.                         rectangle4 = new Rectangle(0, 0, bitmap2.Width, bitmap2.Height);
  201.                     }
  202.                     g.DrawImage(bitmap2, rectangle3, rectangle4.X, rectangle4.Y, rectangle4.Width, rectangle4.Height, GraphicsUnit.Pixel, x448fd9ab43628c71.DrawImageAttrTileY);
  203.                     return;
  204.                 }
  205.                 if (base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR != base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR)
  206.                 {
  207.                     using (LinearGradientBrush brush4 = new LinearGradientBrush(rectangle3, base.Engine.Res.Colors.SKIN2_MENUBARSTARTCOLOR, base.Engine.Res.Colors.SKIN2_MENUBARENDCOLOR, LinearGradientMode.Vertical))
  208.                     {
  209.                         g.FillRectangle(brush4, rectangle3);
  210.                         return;
  211.                     }
  212.                 }
  213.                 g.FillRectangle(base.Engine.Res.Brushes.SKIN2_MENUBARSTARTCOLOR, rectangle3);
  214.             }
  215.         }
  216.         protected override Point PointToScreen(Point point)
  217.         {
  218.             return base.Target.PointToScreen(point);
  219.         }
  220.         protected override void RefreshMainMenu()
  221.         {
  222.             if (this.x5486200f56f78413 != null)
  223.             {
  224.                 this.x5486200f56f78413.Refresh();
  225.             }
  226.         }
  227.         protected override void RefreshWindow()
  228.         {
  229.             base.Target.Refresh();
  230.         }
  231.         protected override void SkinControls()
  232.         {
  233.             if (!base.Target.IsDisposed)
  234.             {
  235.                 base.Target.ControlAdded += new ControlEventHandler(this.xe08c104b24ddae95);
  236.                 base.Target.ControlRemoved += new ControlEventHandler(this.xbd90dc5580ff6562);
  237.             }
  238.             if (this.CanPaintChild)
  239.             {
  240.                 ArrayList list = new ArrayList();
  241.                 foreach (Control control in base.Target.Controls)
  242.                 {
  243.                     if (!(control is MdiClient) && !base.ControlTable.ContainsKey(control.Handle))
  244.                     {
  245.                         list.Add(control);
  246.                     }
  247.                 }
  248.                 foreach (Control control2 in list)
  249.                 {
  250.                     if (!base.ControlTable.ContainsKey(control2.Handle))
  251.                     {
  252.                         xbd3f2493841f18a1 xbdffa = xf3f6919ac5d158dc.Create(control2, base.Engine);
  253.                         base.ControlTable.Add(control2.Handle, xbdffa);
  254.                     }
  255.                 }
  256.             }
  257.         }
  258.         private void x05931f73c2d66689()
  259.         {
  260.             if (this.CanPaint)
  261.             {
  262.                 base.Target.BackColor = base.Engine.Res.Colors.SKIN2_FORMCOLOR;
  263.             }
  264.             else if (!this.IsDisposed && (this.BorderStyle != FormBorderStyle.None))
  265.             {
  266.                 base.Target.BackColor = this.x7c26c2d810682d2e;
  267.             }
  268.         }
  269.         private void x08d09b54d1a926bd()
  270.         {
  271.             base.Target.MdiChildActivate += new EventHandler(this.x23daf02978257d54);
  272.             this.x23daf02978257d54(null, null);
  273.         }
  274.         private void x1d183dacf6b4e43c(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  275.         {
  276.             base.x3b8ca818f0c2637e();
  277.         }
  278.         private void x23daf02978257d54(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  279.         {
  280.             xa427f1b2281f554b xafbfb;
  281.             foreach (Form form in base.Target.MdiChildren)
  282.             {
  283.                 if (((form != null) && !form.IsDisposed) && (form.Visible && !base.ChildTable.ContainsKey(form.Handle)))
  284.                 {
  285.                     xafbfb = new xa427f1b2281f554b(form.Handle, base.Engine);
  286.                     base.ChildTable.Add(form.Handle, xafbfb);
  287.                 }
  288.             }
  289.             if (base.Target.ActiveMdiChild != null)
  290.             {
  291.                 foreach (object obj3 in base.ChildTable.Keys)
  292.                 {
  293.                     if (obj3 is IntPtr)
  294.                     {
  295.                         object obj2;
  296.                         if (((IntPtr) obj3) == base.Target.ActiveMdiChild.Handle)
  297.                         {
  298.                             obj2 = base.ChildTable[obj3];
  299.                             if (obj2 is xa427f1b2281f554b)
  300.                             {
  301.                                 xafbfb = (xa427f1b2281f554b) obj2;
  302.                                 xafbfb.IsActive = true;
  303.                             }
  304.                         }
  305.                         else
  306.                         {
  307.                             obj2 = base.ChildTable[obj3];
  308.                             if (obj2 is xa427f1b2281f554b)
  309.                             {
  310.                                 xafbfb = (xa427f1b2281f554b) obj2;
  311.                                 xafbfb.IsActive = false;
  312.                                 x61467fe65a98f20c.SendMessage((IntPtr) obj3, 0x85, IntPtr.Zero, IntPtr.Zero);
  313.                             }
  314.                         }
  315.                     }
  316.                 }
  317.             }
  318.         }
  319.         private void x30c11b5a89921b08()
  320.         {
  321.             if (base.Target.Menu == null)
  322.             {
  323.                 if (base.Target.IsMdiContainer && (this.x5486200f56f78413 != null))
  324.                 {
  325.                     this.x5486200f56f78413.MdiContainer = base.Target;
  326.                 }
  327.             }
  328.             else if ((!base.Target.IsMdiContainer || (base.Target.MainMenuStrip == null)) && this.CanPaint)
  329.             {
  330.                 this.x946d4396b0c9cde4 = base.Target.Menu;
  331.                 base.Target.Menu = null;
  332.                 this.x45cc2ae14a69c414();
  333.                 if (base.Target.IsMdiContainer)
  334.                 {
  335.                     this.x5486200f56f78413.MdiContainer = base.Target;
  336.                 }
  337.                 base.Target.Controls.Add(this.x5486200f56f78413);
  338.                 new x4fef14ebf3863c7f(this.x5486200f56f78413, this.x946d4396b0c9cde4);
  339.             }
  340.         }
  341.         private void x33251e4c534e7926()
  342.         {
  343.             if (!base.Target.IsDisposed && (base.Target.WindowState == FormWindowState.Normal))
  344.             {
  345.                 int num = base.Engine.TitleHeight + Math.Max(base.Engine.BottomBorderHeight, base.cyBorder);
  346.                 int num2 = Math.Max(base.Engine.LeftBorderWidth, base.cxBorder) + Math.Max(base.Engine.RightBorderWidth, base.cxBorder);
  347.                 if (this.CanPaint)
  348.                 {
  349.                     base.Target.Height = (num + base.RestoreClientHeight) + this.MenuHeight;
  350.                     base.Target.Width = num2 + base.RestoreClientWidth;
  351.                 }
  352.                 else
  353.                 {
  354.                     base.Target.Height = base.RestoreHeight;
  355.                     base.Target.Width = base.RestoreWidth;
  356.                 }
  357.                 if (!this.x71d812f69bdec219)
  358.                 {
  359.                     this.x71d812f69bdec219 = true;
  360.                     if (this.MenuHeight > 0)
  361.                     {
  362.                         foreach (Control control in base.Target.Controls)
  363.                         {
  364.                             if (control != this.x5486200f56f78413)
  365.                             {
  366.                                 try
  367.                                 {
  368.                                     if (control.Dock == DockStyle.None)
  369.                                     {
  370.                                         control.Top += this.MenuHeight;
  371.                                     }
  372.                                     continue;
  373.                                 }
  374.                                 catch
  375.                                 {
  376.                                     continue;
  377.                                 }
  378.                             }
  379.                         }
  380.                     }
  381.                 }
  382.             }
  383.         }
  384.         private void x45cc2ae14a69c414()
  385.         {
  386.             if (this.x946d4396b0c9cde4 != null)
  387.             {
  388.                 x5f4b657f68f87baa xfbffbaa;
  389.                 if (this.x5486200f56f78413 == null)
  390.                 {
  391.                     this.x5486200f56f78413 = new x3c41176af7e54b01(base.Engine);
  392.                 }
  393.                 if ((this.x946d4396b0c9cde4.RightToLeft & System.Windows.Forms.RightToLeft.Inherit) == System.Windows.Forms.RightToLeft.Inherit)
  394.                 {
  395.                     this.x5486200f56f78413.RightToLeft = base.Target.RightToLeft;
  396.                 }
  397.                 else
  398.                 {
  399.                     this.x5486200f56f78413.RightToLeft = this.x946d4396b0c9cde4.RightToLeft;
  400.                 }
  401.                 this.x5486200f56f78413.MenuCommands.Clear();
  402.                 ArrayList list = new ArrayList();
  403.                 ArrayList list2 = new ArrayList();
  404.                 foreach (MenuItem item2 in this.x946d4396b0c9cde4.MenuItems)
  405.                 {
  406.                     xfbffbaa = this.xd010ef1851698a47(item2);
  407.                     this.x5486200f56f78413.MenuCommands.Add(xfbffbaa);
  408.                     if (item2.MenuItems.Count > 0)
  409.                     {
  410.                         list.Add(item2);
  411.                         list2.Add(xfbffbaa);
  412.                     }
  413.                 }
  414.                 while (list.Count > 0)
  415.                 {
  416.                     MenuItem item = (MenuItem) list[0];
  417.                     x5f4b657f68f87baa xfbffbaa2 = (x5f4b657f68f87baa) list2[0];
  418.                     list.RemoveAt(0);
  419.                     list2.RemoveAt(0);
  420.                     foreach (MenuItem item3 in item.MenuItems)
  421.                     {
  422.                         xfbffbaa = this.xd010ef1851698a47(item3);
  423.                         xfbffbaa2.MenuCommands.Add(xfbffbaa);
  424.                         if (item3.MenuItems.Count > 0)
  425.                         {
  426.                             list.Add(item3);
  427.                             list2.Add(xfbffbaa);
  428.                         }
  429.                     }
  430.                 }
  431.             }
  432.         }
  433.         private void x7ca6c09f91bb596a()
  434.         {
  435.             if (this.CanPaintChild)
  436.             {
  437.                 ArrayList list = new ArrayList();
  438.                 foreach (Control control in base.Target.Controls)
  439.                 {
  440.                     if (!(control is MdiClient) && !base.ControlTable.ContainsKey(control.Handle))
  441.                     {
  442.                         list.Add(control);
  443.                     }
  444.                 }
  445.                 foreach (Control control2 in list)
  446.                 {
  447.                     if (!base.ControlTable.ContainsKey(control2.Handle))
  448.                     {
  449.                         xbd3f2493841f18a1 xbdffa = xf3f6919ac5d158dc.Create(control2, base.Engine);
  450.                         base.ControlTable.Add(control2.Handle, xbdffa);
  451.                     }
  452.                 }
  453.             }
  454.         }
  455.         private void xbd90dc5580ff6562(object xe0292b9ed559da7d, ControlEventArgs xfbf34718e704c6bc)
  456.         {
  457.         }
  458.         private void xbe3f57786c90d37f()
  459.         {
  460.             if ((this.CanPaint && (this.x5486200f56f78413 != null)) && (this.x946d4396b0c9cde4 != null))
  461.             {
  462.                 this.xe09f26c14e176ef5();
  463.             }
  464.         }
  465.         private x5f4b657f68f87baa xd010ef1851698a47(MenuItem xccb63ca5f63dc470)
  466.         {
  467.             x5f4b657f68f87baa xfbffbaa = new x5f4b657f68f87baa();
  468.             xfbffbaa.AttachedMenuItem = xccb63ca5f63dc470;
  469.             xfbffbaa.Click += new EventHandler(this.xe26186777e7e0508);
  470.             return xfbffbaa;
  471.         }
  472.         private void xe08c104b24ddae95(object xe0292b9ed559da7d, ControlEventArgs xfbf34718e704c6bc)
  473.         {
  474.             if (this.CanPaintChild)
  475.             {
  476.                 Control control = xfbf34718e704c6bc.Control;
  477.                 if (!(control is MdiClient) && !base.ControlTable.ContainsKey(control.Handle))
  478.                 {
  479.                     xbd3f2493841f18a1 xbdffa = xf3f6919ac5d158dc.Create(control, base.Engine);
  480.                     base.ControlTable.Add(control.Handle, xbdffa);
  481.                 }
  482.             }
  483.         }
  484.         private void xe09f26c14e176ef5()
  485.         {
  486.             x5f4b657f68f87baa xfbffbaa;
  487.             this.x5486200f56f78413.MenuCommands.Clear();
  488.             ArrayList list = new ArrayList();
  489.             ArrayList list2 = new ArrayList();
  490.             foreach (MenuItem item2 in this.x946d4396b0c9cde4.MenuItems)
  491.             {
  492.                 xfbffbaa = this.xd010ef1851698a47(item2);
  493.                 this.x5486200f56f78413.MenuCommands.Add(xfbffbaa);
  494.                 if (item2.MenuItems.Count > 0)
  495.                 {
  496.                     list.Add(item2);
  497.                     list2.Add(xfbffbaa);
  498.                 }
  499.             }
  500.             while (list.Count > 0)
  501.             {
  502.                 MenuItem item = (MenuItem) list[0];
  503.                 x5f4b657f68f87baa xfbffbaa2 = (x5f4b657f68f87baa) list2[0];
  504.                 list.RemoveAt(0);
  505.                 list2.RemoveAt(0);
  506.                 foreach (MenuItem item3 in item.MenuItems)
  507.                 {
  508.                     xfbffbaa = this.xd010ef1851698a47(item3);
  509.                     xfbffbaa2.MenuCommands.Add(xfbffbaa);
  510.                     if (item3.MenuItems.Count > 0)
  511.                     {
  512.                         list.Add(item3);
  513.                         list2.Add(xfbffbaa);
  514.                     }
  515.                 }
  516.             }
  517.         }
  518.         private void xe26186777e7e0508(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
  519.         {
  520.             if (xe0292b9ed559da7d is x5f4b657f68f87baa)
  521.             {
  522.                 x5f4b657f68f87baa xfbffbaa = (x5f4b657f68f87baa) xe0292b9ed559da7d;
  523.                 if (xfbffbaa.AttachedMenuItem != null)
  524.                 {
  525.                     xfbffbaa.AttachedMenuItem.PerformClick();
  526.                 }
  527.             }
  528.         }
  529.         protected override FormBorderStyle BorderStyle
  530.         {
  531.             get
  532.             {
  533.                 return base.Target.FormBorderStyle;
  534.             }
  535.         }
  536.         protected override Rectangle ClientRectangle
  537.         {
  538.             get
  539.             {
  540.                 return base.Target.ClientRectangle;
  541.             }
  542.         }
  543.         protected override bool ControlBox
  544.         {
  545.             get
  546.             {
  547.                 return base.Target.ControlBox;
  548.             }
  549.         }
  550.         protected override int Height
  551.         {
  552.             get
  553.             {
  554.                 return base.Target.Height;
  555.             }
  556.         }
  557.         protected override bool HelpButton
  558.         {
  559.             get
  560.             {
  561.                 return base.Target.HelpButton;
  562.             }
  563.         }
  564.         protected override System.Drawing.Icon Icon
  565.         {
  566.             get
  567.             {
  568.                 switch (base.Target.FormBorderStyle)
  569.                 {
  570.                     case FormBorderStyle.FixedToolWindow:
  571.                     case FormBorderStyle.SizableToolWindow:
  572.                         return null;
  573.                 }
  574.                 return base.Target.Icon;
  575.             }
  576.         }
  577.         protected override bool IsActive
  578.         {
  579.             get
  580.             {
  581.                 if (base.Target.IsMdiChild)
  582.                 {
  583.                     return (base.Target == base.Target.MdiParent.ActiveMdiChild);
  584.                 }
  585.                 if (base.Target.IsMdiContainer)
  586.                 {
  587.                     return (base.Target == Form.ActiveForm);
  588.                 }
  589.                 return base.IsActive;
  590.             }
  591.             set
  592.             {
  593.                 base.IsActive = value;
  594.             }
  595.         }
  596.         protected override bool IsDisposed
  597.         {
  598.             get
  599.             {
  600.                 return base.Target.IsDisposed;
  601.             }
  602.         }
  603.         protected override bool IsMdiChild
  604.         {
  605.             get
  606.             {
  607.                 return base.Target.IsMdiChild;
  608.             }
  609.         }
  610.         protected override bool IsMdiContainer
  611.         {
  612.             get
  613.             {
  614.                 return base.Target.IsMdiContainer;
  615.             }
  616.         }
  617.         protected override bool MaximizeBox
  618.         {
  619.             get
  620.             {
  621.                 switch (base.Target.FormBorderStyle)
  622.                 {
  623.                     case FormBorderStyle.FixedToolWindow:
  624.                     case FormBorderStyle.SizableToolWindow:
  625.                         return false;
  626.                 }
  627.                 return base.Target.MaximizeBox;
  628.             }
  629.         }
  630.         protected override int MenuHeight
  631.         {
  632.             get
  633.             {
  634.                 if ((this.x946d4396b0c9cde4 != null) && (this.x5486200f56f78413 != null))
  635.                 {
  636.                     return this.x5486200f56f78413.Height;
  637.                 }
  638.                 return 0;
  639.             }
  640.         }
  641.         protected override bool MinimizeBox
  642.         {
  643.             get
  644.             {
  645.                 switch (base.Target.FormBorderStyle)
  646.                 {
  647.                     case FormBorderStyle.FixedToolWindow:
  648.                     case FormBorderStyle.SizableToolWindow:
  649.                         return false;
  650.                 }
  651.                 return base.Target.MinimizeBox;
  652.             }
  653.         }
  654.         protected override System.Drawing.Region Region
  655.         {
  656.             get
  657.             {
  658.                 return base.Target.Region;
  659.             }
  660.             set
  661.             {
  662.                 base.Target.Region = value;
  663.             }
  664.         }
  665.         protected override System.Windows.Forms.RightToLeft RightToLeft
  666.         {
  667.             get
  668.             {
  669.                 return base.Target.RightToLeft;
  670.             }
  671.         }
  672.         protected override bool RightToLeftLayout
  673.         {
  674.             get
  675.             {
  676.                 return (base.Target.RightToLeftLayout && ((base.Target.RightToLeft & System.Windows.Forms.RightToLeft.Yes) == System.Windows.Forms.RightToLeft.Yes));
  677.             }
  678.         }
  679.         protected override object Tag
  680.         {
  681.             get
  682.             {
  683.                 return base.Target.Tag;
  684.             }
  685.         }
  686.         protected override string Text
  687.         {
  688.             get
  689.             {
  690.                 return base.Target.Text;
  691.             }
  692.         }
  693.         protected override int TitleHeight
  694.         {
  695.             get
  696.             {
  697.                 if ((this.IsMdiChild && (this.WindowState == FormWindowState.Maximized)) && (this.x946d4396b0c9cde4 != null))
  698.                 {
  699.                     return (this.x5486200f56f78413.Height - 1);
  700.                 }
  701.                 return base.Engine.TitleHeight;
  702.             }
  703.         }
  704.         protected override int Width
  705.         {
  706.             get
  707.             {
  708.                 return base.Target.Width;
  709.             }
  710.         }
  711.     }
  712. }