private static void LaunchRestoreFromCommandLine(FwAppArgs appArgs)
{
if (string.IsNullOrEmpty(appArgs.AppName)) // ENHANCE: Consider a more robust (less cryptic) way of doing this.
{
RestoreProject(null, appArgs.BackupFile);
return;
}
// Command-line most likely came from a restore in another process.
// There is no need to re-show the dialog since the user has already chosen
// the options and confirmed to overwrite any existing database.
Logger.WriteEvent("Restoring project: " + appArgs.BackupFile);
RestoreProjectSettings restoreSettings = new RestoreProjectSettings(FwDirectoryFinder.ProjectsDirectory, appArgs.Database,
appArgs.BackupFile, appArgs.RestoreOptions);
RestoreCurrentProject(new FwRestoreProjectSettings(appArgs.AppAbbrev, restoreSettings), null);
}