OpenUrl() static private méthode

static private OpenUrl ( string url ) : void
url string
Résultat void
        static CarbonEventHandlerStatus HandleMenuCommand(IntPtr callRef, IntPtr eventRef, IntPtr userData)
        {
            try
            {
                CarbonHICommand hiCmd  = GetCarbonHICommand(eventRef);
                uint            refCon = HIToolbox.GetMenuItemReferenceConstant(hiCmd.MenuItem);

                //link commands
                if (hiCmd.CommandID == linkCommandId)
                {
                    string url = "";
                    try
                    {
                        url = linkCommands[(int)refCon];
                        MacPlatformService.OpenUrl(url);
                    }
                    catch (Exception ex)
                    {
                        Gtk.Application.Invoke(delegate
                        {
                            MonoDevelop.Ide.MessageService.ShowException(ex, MonoDevelop.Core.GettextCatalog.GetString("Could not open the url {0}", url));
                        });
                    }
                    DestroyOldMenuObjects();
                    return(CarbonEventHandlerStatus.Handled);
                }

                //normal commands
                object cmdID = GetCommandID(hiCmd);
                if (cmdID != null)
                {
                    if (refCon > 0)
                    {
                        object data = objectsToDestroyOnMenuClose[(int)refCon - 1];
                        //need to return before we execute the command, so that the menu unhighlights
                        Gtk.Application.Invoke(delegate
                        {
                            manager.DispatchCommand(cmdID, data, CommandSource.MainMenu);
                        });
                    }
                    else
                    {
                        Gtk.Application.Invoke(delegate
                        {
                            manager.DispatchCommand(cmdID, CommandSource.MainMenu);
                        });
                    }
                    DestroyOldMenuObjects();
                    return(CarbonEventHandlerStatus.Handled);
                }
            }
            catch (Exception ex)
            {
                MonoDevelop.Core.LoggingService.LogError("Unhandled error handling menu command", ex);
            }
            return(CarbonEventHandlerStatus.NotHandled);
        }