public static void Initialize () { if (platformService != null) return; object[] platforms = AddinManager.GetExtensionObjects ("/MonoDevelop/Core/PlatformService"); if (platforms.Length > 0) platformService = (PlatformService) platforms [0]; else { platformService = new DefaultPlatformService (); LoggingService.LogFatalError ("A platform service implementation has not been found."); } if (PlatformService.CanOpenTerminal) Runtime.ProcessService.SetExternalConsoleHandler (PlatformService.StartConsoleProcess); FileService.FileRemoved += DispatchService.GuiDispatch ( new EventHandler<FileEventArgs> (NotifyFileRemoved)); FileService.FileRenamed += DispatchService.GuiDispatch ( new EventHandler<FileCopyEventArgs> (NotifyFileRenamed)); // Ensure we initialize the native toolkit on the UI thread immediately // so that we can safely access this property later in other threads GC.KeepAlive (NativeToolkit); FontService.Initialize (); }
public static void Initialize () { if (platformService != null) return; object[] platforms = AddinManager.GetExtensionObjects ("/MonoDevelop/Core/PlatformService"); if (platforms.Length > 0) platformService = (PlatformService) platforms [0]; else { platformService = new DefaultPlatformService (); LoggingService.LogFatalError ("A platform service implementation has not been found."); } Runtime.ProcessService.SetExternalConsoleHandler (platformService.StartConsoleProcess); }
public static void Initialize () { if (platformService != null) return; object[] platforms = AddinManager.GetExtensionObjects ("/MonoDevelop/Core/PlatformService"); if (platforms.Length > 0) platformService = (PlatformService) platforms [0]; else { platformService = new DefaultPlatformService (); LoggingService.LogFatalError ("A platform service implementation has not been found."); } Runtime.ProcessService.SetExternalConsoleHandler (platformService.StartConsoleProcess); FileService.FileRemoved += DispatchService.GuiDispatch ( new EventHandler<FileEventArgs> (NotifyFileRemoved)); FileService.FileRenamed += DispatchService.GuiDispatch ( new EventHandler<FileCopyEventArgs> (NotifyFileRenamed)); }