VmsMsgSendDisp.cpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include <tchar.h>
  5. #include <cxFormats.hpp>
  6. //---------------------------------------------------------------------------
  7. #include "AppGlobalF.h"
  8. #include "ITSDbF.h"
  9. #include "FrmVmsMsgSendDispOldF.h"
  10. //---------------------------------------------------------------------------
  11. USEFORM("VMSM500M\FrmVmsMsgSendDispF.cpp", FrmVmsMsgSendDisp);
  12. USEFORM("VMSM500M\FrmVmsMsgSendDispOldF.cpp", FrmVmsMsgSendDispOld);
  13. //---------------------------------------------------------------------------
  14. WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
  15. {
  16. if (!CheckApplicationParam()) {
  17. return 0;
  18. }
  19. if (!ApplicationSingleRun("TFrmVmsMsgSendDisp", "VMS 메시지 수동표출 - (DB 장애)")) {
  20. return 0;
  21. }
  22. DateSeparator = '-';
  23. TimeSeparator = ':';
  24. ShortDateFormat ="yyyy-MM-dd";
  25. ShortTimeFormat = "hh:nn:ss";
  26. LongTimeFormat = "hh:nn:ss";
  27. cxFormatController()->BeginUpdate();
  28. cxFormatController()->UseDelphiDateTimeFormats = true;
  29. cxFormatController()->EndUpdate();
  30. cxFormatController()->GetFormats();
  31. cxFormatController()->NotifyListeners();
  32. g_nPid = (int)GetCurrentProcessId();
  33. g_sAppDir = ExtractFilePath(Application->ExeName);
  34. g_sAppName = ChangeFileExt(ExtractFileName(Application->ExeName), "");
  35. g_sCfgDir = g_sAppDir + g_IniFileDir + "\\";
  36. g_sLogDir = g_sAppDir + "Log\\";
  37. ForceDirectories(g_sLogDir.c_str());
  38. ChDir(g_sAppDir);
  39. /*
  40. * 시스템 운영환경을 ini 파일에서 읽어 온다.
  41. */
  42. LoadDefaultConfigInfo(g_IniFileName);
  43. ITSLog = new TITSLog(g_sLogDir, g_sAppName, g_AppCfg.sLogDay);
  44. ITSLog->FLogCfg = g_LogCfg;
  45. try
  46. {
  47. ReportMemoryLeaksOnShutdown = true;
  48. Application->Initialize();
  49. Application->MainFormOnTaskBar = true;
  50. Application->Title = g_AppCfg.sTitle;
  51. Application->Title = "VMS 메시지 수동표출 - (DB 장애)";
  52. Application->CreateForm(__classid(TFrmVmsMsgSendDisp), &FrmVmsMsgSendDisp);
  53. Application->Run();
  54. }
  55. catch (Exception &exception)
  56. {
  57. Application->ShowException(&exception);
  58. }
  59. catch (...)
  60. {
  61. try
  62. {
  63. throw Exception("");
  64. }
  65. catch (Exception &exception)
  66. {
  67. Application->ShowException(&exception);
  68. }
  69. }
  70. prog_exit:
  71. try
  72. {
  73. }
  74. catch(...)
  75. {
  76. }
  77. return 0;
  78. }
  79. //---------------------------------------------------------------------------