示例#1
0
 private int xedfc3e36e083cd18(ref x4c5aeec2d27988ea x56d3397f0a52724d)
 {
     try
     {
         ShellMenuItem menuItem = null;
         if (x443cc432acaadb1d.xefc704ff04352756(x56d3397f0a52724d.xe5cf2142b5b1d595) != 0)
         {
             string caption = Marshal.PtrToStringAnsi(x56d3397f0a52724d.xe5cf2142b5b1d595);
             menuItem = new ShellMenuItem(null, caption, caption, caption, -1);
         }
         else
         {
             int num = x56d3397f0a52724d.xe5cf2142b5b1d595.ToInt32();
             menuItem = xcbf78b15dd820156.x1dbcf1591cc2cceb.x24fe407f6d871e28(num);
         }
         if (menuItem != null)
         {
             x0bdae4f1006d9d27.x9d748d087524e2b4(this, 3);
             ExecuteItemEventArgs e = new ExecuteItemEventArgs(menuItem, (ExecuteMenuItemFlags)x56d3397f0a52724d.x8240369a843c7611, x56d3397f0a52724d.x7cc24662a4086c94);
             if (!OnExecuteMenuItem(e))
             {
                 return(x443cc432acaadb1d.x15f59d42384ec1d4);
             }
         }
         else
         {
             return(x443cc432acaadb1d.x15f59d42384ec1d4);
         }
     }
     catch
     {
         return(1);
     }
     return(0);
 }
示例#2
0
        public ShellMenuItem GetItemFromID(int id)
        {
            if (x1dbcf1591cc2cceb == null)
            {
                return(null);
            }
            ShellMenuItem item = x1dbcf1591cc2cceb.xc28600085ccd9908(this, id);

            if (item == null)
            {
                int itemCount = ItemCount;
                for (int i = 0; i < itemCount; i++)
                {
                    MENUITEMINFO structure = new MENUITEMINFO();
                    structure.x2e94540690ec6f24 = (uint)Marshal.SizeOf(structure);
                    structure.x8240369a843c7611 = 2;
                    User32.GetMenuItemInfo(x4b1e528311f74227, (uint)i, 1, ref structure);
                    if (structure.x9f8d45ce61065766 == id)
                    {
                        return(new ShellMenuItem(this, null, null, null, id));
                    }
                }
            }
            return(item);
        }
示例#3
0
 // Methods
 internal void x2237804176f4caea(ShellMenu x071bde1041617fce, int xeaf1b27180c0557b)
 {
     for (int i = this.xa73e17ae29927ab0.Count - 1; i >= 0; i--)
     {
         ShellMenuItem item = this.xa73e17ae29927ab0[i] as ShellMenuItem;
         if ((item._owner.x4b1e528311f74227 == x071bde1041617fce.x4b1e528311f74227) && (item.xeaf1b27180c0557b == xeaf1b27180c0557b))
         {
             this.xa73e17ae29927ab0.RemoveAt(i);
         }
     }
 }
示例#4
0
 internal ShellMenuItem xc28600085ccd9908(ShellMenu xb6a159a84cb992d6, int x541a67b95acd3459)
 {
     for (int i = 0; i < this.xa73e17ae29927ab0.Count; i++)
     {
         ShellMenuItem item = this.xa73e17ae29927ab0[i] as ShellMenuItem;
         if ((item.xeaf1b27180c0557b == x541a67b95acd3459) && (item._owner.x4b1e528311f74227 == xb6a159a84cb992d6.x4b1e528311f74227))
         {
             return(item);
         }
     }
     return(null);
 }
示例#5
0
 internal ShellMenuItem xc28600085ccd9908(int x541a67b95acd3459)
 {
     for (int i = 0; i < this.xa73e17ae29927ab0.Count; i++)
     {
         ShellMenuItem item = this.xa73e17ae29927ab0[i] as ShellMenuItem;
         if (item.xeaf1b27180c0557b == x541a67b95acd3459)
         {
             return(item);
         }
     }
     return(null);
 }
