private bool disposedValue; // To detect redundant calls

        // IDisposable
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    subj = null;
                }
            }

            disposedValue = true;
        }
Esempio n. 2
0
        public NativeMenu(bool createHandle = true, bool isPopup = true)
        {
            if (createHandle)
            {
                if (isPopup)
                {
                    hMenu = User32.CreatePopupMenu();
                }
                else
                {
                    hMenu = User32.CreateMenu();
                }
            }

            mCol = new NativeMenuItemCollection(hMenu);
        }
 internal NativeMenuItemEnumerator(NativeMenuItemCollection subject)
 {
     subj = subject;
 }
Esempio n. 4
0
 public NativeMenu(IntPtr hMenu)
 {
     this.hMenu = hMenu;
     mCol       = new NativeMenuItemCollection(hMenu);
 }