C# Class Bloom.Program

Afficher le fichier Open project: BloomBooks/BloomDesktop

Méthodes publiques

Свойство Type Description
ApplicationExiting bool
StartUpWithFirstOrNewVersionBehavior bool

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

GetRunningBloomProcessCount() public static méthode

Getting the count of running Bloom instances takes extra steps on Linux.
public static GetRunningBloomProcessCount ( ) : int
Résultat int

OldVersionCheck() public static méthode

public static OldVersionCheck ( ) : void
Résultat void

ReleaseMutexForThisProject() public static méthode

public static ReleaseMutexForThisProject ( ) : void
Résultat void

RestartBloom() public static méthode

public static RestartBloom ( ) : void
Résultat void

SetUpLocalization() public static méthode

public static SetUpLocalization ( ApplicationContainer applicationContainerSource = null ) : void
applicationContainerSource ApplicationContainer
Résultat void

Property Details

ApplicationExiting public_oe static_oe property

public static bool ApplicationExiting
Résultat bool

StartUpWithFirstOrNewVersionBehavior public_oe static_oe property

public static bool StartUpWithFirstOrNewVersionBehavior
Résultat bool