private static FwApp GetOrCreateApplication(FwAppArgs args)
{
var appAbbrev = args.AppAbbrev;
if (String.IsNullOrEmpty(appAbbrev))
{
// Probably a double-click of the data file. See if we can figure out who last had it open.
appAbbrev = GetDefaultApp(args);
}
if (appAbbrev.Equals(FwUtils.ksTeAbbrev, StringComparison.InvariantCultureIgnoreCase))
{
if (FwUtils.IsTEInstalled)
{
if (s_teApp == null)
{
s_teApp = (FwApp)DynamicLoader.CreateObject(FwDirectoryFinder.TeDll,
FwUtils.ksFullTeAppObjectName, s_fwManager, GetHelpTopicProvider(appAbbrev), args);
s_teAppKey = s_teApp.SettingsKey;
}
return s_teApp;
}
}
else if (appAbbrev.Equals(FwUtils.ksFlexAbbrev, StringComparison.InvariantCultureIgnoreCase))
{
if (FwUtils.IsFlexInstalled)
{
if (s_flexApp == null)
{
s_flexApp = (FwApp)DynamicLoader.CreateObject(FwDirectoryFinder.FlexDll,
FwUtils.ksFullFlexAppObjectName, s_fwManager, GetHelpTopicProvider(appAbbrev), args);
s_flexAppKey = s_flexApp.SettingsKey;
}
return s_flexApp;
}
}
ShowCommandLineHelp();
return null;
}