//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
#include <tchar.h>
#include <cxFormats.hpp>
//---------------------------------------------------------------------------
#include "AppGlobalF.h"
#include "ITSDbF.h"
#include "ITSLangTransF.h"

//---------------------------------------------------------------------------
USEFORM("PLUGIN\02.FACILITY\IFM0010M\IFM0010MF.cpp", IFM0010M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0020M\IAN0020MF.cpp", IAN0020M);
USEFORM("PLUGIN\05.DATABASE\IDB0040M\IDB00401F.cpp", IDB00401);
USEFORM("PLUGIN\08.VDS\VDSS010M\VDSS0101F.cpp", VDSS0101);
USEFORM("PLUGIN\08.VDS\VDSH030M\VDSH0301F.cpp", VDSH0301);
USEFORM("PLUGIN\03.HISTORY\IHS0040M\IHS0040MF.cpp", IHS0040M);
USEFORM("PLUGIN\05.DATABASE\IDB0060M\IDB0060MF.cpp", IDB0060M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0040M\TAS00401F.cpp", TAS00401);
USEFORM("PLUGIN\02.FACILITY\IFM0030M\IFM0030MF.cpp", IFM0030M);
USEFORM("PLUGIN\05.DATABASE\IDB0010M\IDB00101F.cpp", IDB00101);
USEFORM("PLUGIN\08.VDS\VDSH030M\VDSH030MF.cpp", VDSH030M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0010M\IST0010MF.cpp", IST0010M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0010M\IAN0010MF.cpp", IAN0010M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmFullScreenF.cpp", FrmFullScreen);
USEFORM("PLUGIN\99.LOGIN\FRMPswdChngeF.cpp", FRMPswdChnge);
USEFORM("PLUGIN\02.FACILITY\IFM0050M\IFM0050MF.cpp", IFM0050M);
USEFORM("PLUGIN\08.VDS\VDSH020M\VDSH0201F.cpp", VDSH0201);
USEFORM("PLUGIN\00.FRAME\FRAME_NodeListF.cpp", FRAMENodeList); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_FacilityStatusListF.cpp", FRAMEFacilityStatusList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\IHS0020M\IHS0020MF.cpp", IHS0020M);
USEFORM("PLUGIN\05.DATABASE\IDB0050M\IDB0050MF.cpp", IDB0050M);
USEFORM("PLUGIN\05.DATABASE\IDB0090M\IDB0090MF.cpp", IDB0090M);
USEFORM("PLUGIN\05.DATABASE\IDB0051M\IDB0051MF.cpp", IDB0051M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0030M\FRAME_IncidentRegistF.cpp", FRAMEIncidentRegist); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0040M\IST0040MF.cpp", IST0040M);
USEFORM("PLUGIN\00.FRAME\PlugInChart\PlugInSetChartF.cpp", PlugInSetChart);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0020M\IST0020MF.cpp", IST0020M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IRP0010M\IRP00101F.cpp", IRP00101);
USEFORM("PLUGIN\08.VDS\VDSH040M\VDSH0401F.cpp", VDSH0401);
USEFORM("PLUGIN\00.FRAME\FRAME_IncidentAutoListF.cpp", FRAMEIncidentAutoList); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0030M\IST00301F.cpp", IST00301);
USEFORM("..\COMMON\FRAME\FRAME_WCamStateListF.cpp", FRAMEWCamStateList); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_AtrdNameListF.cpp", FRAMEAtrdNameList); /* TFrame: File Type */
USEFORM("PLUGIN\COMMON\ITSSELDAYF.cpp", ITSSELDAY);
USEFORM("PLUGIN\05.DATABASE\IDB0030M\IDB0030MF.cpp", IDB0030M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmGisSearchF.cpp", FrmGisSearch);
USEFORM("MAIN\FrmIncidentAlarmF.cpp", FrmIncidentAlarm);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmCctvImgF.cpp", FrmCctvImg);
USEFORM("PLUGIN\05.DATABASE\IDB0020M\IDB00201F.cpp", IDB00201);
USEFORM("PLUGIN\00.FRAME\FRAME_IfscListF.cpp", FRAMEIfscList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\IHS0030M\IHS00301F.cpp", IHS00301);
USEFORM("PLUGIN\05.DATABASE\IDB0040M\IDB0040MF.cpp", IDB0040M);
USEFORM("PLUGIN\08.VDS\VDSM200M\VDSM200MF.cpp", VDSM200M);
USEFORM("PLUGIN\05.DATABASE\IDB0120M\IDB0120MF.cpp", IDB0120M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0020M\IAN00201F.cpp", IAN00201);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmVmsMsgF.cpp", FrmVmsMsg);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IRP0010M\IRP0010MF.cpp", IRP0010M);
USEFORM("PLUGIN\03.HISTORY\IHS0060M\IHS0060MF.cpp", IHS0060M);
USEFORM("PLUGIN\08.VDS\VDSH050M\VDSH0501F.cpp", VDSH0501);
USEFORM("PLUGIN\08.VDS\VDSH050M\VDSH050MF.cpp", VDSH050M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0030M\ITS0030MF.cpp", ITS0030M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0030M\IST0030MF.cpp", IST0030M);
USEFORM("PLUGIN\03.HISTORY\IHS0010M\IHS0010MF.cpp", IHS0010M);
USEFORM("PLUGIN\03.HISTORY\IHS0050M\IHS00501F.cpp", IHS00501);
USEFORM("PLUGIN\05.DATABASE\IDB0020M\IDB0020MF.cpp", IDB0020M);
USEFORM("PLUGIN\00.FRAME\FRAME_LinkListF.cpp", FRAMELinkList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\IHS0060M\IHS00601F.cpp", IHS00601);
USEFORM("PLUGIN\COMMON\ITSSEL3MF.cpp", ITSSEL3M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0060M\TAS0060MF.cpp", TAS0060M);
USEFORM("PLUGIN\08.VDS\VDSH070M\VDSH070MF.cpp", VDSH070M);
USEFORM("PLUGIN\05.DATABASE\IDB0140M\IDB0140MF.cpp", IDB0140M);
USEFORM("..\COMMON\FRAME\FRAME_VdsStateListF.cpp", FRAMEVdsStateList); /* TFrame: File Type */
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0070M\TAS0070MF.cpp", TAS0070M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0070M\TAS00701F.cpp", TAS00701);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0050M\IST00501F.cpp", IST00501);
USEFORM("PLUGIN\15.CCAM\CCAM100M\CCAM101MF.cpp", CCAM101M);
USEFORM("PLUGIN\02.FACILITY\IFM0030M\FRAME_FacilityFailActionF.cpp", FRAMEFacilityFailAction); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_WebUserListF.cpp", FRAMEWebUserList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\WBH0010M\WBH0010MF.cpp", WBH0010M);
USEFORM("PLUGIN\14.WCAM\WCAM010M\WCAM010MF.cpp", WCAM010M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0060M\TAS00601F.cpp", TAS00601);
USEFORM("PLUGIN\00.FRAME\FRAME_VilgFrcsListF.cpp", FRAMEVilgFrcsList); /* TFrame: File Type */
USEFORM("PLUGIN\11.PARK\PIS0030M\PIS0030MF.cpp", PIS0030M);
USEFORM("PLUGIN\11.PARK\01.FRAME\FRAME_ParkingListF.cpp", FRAMEParkingList); /* TFrame: File Type */
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0090M\TAS0090MF.cpp", TAS0090M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0030M\IAN0030MF.cpp", IAN0030M);
USEFORM("PLUGIN\11.PARK\PISH010M\PISH0101F.cpp", PISH0101);
USEFORM("PLUGIN\11.PARK\PIS0020M\PIS0020MF.cpp", PIS0020M);
USEFORM("PLUGIN\11.PARK\PISH010M\PISH010MF.cpp", PISH010M);
USEFORM("PLUGIN\08.VDS\VDSH070M\VDSH0701F.cpp", VDSH0701);
USEFORM("PLUGIN\01.TRAFFIC\ITS0040M\ITS0040MF.cpp", ITS0040M);
USEFORM("PLUGIN\COMMON\ITSSEL2MF.cpp", ITSSEL2M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0090M\TAS00901F.cpp", TAS00901);
USEFORM("PLUGIN\00.FRAME\FRAME_VilgShprListF.cpp", FRAMEVilgShprList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\WBH0010M\WBH00101F.cpp", WBH00101);
USEFORM("PLUGIN\00.FRAME\FRAME_RoadListF.cpp", FRAMERoadList); /* TFrame: File Type */
USEFORM("PLUGIN\02.FACILITY\IFM0040M\IFM00401F.cpp", IFM00401);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0040M\TAS0040MF.cpp", TAS0040M);
USEFORM("PLUGIN\08.VDS\VDSH060M\VDSH0601F.cpp", VDSH0601);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0040M\IST00401F.cpp", IST00401);
USEFORM("PLUGIN\14.WCAM\WCAM020M\WCAM020MF.cpp", WCAM020M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0050M\IAN0050MF.cpp", IAN0050M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0020M\TAS00201F.cpp", TAS00201);
USEFORM("PLUGIN\05.DATABASE\IDB0070M\IDB0070MF.cpp", IDB0070M);
USEFORM("PLUGIN\Common\ITSSEL0MF.cpp", ITSSEL0M);
USEFORM("PLUGIN\05.DATABASE\IDB0030M\IDB00301F.cpp", IDB00301);
USEFORM("PLUGIN\00.FRAME\FRAME_FacilityListF.cpp", FRAMEFacilityList); /* TFrame: File Type */
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmLinkInfoF.cpp", FrmLinkInfo);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0030M\IAN00301F.cpp", IAN00301);
USEFORM("PLUGIN\00.FRAME\PlugInChart\PlugInChartF.cpp", PlugInChart);
USEFORM("PLUGIN\00.FRAME\FRAME_TrafficRoadListF.cpp", FRAMETrafficRoadList); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSM300M\VDSM300MF.cpp", VDSM300M);
USEFORM("..\COMMON\FRAME\FRAME_WCamListF.cpp", FRAMEWCamList); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0030M\IST00302F.cpp", IST00302);
USEFORM("PLUGIN\08.VDS\VDSH010M\VDSH0101F.cpp", VDSH0101);
USEFORM("PLUGIN\00.ITS\FRAME\FRAME_ItsRoadF.cpp", FRAMEItsRoad); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0040M\IAN0040MF.cpp", IAN0040M);
USEFORM("PLUGIN\99.LOGIN\FRMLoginF.cpp", FRMLogin);
USEFORM("PLUGIN\00.FRAME\FRAME_IncidentListF.cpp", FRAMEIncidentList); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_ProcessStatusListF.cpp", FRAMEProcessStatusList); /* TFrame: File Type */
USEFORM("PLUGIN\05.DATABASE\IDB0130M\IDB0130MF.cpp", IDB0130M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmLinkGradeSetF.cpp", FrmLinkGradeSet);
USEFORM("PLUGIN\05.DATABASE\IDB0080M\IDB0080MF.cpp", IDB0080M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0010M\TAS0010MF.cpp", TAS0010M);
USEFORM("PLUGIN\03.HISTORY\IHS0040M\IHS00401F.cpp", IHS00401);
USEFORM("PLUGIN\01.TRAFFIC\ITS0010M\ITS0010MF.cpp", ITS0010M);
USEFORM("PLUGIN\00.FRAME\FRAME_TrafficIfscListF.cpp", FRAMETrafficIfscList); /* TFrame: File Type */
USEFORM("PLUGIN\03.HISTORY\IHS0050M\IHS0050MF.cpp", IHS0050M);
USEFORM("PLUGIN\02.FACILITY\IFM0020M\IFM0020MF.cpp", IFM0020M);
USEFORM("PLUGIN\02.FACILITY\IFM0050M\FRAME_FailHndlF.cpp", FRAMEFailHndl); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_RepeatCongestListF.cpp", FRAMERepeatCongestList); /* TFrame: File Type */
USEFORM("..\COMMON\FRAME\FRAME_VmsListF.cpp", FRAMEVmsList); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0050M\IAN00501F.cpp", IAN00501);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0070M\IST00701F.cpp", IST00701);
USEFORM("PLUGIN\03.HISTORY\IHS0030M\IHS0030MF.cpp", IHS0030M);
USEFORM("PLUGIN\00.FRAME\FRAME_AtrdListF.cpp", FRAMEAtrdList); /* TFrame: File Type */
USEFORM("PLUGIN\02.FACILITY\IFM0030M\FRAME_FacilityFailF.cpp", FRAMEFacilityFail); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSS020M\VDSS020MF.cpp", VDSS020M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0030M\TAS00301F.cpp", TAS00301);
USEFORM("PLUGIN\00.FRAME\FRAME_ChartF.cpp", FRAMEChart); /* TFrame: File Type */
USEFORM("MAIN\FrmFacilityAlarmF.cpp", FrmFacilityAlarm);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0070M\IST0070MF.cpp", IST0070M);
USEFORM("..\COMMON\FRAME\FRAME_CctvListF.cpp", FRAMECctvList); /* TFrame: File Type */
USEFORM("MAIN\FrmMainF.cpp", FrmMain);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0060M\IST0060MF.cpp", IST0060M);
USEFORM("PLUGIN\08.VDS\VDSH060M\VDSH060MF.cpp", VDSH060M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0030M\FRAME_IncidentProcessF.cpp", FRAMEIncidentProcess); /* TFrame: File Type */
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0020M\TAS0020MF.cpp", TAS0020M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0050M\IST0050MF.cpp", IST0050M);
USEFORM("PLUGIN\05.DATABASE\IDB0100M\IDB0100MF.cpp", IDB0100M);
USEFORM("PLUGIN\08.VDS\VDSH080M\VDSH0801F.cpp", VDSH0801);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmStreamPlayerF.cpp", FrmStreamPlayer);
USEFORM("PLUGIN\08.VDS\VDSH020M\VDSH020MF.cpp", VDSH020M);
USEFORM("PLUGIN\03.HISTORY\IHS0020M\IHS00201F.cpp", IHS00201);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0060M\IAN00601F.cpp", IAN00601);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0030M\TAS0030MF.cpp", TAS0030M);
USEFORM("PLUGIN\05.DATABASE\IDB0010M\IDB0010MF.cpp", IDB0010M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0070M\IST00702F.cpp", IST00702);
USEFORM("PLUGIN\08.VDS\VDSS010M\VDSS010MF.cpp", VDSS010M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0060M\IST00601F.cpp", IST00601);
USEFORM("PLUGIN\08.VDS\VDSH040M\VDSH040MF.cpp", VDSH040M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0050M\TAS0050MF.cpp", TAS0050M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0010M\IAN00101F.cpp", IAN00101);
USEFORM("PLUGIN\08.VDS\01.FRAME\FRAME_VdsDtctListF.cpp", FRAMEVdsDtctList); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSH010M\VDSH010MF.cpp", VDSH010M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0050M\TAS00501F.cpp", TAS00501);
USEFORM("PLUGIN\08.VDS\VDSH080M\VDSH080MF.cpp", VDSH080M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0070M\IST00703F.cpp", IST00703);
USEFORM("MAIN\FrmResourceF.cpp", FrmLang);
USEFORM("PLUGIN\01.TRAFFIC\ITS0020M\ITS0020MF.cpp", ITS0020M);
USEFORM("PLUGIN\COMMON\ITSSELAMF.cpp", ITSSELAM);
USEFORM("PLUGIN\00.FRAME\FRAME_UnRegFacilityListF.cpp", FRAMEUnRegFacilityList); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSM100M\VDSM100MF.cpp", VDSM100M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0030M\FRAME_IncidentEndF.cpp", FRAMEIncidentEnd); /* TFrame: File Type */
USEFORM("..\COMMON\FRAME\FRAME_OpenMapF.cpp", FRAMEOpenMap); /* TFrame: File Type */
USEFORM("PLUGIN\06.CONFIG\CFG0000M\CFG0000MF.cpp", CFG0000M);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IAN0060M\IAN0060MF.cpp", IAN0060M);
USEFORM("PLUGIN\00.FRAME\FRAME_TrafficMissLinkListF.cpp", FRAMETrafficMissLinkList); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSM100M\VDSM101MF.cpp", VDSM101M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0030M\FrmIncidVmsInfoF.cpp", FrmIncidVmsInfo);
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0080M\IST0080MF.cpp", IST0080M);
USEFORM("..\COMMON\FRAME\FRAME_VdsListF.cpp", FRAMEVdsList); /* TFrame: File Type */
USEFORM("PLUGIN\15.CCAM\CCAM100M\CCAM100MF.cpp", CCAM100M);
USEFORM("PLUGIN\02.FACILITY\IFM0040M\IFM0040MF.cpp", IFM0040M);
USEFORM("PLUGIN\COMMON\ITSSEL4MF.cpp", ITSSEL4M);
USEFORM("MAIN\FrmInitializeF.cpp", FrmInitialize);
USEFORM("..\COMMON\FRAME\FRAME_CCamStateListF.cpp", FRAMECCamStateList); /* TFrame: File Type */
USEFORM("PLUGIN\08.VDS\VDSM000M\VDSM000MF.cpp", VDSM000M);
USEFORM("PLUGIN\14.WCAM\WCAMH10M\WCAMH10MF.cpp", WCAMH10M);
USEFORM("PLUGIN\03.HISTORY\IHS0070M\IHS0070MF.cpp", IHS0070M);
USEFORM("PLUGIN\00.FRAME\FRAME_DatabaseStatusF.cpp", FRAMEDatabaseStatus); /* TFrame: File Type */
USEFORM("PLUGIN\00.ITS\FRAME\FRAME_ItsCrossF.cpp", FRAMEItsCross); /* TFrame: File Type */
USEFORM("PLUGIN\00.FRAME\FRAME_TrafficLinkListF.cpp", FRAMETrafficLinkList); /* TFrame: File Type */
USEFORM("PLUGIN\04.STATISTICAL-ANALYSIS\IST0030M\IST00303F.cpp", IST00303);
USEFORM("PLUGIN\15.CCAM\CCAM010M\CCAM010MF.cpp", CCAM010M);
USEFORM("PLUGIN\00.FRAME\FRAME_AtmpPltnListF.cpp", FRAMEAtmpPltnList); /* TFrame: File Type */
USEFORM("PLUGIN\14.WCAM\WCAMH10M\WCAMH101F.cpp", WCAMH101);
USEFORM("PLUGIN\COMMON\ITSSEL1MF.cpp", ITSSEL1M);
USEFORM("PLUGIN\05.DATABASE\IDB0110M\IDB0110MF.cpp", IDB0110M);
USEFORM("PLUGIN\15.CCAM\CCAMH10M\CCAMH10MF.cpp", CCAMH10M);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\ITS0000MF.cpp", ITS0000M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0080M\TAS00801F.cpp", TAS00801);
USEFORM("PLUGIN\03.HISTORY\IHS0070M\IHS00701F.cpp", IHS00701);
USEFORM("PLUGIN\01.TRAFFIC\ITS0000M\FrmParkMsgF.cpp", FrmParkMsg);
USEFORM("PLUGIN\15.CCAM\CCAMH10M\CCAMH101F.cpp", CCAMH101);
USEFORM("..\COMMON\FRAME\FRAME_CCamListF.cpp", FRAMECCamList); /* TFrame: File Type */
USEFORM("PLUGIN\14.WCAM\WCAM100M\WCAM100MF.cpp", WCAM100M);
USEFORM("PLUGIN\COMMON\ITSSEL5MF.cpp", ITSSEL5M);
USEFORM("PLUGIN\11.PARK\PIS0010M\PIS0010MF.cpp", PIS0010M);
USEFORM("PLUGIN\13.TRAFFIC-ANALYSIS-SUPPORT\TAS0080M\TAS0080MF.cpp", TAS0080M);
USEFORM("PLUGIN\11.PARK\PISH020M\PISH020MF.cpp", PISH020M);
USEFORM("PLUGIN\11.PARK\PISH020M\PISH0201F.cpp", PISH0201);
//---------------------------------------------------------------------------
WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
    int nLoginRes;

    DateSeparator = '-';
    TimeSeparator = ':';
    ShortDateFormat ="yyyy-MM-dd";
    ShortTimeFormat = "HH:NN:SS";
    LongTimeFormat  = "HH:NN:SS";

    cxFormatController()->BeginUpdate();
    cxFormatController()->UseDelphiDateTimeFormats = true;
    cxFormatController()->EndUpdate();
    cxFormatController()->GetFormats();
    cxFormatController()->NotifyListeners();

    int nRes;
    g_nPid     = (int)GetCurrentProcessId();
    g_sAppDir  = ExtractFilePath(Application->ExeName);
    g_sAppName = ChangeFileExt(ExtractFileName(Application->ExeName), "");
    g_sCfgDir  = g_sAppDir + "Cfg\\";
    g_sLogDir  = g_sAppDir + "Log\\";
    g_sTempDir = g_sAppDir + "Temp\\";
    g_sFormsDir = g_sCfgDir + "Forms\\";
    g_sImageDir = g_sAppDir + "Image\\";
    g_sVideoDir = g_sAppDir + "Video\\";
    g_sBlackBox = g_sAppDir + "BlackBox\\";
    g_sMapDir   = g_sAppDir + "MAPDATA\\";

    ForceDirectories(g_sCfgDir.c_str());
    ForceDirectories(g_sLogDir.c_str());
    ForceDirectories(g_sTempDir.c_str());
    ForceDirectories(g_sFormsDir.c_str());
    ForceDirectories(g_sImageDir.c_str());
    ForceDirectories(g_sVideoDir.c_str());
    ForceDirectories(g_sMapDir.c_str());
    String sTempDir = g_sLogDir + "Db\\";
    ForceDirectories(sTempDir.c_str());

    //ForceDirectories(g_sBlackBox.c_str());


    String sAppDir = ExtractFilePath(Application->ExeName);
    ChDir(sAppDir); 

    /*
    *  시스템 운영환경을 ini 파일에서 읽어 온다.
    */
    LoadDefaultConfigInfo("");

    HANDLE hMutex;
	try
	{
        String sLockFile = ChangeFileExt(ExtractFileName(Application->ExeName), ".lock");
        String sProgMutexNm = "HANTE_MOKPO_" + sLockFile;
        if ((hMutex=OpenMutex(MUTEX_ALL_ACCESS, false, sProgMutexNm.c_str()))==NULL)
            hMutex = CreateMutex(NULL, true, sProgMutexNm.c_str());
        else
        {
            if (g_AppCfg.sLang == "kr")
            {
                Application->MessageBox(L"운영단말 프로그램이 이미 실행중입니다.\r\n작업관리자의 프로세스 목록에서 프로그램을 종료후 실행해 주십시오.",
                                        L"프로그램 시작 오류!!!",
                                        MB_OK|MB_ICONERROR);
            }
            else
            {
                Application->MessageBox(L"The operating terminal program is already running.\r\nPlease exit the program from the process list of Task Manager and execute it.",
                                        L"Program Start Error!!!",
                                        MB_OK|MB_ICONERROR);
            }
            return 0;
        }
    }
    catch (Exception &exception)
    {
        Application->ShowException(&exception);
        return 0;
    }

    g_sLangDir = g_sAppDir + "Lang\\";
    g_sLangDir = g_sLangDir + g_AppCfg.sLang + "\\";
    if (g_AppCfg.sLang != "kr") ForceDirectories(g_sLangDir.c_str());

    LangTrans = new TLangTrans("ITS_OP", g_AppCfg.sLang, g_sLangDir, true);

    ITSLog = new TITSLog(g_sLogDir,          g_sAppName,  g_AppCfg.sLogDay);
    FDbLog = new TITSLog(g_sLogDir + "Db\\", "Database",  g_AppCfg.sLogDay);
    ITSLog->FLogCfg = g_LogCfg;
    FDbLog->FLogCfg = g_LogCfg;

    LOGINFO("Program start....");

	if (!ITSDb_Initialize())
	{
        if (g_AppCfg.sLang == "kr")
        {
            Application->MessageBox(L"Database 자원을 시스템으로부터 얻지 못했습니다.\r\n\r\n프로그램을 종료합니다.",
                                    L"프로그램 시작 오류!!!",
                                    MB_OK|MB_ICONERROR);
        }
        else
        {
            Application->MessageBox(L"Database resource could not be obtained from the system.\r\n\r\nExit the program.",
                                    L"Program Start Error!!!",
                                    MB_OK|MB_ICONERROR);
        }
        goto prog_exit;
	}
    if (g_AppCfg.itsdb.sConnectStr == "")
    {
        ITSDb_SetInfo(g_AppCfg.itsdb.sProvider, g_AppCfg.itsdb.sServerName, g_AppCfg.itsdb.sUserName, g_AppCfg.itsdb.sPassword);
    }
    else
    {
        ITSDb_SetConnStr(g_AppCfg.itsdb.sConnectStr);
    }

    if (g_AppCfg.bLoginPrompt)
    {
        /*
        *  로그인 처리(라이브러리 로딩 실패시에만 프로그램을 종료하자-일단...)
        */
        nLoginRes = UserLogin();
        if (nLoginRes <= 0)
        {
            goto prog_exit;
        }
    }
    else
    {
        if (!ITSDb_Open())
        {
            if (g_AppCfg.sLang == "kr")
            {
                Application->MessageBox(L"데이터베이스 접속에 실패하였습니다.\r\n\r\n프로그램을 종료합니다.",
                                        L"프로그램 시작 오류!!!",
                                        MB_OK|MB_ICONERROR);
            }
            else
            {
                Application->MessageBox(L"Database connection failed.\r\n\r\nExit the program.",
                                        L"Program Start Error!!!",
                                        MB_OK|MB_ICONERROR);
            }
            goto prog_exit;
        }
        g_pLOGIN = ITSDb_GetLoginInfo();
        g_pLOGIN->bLogin         = true;
        g_pLOGIN->sUserId        = "ADMIN";
        g_pLOGIN->sUserName      = "default";
        g_pLOGIN->sUserRightId   = "1";
        g_pLOGIN->sUserRightName = "";
        g_pLOGIN->sConnSystem    = "OPR";
        g_pLOGIN->sLoginSeq      = "0";
        g_pLOGIN->sLoginIp       = "127.0.0.1";
        g_pLOGIN->sLoginTime     = Now().FormatString("yyyymmddhhnnss");
    }
    
    try
    {
        ReportMemoryLeaksOnShutdown = true;
        Application->Initialize();
        Application->MainFormOnTaskBar = true;
        Application->Title = g_AppCfg.sTitle;
        Application->Title = "교통정보시스템 통합 운영단말";
         Application->CreateForm(__classid(TFrmMain), &FrmMain);
         Application->CreateForm(__classid(TFrmLang), &FrmLang);
         Application->Run();
    }
    catch (Exception &exception)
    {
         Application->ShowException(&exception);
    }
    catch (...)
    {
         try
         {
             throw Exception("");
         }
         catch (Exception &exception)
         {
             Application->ShowException(&exception);
         }
    }

prog_exit:
    try
    {
        ITSDb_Finalize();
        
        ReleaseMutex(hMutex);
        CloseHandle(hMutex);
        hMutex = NULL;
        LOGINFO("Program end....");
    }
    catch(...)
    {
    }
    
    return 0;
}
//---------------------------------------------------------------------------

