示例#1
0
MDApp::MDApp
	(
	int*		argc,
	char*		argv[],
	JBoolean*	displayAbout,
	JString*	prevVersStr
	)
	:
	JXApplication(argc, argv, kAppSignature, kMDDefaultStringData)
{
	*displayAbout = MDCreateGlobals(this);

	if (!*displayAbout)
		{
		*prevVersStr = (MDGetPrefsManager())->GetPrevVersionStr();
		if (*prevVersStr == MDGetVersionNumberStr())
			{
			prevVersStr->Clear();
			}
		else
			{
			*displayAbout = kJTrue;
			}
		}
	else
		{
		prevVersStr->Clear();
		}
}
void
MDPrefsManager::SaveAllBeforeDestruct()
{
	SetData(kMDProgramVersionID, MDGetVersionNumberStr());

	JXPrefsManager::SaveAllBeforeDestruct();
}
void
PrintCommandLineHelp()
{
	const JCharacter* map[] =
		{
		"vers",      MDGetVersionNumberStr(),
		"copyright", JGetString("COPYRIGHT")
		};
	const JString s = JGetString("CommandLineHelp::MDMDIServer", map, sizeof(map));
	cout << endl << s << endl << endl;
}
void
MDPrefsManager::UpgradeData
	(
	const JBoolean		isNew,
	const JFileVersion	currentVersion
	)
{
	if (isNew)
		{
		SetData(kMDProgramVersionID, MDGetVersionNumberStr());
		}
}