示例#6
0
 private int xa569c51e2c415f79(IntPtr x716e0bc3eafdded2, IntPtr x130fbcecf32fe781)
 {
     try
     {
         ShellMenuItem menuItem = xcbf78b15dd820156.x1dbcf1591cc2cceb.x625a8691de7c9283(x716e0bc3eafdded2);
         if (menuItem != null)
         {
             OnPopupSubMenu(menuItem);
         }
     }
     catch
     {
     }
     return(0);
 }
示例#7
0
 private int xeb60d1009423214a(IntPtr xa37cb707db312687, x41a7610950815f51 x232f9fe4bb34460d, IntPtr xdc993c5e33b6b52b, IntPtr x46dbea5adfba8a62, int xfcffe10b2208dfca)
 {
     try
     {
         if ((x232f9fe4bb34460d & x41a7610950815f51.x0534a8caf4c48f88) == x41a7610950815f51.x0534a8caf4c48f88)
         {
             ShellMenuItem item         = xcbf78b15dd820156.x1dbcf1591cc2cceb.x24fe407f6d871e28(xa37cb707db312687.ToInt32());
             string        menuItemHelp = GetMenuItemHelp(item);
             if (item != null)
             {
                 if ((x232f9fe4bb34460d & x41a7610950815f51.x784c7ef45bb1c58e) == x41a7610950815f51.x784c7ef45bb1c58e)
                 {
                     x443cc432acaadb1d.x2994e7e7a2efe4d9(menuItemHelp, x46dbea5adfba8a62, xfcffe10b2208dfca * 2);
                 }
                 else
                 {
                     x443cc432acaadb1d.xdf8e4b332b4a57af(menuItemHelp, x46dbea5adfba8a62, xfcffe10b2208dfca);
                 }
             }
         }
         else
         {
             ShellMenuItem item2        = xcbf78b15dd820156.x1dbcf1591cc2cceb.x24fe407f6d871e28(xa37cb707db312687.ToInt32());
             string        menuItemVerb = GetMenuItemVerb(item2);
             if (item2 != null)
             {
                 if ((x232f9fe4bb34460d & x41a7610950815f51.x784c7ef45bb1c58e) == x41a7610950815f51.x784c7ef45bb1c58e)
                 {
                     x443cc432acaadb1d.x2994e7e7a2efe4d9(menuItemVerb, x46dbea5adfba8a62, xfcffe10b2208dfca * 2);
                 }
                 else
                 {
                     x443cc432acaadb1d.xdf8e4b332b4a57af(menuItemVerb, x46dbea5adfba8a62, xfcffe10b2208dfca);
                 }
             }
         }
     }
     catch
     {
         return(1);
     }
     return(0);
 }
示例#8
0
        private int xa7869b3752ffd1ad(IntPtr x716e0bc3eafdded2, IntPtr x130fbcecf32fe781)
        {
            x3ff95812464be8ed xffbeed = (x3ff95812464be8ed)Marshal.PtrToStructure(x130fbcecf32fe781, typeof(x3ff95812464be8ed));

            using (Graphics graphics = Graphics.FromHdc(xffbeed.xea0205f8180e5e40))
            {
                ShellMenuItem menuitem = xcbf78b15dd820156.x1dbcf1591cc2cceb.x625a8691de7c9283(xffbeed.x8adb1f45d0d1fc14);
                if (menuitem != null)
                {
                    menuitem = menuitem.SubMenu.GetItemFromID(xffbeed.xdf116082e33a0b32);
                }
                if (menuitem == null)
                {
                    menuitem = xcbf78b15dd820156.x1dbcf1591cc2cceb.xc28600085ccd9908(xffbeed.xdf116082e33a0b32);
                }
                EZSDrawItemEventArgs e = new EZSDrawItemEventArgs(menuitem, graphics, SystemInformation.MenuFont, Rectangle.FromLTRB(xffbeed.x8d41594059465577.xa447fc54e41dfe06, xffbeed.x8d41594059465577.xc941868c59399d3e, xffbeed.x8d41594059465577.xfc2074a859a5db8c, xffbeed.x8d41594059465577.xaf9a0436a70689de), (DrawItemState)xffbeed.x970e523b845fd5c8);
                OnDrawMenuItem(e);
            }
            return(0);
        }
