Bloom.Browser.OnShowContextMenu C# (CSharp) Method

OnShowContextMenu() protected method

protected OnShowContextMenu ( object sender, GeckoContextMenuEventArgs e ) : void
sender object
e GeckoContextMenuEventArgs
return void
        void OnShowContextMenu(object sender, GeckoContextMenuEventArgs e)
        {
            MenuItem FFMenuItem = null;
            Debug.Assert(!InvokeRequired);
            if (ContextMenuProvider != null)
            {
                var replacesStdMenu = ContextMenuProvider(e);
            #if DEBUG
                FFMenuItem = AddOpenPageInFFItem(e);
            #endif

                if (replacesStdMenu)
                    return; // only the provider's items
            }
            var m = e.ContextMenu.MenuItems.Add("Edit Stylesheets in Stylizer", OnOpenPageInStylizer);
            m.Enabled = !string.IsNullOrEmpty(GetPathToStylizer());

            if(FFMenuItem == null)
                AddOpenPageInFFItem(e);
            #if DEBUG
            AddOtherMenuItemsForDebugging(e);
            #endif

            e.ContextMenu.MenuItems.Add(LocalizationManager.GetString("Browser.CopyTroubleshootingInfo", "Copy Troubleshooting Information"), OnGetTroubleShootingInformation);
        }