Example #1
0
        //destroy everything but our tray icon, main window, and our notification bubble
        private void DestroyMostlyEverything()
        {
            if (hbox != null)
            {
                hbox.Destroy();
            }

            if (vbox != null)
            {
                vbox.Destroy();
            }

            if (newi != null)
            {
                newi.Destroy();
            }

            if (menuBar != null)
            {
                menuBar.Destroy();
            }

            if (filemenu != null)
            {
                filemenu.Destroy();
            }

            if (file != null)
            {
                file.Destroy();
            }

            if (sep != null)
            {
                sep.Destroy();
            }

            if (exit != null)
            {
                exit.Destroy();
            }

            if (uploadButton != null)
            {
                uploadButton.Destroy();
            }

            if (toCropBox != null)
            {
                toCropBox.Destroy();
            }

            if (agr != null)
            {
                agr.Dispose();
            }
        }
Example #2
0
 /// <summary>Destroy the menu</summary>
 public void Destroy()
 {
     menuItem.Activated -= OnMenuClicked;
     menuItem.Destroy();
 }