示例#9
0
        public ShellMenuItem Getitem(int index)
        {
            if (x1dbcf1591cc2cceb == null)
            {
                return(null);
            }
            int itemCount = ItemCount;

            if ((index < 0) || (index >= itemCount))
            {
                return(null);
            }
            ShellMenuItem item = x1dbcf1591cc2cceb.xc28600085ccd9908(this, x443cc432acaadb1d.GetMenuItemID(x4b1e528311f74227, index));

            if (item == null)
            {
                item = new ShellMenuItem(this, null, null, null, x443cc432acaadb1d.GetMenuItemID(x4b1e528311f74227, index));
            }
            return(item);
        }
示例#10
0
        public ShellMenuItem InsertItem(string caption, string verb, string helpString, int index, int id)
        {
            int itemCount = ItemCount;

            if ((index < -1) || (index > itemCount))
            {
                return(null);
            }
            if (itemCount == index)
            {
                index = -1;
            }
            x443cc432acaadb1d.InsertMenu(x4b1e528311f74227, index, x3d386b25758ba442.x8a088cc0adc307e6, id, caption);
            if (index == -1)
            {
                index = itemCount;
            }
            x75c9b935933f9eca(index, id);
            ShellMenuItem item = new ShellMenuItem(this, caption, verb, helpString, id);

            x1dbcf1591cc2cceb.xed8fd5934e38f59d(item, id);
            return(item);
        }
示例#11
0
 protected virtual void OnPopupSubMenu(ShellMenuItem menuItem)
 {
 }
示例#12
0
 public virtual string GetMenuItemVerb(ShellMenuItem item)
 {
     return(item._verb);
 }
示例#13
0
 // Methods
 public virtual string GetMenuItemHelp(ShellMenuItem item)
 {
     return(item.x33c74c46fd3c4244);
 }
示例#14
0
 // Methods
 /// <summary>
 /// Initializes a new instance of the <see cref="EZSMeasureItemEventArgs"/> class.
 /// </summary>
 /// <param name="menuitem">The menuitem.</param>
 /// <param name="g">The g.</param>
 /// <param name="itemWidth">Width of the item.</param>
 /// <param name="itemHeight">Height of the item.</param>
 internal EZSMeasureItemEventArgs(ShellMenuItem menuitem, Graphics g, int itemWidth, int itemHeight)
     : base(g, -1, itemHeight)
 {
     this.xbe51de0c4e655128 = menuitem;
     base.ItemWidth         = itemWidth;
 }
示例#15
0
 // Methods
 internal ExecuteItemEventArgs(ShellMenuItem menuItem, ExecuteMenuItemFlags flags, IntPtr hWnd)
 {
     this.xebf45bdcaa1fd1e1 = flags;
     this.x96e7d32425e52ebf = hWnd;
     this.x7bf8c4d03998048a = menuItem;
 }
示例#16
0
 // Methods
 /// <summary>
 /// Initializes a new instance of the <see cref="EZSDrawItemEventArgs"/> class.
 /// </summary>
 /// <param name="menuitem">The menuitem.</param>
 /// <param name="graphics">The graphics.</param>
 /// <param name="font">The font.</param>
 /// <param name="rect">The rect.</param>
 /// <param name="state">The state.</param>
 internal EZSDrawItemEventArgs(ShellMenuItem menuitem, Graphics graphics, Font font, Rectangle rect, DrawItemState state)
     : base(graphics, font, rect, -1, state, ((state & DrawItemState.Selected) != DrawItemState.None) ? SystemColors.HighlightText : SystemColors.MenuText, SystemColors.Menu)
 {
     this.xbe51de0c4e655128 = menuitem;
 }
示例#17
0
 internal void xed8fd5934e38f59d(ShellMenuItem xccb63ca5f63dc470, int xeaf1b27180c0557b)
 {
     xccb63ca5f63dc470.xeaf1b27180c0557b = xeaf1b27180c0557b;
     this.xa73e17ae29927ab0.Add(xccb63ca5f63dc470);
 }
示例#18
0
 internal void xed8fd5934e38f59d(ShellMenuItem xccb63ca5f63dc470)
 {
     xccb63ca5f63dc470.xeaf1b27180c0557b = this.x6f7e5ea46c16afdf;
     this.x6f7e5ea46c16afdf++;
     this.xa73e17ae29927ab0.Add(xccb63ca5f63dc470);
 }