#include "CalcFs4A.h"

GUI_APP_MAIN
{
	#ifdef _DEBUG
		LOG("Debug mode!");
		StdLogSetup(LOG_FILE | LOG_TIMESTAMP);
	#else
		StdLogSetup(LOG_FILE);
	#endif
	SetLanguage(LNGC_('E','N','E','N', CHARSET_UNICODE));
	SetDefaultCharset(CHARSET_UTF8);

	/// DateFormat: First is year, second is month and third is day.
	SetDateFormat("%3:02d.%2:02d.%1:4d");
	SetDateScan("dmy");
	
	/// Supporting Dark theme
	if(IsDark(SColorPaper())) Ctrl::SetSkin(ChStdSkin);

	/// Load config from file: "CalcFS4A.cfg"
	Single<AppCFG>().Load();

	FormStart frmStart;
	frmStart.Icon(Images::ICON_18(), Images::ICON_64());
	frmStart.BeforeFrmShow();
	frmStart.Run();
	frmStart.BeforeFrmClose();
}
