Метод | Описание | |
---|---|---|
DoNothing ( ) : void |
Dummy method to be used for InvokeOnEventsThread which is used as a way to initialize the Broadcast window and prevent errors on shutdown.
|
|
OpenNewProject ( SIL.FieldWorks.ProjectId projectId, string appName ) : bool |
Opens the specified (newly-created) project. This may start a new FieldWorks.exe process to handle the project if no FieldWorks processes are running for the specified project.
|
|
ProjectsInUseLocally ( ) : List |
Get a list of all projects (by ProjectName) currently open by processes on the local machine.
|
|
StartFwApp ( string appName ) : Process |
Starts the specified FieldWorks application.
|
Метод | Описание | |
---|---|---|
ArchiveProjectWithRamp ( |
Archive selected project files using RAMP
|
|
BackupProject ( |
Backup the project.
|
|
BackupProjectForRestore ( SIL.FieldWorks.FwRestoreProjectSettings restoreSettings, SIL.FieldWorks.FDO.FdoCache existingCache, |
Backs up the project that is about to be restored.
|
|
CheckForMovingExternalLinkDirectory ( |
||
ChooseLangProject ( |
||
CloseAllMainWindows ( ) : void |
Close any main windows. This is needed to implement changing the projects folder location when multiple projects are running. (See FWR-2287.)
|
|
CloseAllMainWindowsForApp ( |
Closes all main windows for the specified application ignoring any errors that occur.
|
|
CloseSplashScreen ( ) : void |
Closes the splash screen
|
|
CommitAndDisposeCache ( IThreadedProgress progressDlg, object parameters ) : object |
Commits the and disposes the FdoCache. This is usually called on a separate thread.
|
|
ComplainToUserAboutNewWs ( string wsLabel, string projectName ) : bool | ||
CopyDirectory ( string oldDir, string newDir ) : void |
Copies all files and folders in the specified old directory to the specified new directory
|
|
CreateAndInitNewMainWindow ( |
Creates a new main window and initializes it. The specified App is responsible for creating the proper main window type.
|
|
CreateApp ( SIL.FieldWorks.Common.FwUtils.FwAppArgs appArgs ) : bool | ||
CreateCache ( SIL.FieldWorks.ProjectId projectId ) : SIL.FieldWorks.FDO.FdoCache | ||
CreateFdoSettings ( ) : |
||
CreateNewProject ( |
Lets the user create a new project
|
|
CreateRemoteRequestListener ( ) : void |
Creates a remoting server to listen for events from other instances.
|
|
CreateRequestor ( int port, string requestType ) : SIL.FieldWorks.RemoteRequest |
Remote request calls can hang if the service is no longer active but the port is still in the listening state. This method calls the IsAlive method on the requestor to verify that it is valid.
|
|
DeleteProject ( |
Lets the user delete any FW databases that are not currently open
|
|
DetermineProject ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args ) : SIL.FieldWorks.ProjectId | ||
DisplayError ( |
Displays the error.
|
|
DisplayError ( |
Shows the error message of the exception to the user.
|
|
DoRestore ( SIL.FieldWorks.FDO.DomainServices.BackupRestore.ProjectRestoreService restoreService ) : void |
Does the restore.
|
|
EnsureValidLinkedFilesFolder ( SIL.FieldWorks.FDO.FdoCache cache ) : void |
Ensure a valid folder for LangProject.LinkedFilesRootDir. When moving projects between systems, the stored value may become hopelessly invalid. See FWNX-1005 for an example of the havoc than can ensue. This method gets called when we open the FDO cache. |
|
EnsureValidLinkedFilesFolderCore ( string linkedFilesFolder, string defaultLinkedFilesFolder ) : void |
Create the specified Linked Files directory only if it's the default Linked Files directory. See FWNX-1092, LT-14491.
|
|
ExecuteWithAllFwProcessesShutDown ( string abbrevOfDefaultAppToStart, Func |
Executes the requested action with ALL FW applications temporarily shut down and then (re)starts the applications in a sensible order. At the end, we're guaranteed to have at least one app started or FieldWorks will be shut down.
|
|
ExecuteWithAppsShutDown ( string abbrevOfDefaultAppToStart, Func |
Executes the requested action with all FW applications temporarily shut down and then (re)starts the applications in a sensible order. At the end, we're guaranteed to have at least one app started or FieldWorks will be shut down.
|
|
ExitCleanly ( ) : void |
Cleanly exits the FieldWorks process
|
|
ExitIfNoAppsRunning ( ) : void |
If no applications are running anymore, just shut down the whole process
|
|
FieldWorks_OnSave ( object sender, SaveEventArgs e ) : void | ||
FileProjectSharingLocation ( |
Displays the Project Location Sharing dialog box
|
|
FollowLink ( SIL.FieldWorks.Common.FwUtils.FwAppArgs link ) : void |
Follows the specified link request for this project.
|
|
FwMainWindowActivated ( object sender, |
Handles the Activated event of FieldWorks Main Windows.
|
|
FwMainWindowClosing ( object sender, CancelEventArgs e ) : void |
Handles the Closing event of FieldWorks Main Windows.
|
|
GetAppFromAppNameOrAbbrev ( string appNameOrAbbrev ) : |
Gets the application for the specified application name or abbreviation.
|
|
GetAutoOpenRegistrySetting ( |
||
GetAvailableLangsFromSatelliteDlls ( ) : List |
Get the available localizations.
|
|
GetBestGuessProjectId ( string latestProject, string latestServer ) : SIL.FieldWorks.ProjectId | ||
GetCommandLineAbbrevForAppName ( string appName ) : string |
Gets the command-line abbreviation for the specified application name.
|
|
GetDefaultApp ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args ) : string |
Gets the default application to start for the project specified in the the command-line arguments.
|
|
GetDriveMountList ( ) : List |
||
GetHelpTopicProvider ( string appAbbrev ) : IHelpTopicProvider |
Gets a HelpTopicProvider for the specified application if possible. Falls back to getting the HelpTopicProvider for another application if the requested one is not installed. Will not return null (but it could throw an exception if no FW app is installed).
|
|
GetOrCreateApplication ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args ) : |
Gets an existing app or creates a new one for the application type specified on the command line.
|
|
GetOrCreateFlexApp ( ) : |
Get or create a FLEx application. This method does not ensure that the returned application is fully initialized.
|
|
GetPreviousStartupStatus ( |
Gets the status of the previous attempt to startup the specified application.
|
|
GetProjectMatchStatus ( SIL.FieldWorks.ProjectId projectId ) : ProjectMatch |
Determines the match status for the project used by this FieldWorks process and the specified project. This method is thread-safe.
|
|
GetSampleProjectId ( |
||
GracefullyShutDown ( ) : void |
Attempts to shut down as nicely as possible. Typically this method doesn't do anything when the application is shut down normally (e.g. the user has closed all of the open main windows) because the applications will have already been disposed of. Thus, any exceptions that are thrown are ignored by this method as there is no guarantee that the application is in a valid state. Any exeptions that are thrown are logged to the log file. |
|
GracefullyShutDownApp ( |
Attempts to shut down the specified application as nicely as possible ignoring any errors that occur.
|
|
HandleLinkRequest ( SIL.FieldWorks.Common.FwUtils.FwAppArgs link ) : void |
Handles a link request. This handles determining the correct application to start up and for the correct project. This method is thread safe.
|
|
HandleRestoreRequest ( |
Handles a request to restore a project. This method is thread safe.
|
|
HandleRestoreRequest ( SIL.FieldWorks.FwRestoreProjectSettings restoreSettings ) : void |
Handles a request to restore a project. This method is thread safe.
|
|
HandleTopLevelError ( object sender, |
Catches and displays a otherwise unhandled exception. previously |
|
HandleUnhandledException ( object sender, |
Catches and displays otherwise unhandled exception, especially those that happen during startup of the application before we show our main window.
|
|
InitializeApp ( |
Initializes the specified application and creates a new main window for it. Also does application-specific cache initialization.
|
|
InitializeFirstApp ( |
||
IsFieldWorksProjectFolder ( string projectFolder ) : bool |
Return true if a folder belongs to FieldWorks, that is, it is one that we recognize has having a proper place in the Projects folder.
|
|
IsFieldWorksSettingsFolder ( string projectFolder ) : bool | ||
IsInSingleFWProccessMode ( ) : bool |
Determines whether any FW process is in "single user mode".
|
|
IsSharedXmlBackendNeeded ( SIL.FieldWorks.ProjectId projectId ) : bool | ||
KickOffAppFromOtherProcess ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args ) : void |
Starts or activates an application requested from another process. This method is thread safe. See the class comment on FwLinkArgs for details on how all the parts of hyperlinking work.
|
|
LaunchApplicationFromCommandLine ( SIL.FieldWorks.Common.FwUtils.FwAppArgs appArgs ) : bool |
Launches the application when requested from the command-line.
|
|
LaunchProject ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args, SIL.FieldWorks.ProjectId &projectId ) : bool | ||
LaunchRestoreFromCommandLine ( SIL.FieldWorks.Common.FwUtils.FwAppArgs appArgs ) : void |
Launches a restore project when requested from the command-line.
|
|
Main ( string rgArgs ) : int | ||
MigrateProjectsTo70 ( ) : bool |
Migrates the user's databases to FieldWorks 7.0+ if they haven't yet migrated successfully (and the user actually wants to migrate).
|
|
MoveExternalLinkDirectoryAndFiles ( |
Moves the external link directory and files to the new FW 7.0 or later location.
|
|
MoveProjectFolders ( string oldFolderForProjects, string newFolderForProjects, string projectPath, SIL.FieldWorks.ProjectId oldProjectId ) : SIL.FieldWorks.ProjectId |
Moves all of the projects in the specified old project folder (including any subfolders) to the specified new project folder.
|
|
MustCopyFoldersAndFiles ( string oldFolderForProjects, string newFolderForProjects ) : bool |
Check whether we must copy the project folders and files because the new Projects folder is on a different device than the old Projects folder.
|
|
OpenExistingProject ( SIL.FieldWorks.ProjectId projectId, |
Opens the specified project. This may start a new FieldWorks.exe process to handle the project if no FieldWorks processes are running for the specified project.
|
|
OpenProjectWithNewProcess ( SIL.FieldWorks.ProjectId project, string appAbbrev ) : |
Opens the specified project by starting a new FieldWorks.exe process.
|
|
OpenProjectWithNewProcess ( string projectType, string projectName, string server, string appAbbrev ) : |
Opens the specified project by starting a new FieldWorks.exe process.
|
|
ProjectNameChanged ( SIL.FieldWorks.FDO.FdoCache sender ) : void |
Handles a project name change.
|
|
RecordLastAppForProject ( ) : void |
Records the last running application for the current project.
|
|
RenameProject ( string dbNewName, |
Rename the database.
|
|
ReopenProject ( string project, SIL.FieldWorks.Common.FwUtils.FwAppArgs appArgs ) : |
Returns some active, non-disposed application if possible, otherwise, null. Currently Flex is preferred if both are re-opened.
|
|
ResetStateForForcedShutdown ( ) : void |
Resets the state of FieldWorks to allow a forced shutdown. Should only be called when a lethal unhandled exception is thrown.
|
|
RestoreCurrentProject ( SIL.FieldWorks.FwRestoreProjectSettings restoreSettings, |
Restores from the backup specified in restoreSettings, replacing the current version of this project (requires restarting apps and the cache).
|
|
RestoreProject ( |
Restore a project.
|
|
RestoreProject ( |
Restore a project.
|
|
RunOnRemoteClients ( string requestType, bool>.Func |
Runs the specified delegate on any other FieldWorks processes that are found. If no other FieldWorks processes are found, then the delegate is not called.
|
|
SafelyReportException ( |
||
SetGlobalExceptionHandler ( ) : void |
Sets the exception handler.
|
|
SetKeyboardForWs ( int ws ) : void | ||
SetUICulture ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args ) : bool |
Sets the UI culture.
|
|
SetupErrorPropertiesNeedingCache ( SIL.FieldWorks.FDO.FdoCache cache ) : void |
Sets information about the current database to the ErrorReporter so that it can be reported with a crash.
|
|
SetupErrorReportInformation ( ) : void | ||
ShowCommandLineHelp ( ) : void |
Shows help for command line options.
|
|
ShowSplashScreen ( |
Displays the splash screen
|
|
ShowWelcomeDialog ( SIL.FieldWorks.Common.FwUtils.FwAppArgs args, |
||
ShutdownApp ( |
Shutdowns the specified application. The application will be disposed of immediately. If no other applications are running, then FieldWorks will also be shutdown.
|
|
StaticDispose ( ) : void |
Releases unmanaged and managed resources
|
|
TryCommandLineOption ( ProjectId projId, StartupException &exception ) : bool |
Returns true if valid command-line args created this projectId. Returns false with no exception if no -db arg was given. Returns false with exception if invalid args were given.
|
|
TryFindExistingProcess ( ProjectId project, FwAppArgs args ) : bool |
Tries to find an existing FieldWorks process that is running the specified project. See the class comment on FwLinkArgs for details on how all the parts of hyperlinking work.
|
|
TryFindLinkHandler ( FwAppArgs link ) : bool |
Attempts to find another FieldWorks process that can handle the specified link.
|
|
TryFindRestoreHandler ( FwRestoreProjectSettings settings ) : bool |
Attempts to find another FieldWorks process that can handle a restore for the specified restore project settings.
|
|
UglyHackForXkbIndicator ( ) : void |
For some reason, setting an Xkb keyboard for the first time doesn't work well inside FieldWorks. The keyboard is actually set (although it may take effect only after the first one or two keystrokes), but the indicator on the system icon bar does not change. Setting several Xkb keyboards at this point seems to fix the problem for when the first one is set different than the default keyboard. This hack is not guaranteed to work, but it does seem to help in most scenarios. See FWNX-1299. If you can think of a better solution, by all means replace this ugly hack! It took me a day of work to come up with even this much. I tried setting the multiple keyboards in succession inside Palaso.UI.WindowsForms.Keyboarding.Linux.XkbKeyboardAdaptor.ReinitLocales() but it didn't work doing it there for some reason. |
|
UpdateProjectsLocation ( string newFolderForProjects, FwApp fwApp, string projectPath ) : void |
Updates the projects default directory.
|
|
UpdateProjectsSharing ( bool fShareProjects, Form dialogOwner, FwApp fwApp, string projectPath, string parentDirectory, string projectsDirectory ) : bool |
Attempts to turn project sharing on or off if not already in the requested mode.
|
|
WarnUserAboutFailedLiftImportIfNecessary ( FwApp fwApp ) : void | ||
WriteExecutablePathSettingForDevs ( ) : void |
Writes the current executable path to the registry. This is used for external applications to read on developer machines since the RootCodeDir on developer's machines point to distfiles.
|
|
WriteSplashScreen ( string msg ) : void |
Write to the splash screen
|
|
longestFirst ( string a, string b ) : int |
Compare the strings first by length (longest first), then normally if the lengths are equal.
|
public static OpenNewProject ( SIL.FieldWorks.ProjectId projectId, string appName ) : bool | ||
projectId | SIL.FieldWorks.ProjectId | The project id. |
appName | string | The application name (either Translation Editor or /// Language Explorer). |
Результат | bool |
public static ProjectsInUseLocally ( ) : List |
||
Результат | List |
public static StartFwApp ( string appName ) : Process | ||
appName | string | Name of the application. |
Результат | Process |