C# Класс Bloom.Program

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ApplicationExiting bool
StartUpWithFirstOrNewVersionBehavior bool

Private Properties

Свойство Тип Описание
AttachConsole bool
CareForSplashScreenAtIdleTime void
CheckForCorruptUserConfig void
CheckLinuxFileAssociations void
CheckRegistration void
ChooseAnotherProject void
CloseSplashScreen void
GrabTokenForThisProject bool
HandleDownload void
HandleErrorOpeningProjectWindow void
HandlePrepareCommandLine int
HandleProjectWindowActivated void
HandleProjectWindowClosed void
IsBloomBookOrder bool
IsInstallerLaunch bool
Main int
OnXulRunnerShutdown void
OpenCollection bool
OpenProjectWindow bool
ReopenProject void
Run void
SetUpErrorHandling void
StartDebugServer void
StartUpShellBasedOnMostRecentUsedIfPossible void
Startup void
registerChromeDir void
toNsFile nsILocalFile

Открытые методы

Метод Описание
GetRunningBloomProcessCount ( ) : int

Getting the count of running Bloom instances takes extra steps on Linux.

OldVersionCheck ( ) : void
ReleaseMutexForThisProject ( ) : void
RestartBloom ( ) : void
SetUpLocalization ( ApplicationContainer applicationContainerSource = null ) : void

Приватные методы

Метод Описание
AttachConsole ( int pid ) : bool
CareForSplashScreenAtIdleTime ( object sender, EventArgs e ) : void
CheckForCorruptUserConfig ( ) : void
CheckLinuxFileAssociations ( ) : void

Creates mime types and file associations on developer machine

CheckRegistration ( ) : void
ChooseAnotherProject ( object sender, EventArgs e ) : void
CloseSplashScreen ( ) : void
GrabTokenForThisProject ( string pathToProject ) : bool
HandleDownload ( string order ) : void

This routine handles the old-style download requests which come as an order URL from BloomLibrary. Enhance: it's unfortunate that we have two command-line methods of downloading a book. However, they have rather different requirements: - this one displays a progress UI, the other doesn't. - this one must extract the URL from a bloom: url (which the library must produce with urlencoding), for the other, it's more convenient to pass an unencoded url - worse, this version typically goes on to fully launch Bloom; the other always shuts the program down when done. Thus, this version is much more tightly connected to the normal startup code. Note that we can't easily change the exact command line that this version deals with, because Bloom library generates that command line, and if we change what it generates, everyone running an older Bloom will be in trouble. Most of the core implementation of the download process is common.

HandleErrorOpeningProjectWindow ( Exception error, string projectPath ) : void
HandlePrepareCommandLine ( HydrateParameters opts ) : int
HandleProjectWindowActivated ( object sender, EventArgs e ) : void
HandleProjectWindowClosed ( object sender, EventArgs e ) : void
IsBloomBookOrder ( string args ) : bool
IsInstallerLaunch ( string args ) : bool
Main ( string args1 ) : int
OnXulRunnerShutdown ( object sender, EventArgs e ) : void
OpenCollection ( string path ) : bool
OpenProjectWindow ( string projectPath ) : bool
ReopenProject ( object sender, EventArgs e ) : void
Run ( ) : void
SetUpErrorHandling ( ) : void
StartDebugServer ( ) : void

This code (and the two methods above) were taken from https://bitbucket.org/duanyao/moz-devtools-patch with thanks to Duane Yao. It starts up a server that allows FireFox to be used to inspect and debug the content of geckofx windows. See the ReadMe in remoteDebugging for instructions. Note that this should NOT be done in production. There are security issues.

StartUpShellBasedOnMostRecentUsedIfPossible ( ) : void
Startup ( object sender, EventArgs e ) : void
registerChromeDir ( string dir ) : void
toNsFile ( string file ) : nsILocalFile

Описание методов

GetRunningBloomProcessCount() публичный статический Метод

Getting the count of running Bloom instances takes extra steps on Linux.
public static GetRunningBloomProcessCount ( ) : int
Результат int

OldVersionCheck() публичный статический Метод

public static OldVersionCheck ( ) : void
Результат void

ReleaseMutexForThisProject() публичный статический Метод

public static ReleaseMutexForThisProject ( ) : void
Результат void

RestartBloom() публичный статический Метод

public static RestartBloom ( ) : void
Результат void

SetUpLocalization() публичный статический Метод

public static SetUpLocalization ( ApplicationContainer applicationContainerSource = null ) : void
applicationContainerSource ApplicationContainer
Результат void

Описание свойств

ApplicationExiting публичное статическое свойство

public static bool ApplicationExiting
Результат bool

StartUpWithFirstOrNewVersionBehavior публичное статическое свойство

public static bool StartUpWithFirstOrNewVersionBehavior
Результат bool