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

#ifndef FrmMainFH
#define FrmMainFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Menus.hpp>
#include <ImgList.hpp>
#include <ComCtrls.hpp>
#include <jpeg.hpp>
#include <AppEvnts.hpp>
//---------------------------------------------------------------------------
#include <windows.h>
#include <ADODB.hpp>
#include <DB.hpp>
#include "DataTypesF.h"
#include "WindowMsgF.h"
#include "ITSUtilF.h"
#include "AppGlobalF.h"
#include "CenterCommF.h"
#include <GIFImg.hpp>
#include <OleCtnrs.hpp>
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxHint.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxPC.hpp"
#include "cxPCdxBarPopupMenu.hpp"
#include "dxBar.hpp"
#include "dxCustomHint.hpp"
#include "dxRibbon.hpp"
#include "dxRibbonGallery.hpp"
#include "dxRibbonSkins.hpp"
#include "dxRibbonStatusBar.hpp"
#include "dxScreenTip.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinChooserGallery.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinsdxBarPainter.hpp"
#include "dxSkinsdxRibbonPainter.hpp"
#include "dxSkinsForm.hpp"
#include "dxStatusBar.hpp"
#include "dxTabbedMDI.hpp"
#include "dxSkinMcSkin.hpp"
//---------------------------------------------------------------------------

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

typedef enum
{
    isbUser,
    isbHint,
    isbMsg,
    isbGisPos,
    isbAlarm,
    isbDb,
    isbComm,
    isbTime,
    isbStatus,
} enStatusBar;

//---------------------------------------------------------------------------
class TFrmMain : public TdxCustomRibbonForm//TdxCustomRibbonForm//TForm
{
__published:	// IDE-managed Components
    TTimer *TmrAppState;
    TdxTabbedMDIManager *dxTabbedMDIManager1;
    TImageList *ilStatusBarImages;
    TcxHintStyleController *cxHintStyleController1;
    TTimer *TmrDebugHide;
    TTimer *TmrOnShow;
    TTimer *TmrPolling;
    TcxImageList *cxSmallImages;
    TcxImageList *cxLargeImages;
    TImageList *ImageList1;
    TdxBarManager *dxBarManager;
    TdxBar *BarConfig4;
    TdxBar *BarTraffic1;
    TdxBarLargeButton *NITS0000M;
    TdxRibbon *Ribbon;
    TdxRibbonTab *TabTraffic;
    TdxRibbonTab *TabStatistics;
    TdxRibbonTab *TabFacility;
    TdxRibbonTab *TabDatabase;
    TdxRibbonTab *TabConfig;
    TdxSkinController *dxSkinController1;
    TdxBar *BarFacility2;
    TdxBarLargeButton *NIFM0010M;
    TdxBarLargeButton *NIFM0030M;
    TADOQuery *ADOQry;
    TdxBar *BarConfig3;
    TdxBarLargeButton *NCFG0000M;
    TcxImageList *cxImageList1;
    TdxBar *BarTraffic2;
    TdxBar *BarTraffic3;
    TdxBar *BarTraffic4;
    TdxBarLargeButton *NITS0040M;
    TdxBarLargeButton *NITS0010M;
    TdxBarLargeButton *NITS0020M;
    TdxBarLargeButton *NITS0030M;
    TdxBar *BarStatistics1;
    TdxBar *BarStatistics2;
    TdxBarLargeButton *NIST0010M;
    TdxBarLargeButton *NIST0020M;
    TdxBarLargeButton *NIAN0020M;
    TdxBarLargeButton *NIAN0030M;
    TdxBarLargeButton *NIST0030M;
    TdxBarLargeButton *NIAN0050M;
    TdxBarLargeButton *NIAN0060M;
    TdxBarLargeButton *NIAN0040M;
    TdxBarLargeButton *NIST0040M;
    TdxBarLargeButton *NIAN0010M;
    TdxBarLargeButton *NIST0050M;
    TdxBarLargeButton *NIST0060M;
    TdxBar *BarDatabase1;
    TdxBar *BarDatabase2;
    TdxBarLargeButton *NIDB0010M;
    TdxBarLargeButton *NIDB0020M;
    TdxBarLargeButton *NIDB0030M;
    TdxBarLargeButton *NIDB0090M;
    TdxBarLargeButton *NIDB0060M;
    TdxBarLargeButton *NIDB0070M;
    TdxBarLargeButton *NIDB0110M;
    TdxBarLargeButton *NIDB0050M;
    TdxBarLargeButton *NIDB0080M;
    TdxBarLargeButton *NIDB0040M;
    TdxBar *BarCctv1;
    TdxBar *BarVms1;
    TdxBarLargeButton *NCCTV100M;
    TdxBarLargeButton *RCCTVR10R;
    TdxBarLargeButton *NVMSR000R;
    TdxBarLargeButton *NIDB0100M;
    TdxSkinChooserGalleryItem *dxSkinChooserGalleryItem1;
    TdxBar *BarConfig1;
    TdxBarLargeButton *NCFG0001M;
    TdxRibbonTab *TabHistory;
    TdxBar *BarHistorySystem;
    TdxBar *BarHistoryTraffic;
    TdxBar *BarVms2;
    TdxBarLargeButton *NIHS0010M;
    TdxBarLargeButton *NIHS0020M;
    TdxBarLargeButton *NIHS0030M;
    TdxBarLargeButton *NIHS0040M;
    TdxBarLargeButton *RVMSH100M;
    TdxBarLargeButton *RVMSH200M;
    TdxBarLargeButton *NIFM0020M;
    TdxBarSubItem *dxBarSubItem1;
    TdxBar *BarReport;
    TdxBarLargeButton *NIRP0010M;
    TApplicationEvents *ApplicationEvents1;
    TdxBar *BarDsrcRseHistory;
    TdxBarLargeButton *NDSRH010M;
    TdxBarLargeButton *NDSRH020M;
    TdxBarLargeButton *NDSRH030M;
    TdxBarLargeButton *NDSRH040M;
    TdxBarLargeButton *NDSRH050M;
    TdxBar *BarDsrcRseMngr;
    TdxBarLargeButton *NDSRM010M;
    TdxBarLargeButton *NDSRM020M;
    TdxBarLargeButton *NDSRM030M;
    TdxBarLargeButton *NDSRM040M;
    TdxBar *BarVdsHistory;
    TdxBarLargeButton *NVDSH010M;
    TdxBar *BarAviHistory;
    TdxBarLargeButton *NAVIH010M;
    TdxBarLargeButton *NAVIH020Mx;
    TdxBarLargeButton *NAVIH030Mx;
    TdxBarLargeButton *NAVIH040M;
    TdxBarLargeButton *NAVIH050M;
    TdxBarLargeButton *NAVIH060M;
    TdxBarLargeButton *NAVIH070M;
    TdxBarLargeButton *NVDSH020Mx;
    TdxBarLargeButton *NVDSH030Mx;
    TdxBarLargeButton *NVDSH040M;
    TdxBarLargeButton *NVDSH050Mx;
    TdxRibbonTab *TabDsrc;
    TdxRibbonTab *TabVds;
    TdxRibbonTab *TabAvi;
    TdxBar *BarVdsStatistics;
    TdxBarLargeButton *NVDSS010M;
    TdxBarLargeButton *NVDSH060Mx;
    TdxBar *BarAviStatistics;
    TdxBarLargeButton *NAVIS010M;
    TdxBar *BarVdsManager;
    TdxBarLargeButton *NVDSM100M;
    TdxBarLargeButton *NVDSM020M;
    TdxBar *BarAviManager;
    TdxBarLargeButton *RAVIM010M;
    TdxBarLargeButton *RAVIM020M;
    TdxBarLargeButton *NIDB0120M;
    TdxBarLargeButton *NIDB0130M;
    TdxBarLargeButton *NVDSM300M;
    TdxBarLargeButton *RAVIM030M;
    TdxBarLargeButton *RAVIC010M;
    TdxBar *BarCctv3;
    TdxBarLargeButton *NWCAM100M;
    TdxBarLargeButton *NWCAMR10R;
    TdxRibbonTab *TabSms;
    TdxBar *BarSms;
    TdxBarLargeButton *NSMS0010M;
    TdxBarLargeButton *NSMS0020M;
    TdxBarLargeButton *NSMS0030M;
    TdxBarLargeButton *NIFM0040M;
    TdxBarLargeButton *NIFM0050M;
    TdxBarLargeButton *NDSRH060M;
    TdxBarLargeButton *NDSRH070M;
    TdxBarLargeButton *NTST0000M;
    TdxRibbonStatusBar *dxStatusBar;
    TdxStatusBarContainerControl *dxStatusBarContainer;
    TImage *ImgAlarm;
    TImage *ImgAlarmNormal;
    TcxLabel *LblAlarm;
    TdxBarLargeButton *RVMSH300M;
    TdxBarLargeButton *RVMSH400M;
    TdxBar *BarPark0;
    TdxBarLargeButton *NPIS0010M;
    TdxRibbonTab *TabVms;
    TdxRibbonTab *TabCctv;
    TdxBar *BarCctv2;
    TdxBarLargeButton *RCCTVH10M;
    TdxBarLargeButton *NIHS0060M;
    TdxBarLargeButton *NAVIS020M;
    TdxBarLargeButton *NIST0070M;
    TdxBarLargeButton *NIST0080M;
    TdxBarLargeButton *NVDSS020M;
    TTimer *TmrDbCheck;
    TdxRibbonTab *TabParking;
    TdxBarLargeButton *NPIS0020M;
    TdxBarLargeButton *NPIS0030M;
    TdxBar *BarPark1;
    TdxBarLargeButton *NPISH010M;
    TdxRibbonTab *TabBlackBox;
    TdxBar *BarBlackBox0;
    TdxBarLargeButton *NBDS0010M;
    TdxBarLargeButton *NBDS0020M;
    TdxBar *BarBlackBox1;
    TdxBarLargeButton *NBDH0010M;
    TdxBarLargeButton *NBDH0020M;
    TdxRibbonTab *TabTrafficAnalysisSupport;
    TdxBar *BarTrafficAnalysisSupport0;
    TdxBarLargeButton *NTAS0010M;
    TdxBarLargeButton *NTAS0030M;
    TdxBarLargeButton *NTAS0040M;
    TdxBarLargeButton *NTAS0020M;
    TdxBarLargeButton *NTAS0050M;
    TdxBar *BarTrafficAnalysisSupport1;
    TdxBarLargeButton *NWBH0010M;
    TdxBarLargeButton *NAVIH080M;
    TdxBarLargeButton *NIDB0140M;
    TdxBarLargeButton *NITS0050M;
    TdxBarLargeButton *NWCAM010M;
    TdxBarLargeButton *NWCAMH10M;
    TdxBarLargeButton *NWCAM020M;
    TdxBarLargeButton *NCCTV010M;
    TdxBar *BarCctv4;
    TdxBarLargeButton *RCCTVR20R;
    TdxBarLargeButton *NVDSM000M;
    TdxBarLargeButton *NVDSH070M;
    TdxBarLargeButton *NVDSH080M;
    TdxRibbonTab *TabCrsCam;
    TdxBar *BarCrsCam1;
    TdxBar *BarCrsCam2;
    TdxBar *BarCrsCam3;
    TdxBar *BarCrsCam4;
    TdxBarLargeButton *NCCAM100M;
    TdxBarLargeButton *NCCAMH10M;
    TdxBarLargeButton *NCCAMR10R;
    TdxBarLargeButton *NCCAM020M;
    TdxBarLargeButton *NIHS0070M;
    TdxBar *BarTrafficAnalysisSupport2;
    TdxBarLargeButton *NTAS0060M;
    TdxBarLargeButton *NTAS0070M;
    TdxBar *BarVdsAnalysis;
    TdxBarLargeButton *NTAS0080M;
    TdxBarLargeButton *NTAS0090M;
    TdxBarLargeButton *NPISH020M;
    TdxRibbonTab *TabWebCam;
    TdxBar *BarWebCam1;
    TdxBar *BarWebCam2;
    TdxBar *BarWebCam3;
    TdxBar *BarWebCam4;
    TdxBarLargeButton *NVMS0400M;
    TdxBarLargeButton *NCCTV200M;
    TdxBarLargeButton *NVMSM010M;
    TdxBarLargeButton *NIFM0070M;
    TdxRibbonTab *TabCross;
    TdxBar *BarCrossMngr;
    TdxBarLargeButton *NCRSM100M;
    TdxBarLargeButton *NCRSM200M;
    TdxBarLargeButton *NCRSM000M;
    TdxBar *BarCrossStatistics;
    TdxBarLargeButton *NCRSH100M;
    TdxBarLargeButton *NCRSH200M;
    TdxBarLargeButton *NDSRM050M;
    TdxBar *BarCrossVolSystem;
    TdxBarLargeButton *NCRSE000M;
    TdxBarLargeButton *NVDSM400M;
    TdxBar *BarVmsMonitoring;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
    void __fastcall TmrAppStateTimer(TObject *Sender);
    void __fastcall OnSkinClick(TObject *Sender);
    void __fastcall TmrDebugHideTimer(TObject *Sender);
    void __fastcall TmrOnShowTimer(TObject *Sender);
    void __fastcall TmrPollingTimer(TObject *Sender);
    void __fastcall NITS0000MClick(TObject *Sender);
    void __fastcall NIDB0010MClick(TObject *Sender);
    void __fastcall NIDB0020MClick(TObject *Sender);
    void __fastcall NIDB0030MClick(TObject *Sender);
    void __fastcall NIDB0040MClick(TObject *Sender);
    void __fastcall NIDB0090MClick(TObject *Sender);
    void __fastcall NIDB0060MClick(TObject *Sender);
    void __fastcall NIDB0070MClick(TObject *Sender);
    void __fastcall NIDB0110MClick(TObject *Sender);
    void __fastcall NIDB0050MClick(TObject *Sender);
    void __fastcall NIDB0080MClick(TObject *Sender);
    void __fastcall NCFG0000MClick(TObject *Sender);
    void __fastcall NIDB0100MClick(TObject *Sender);
    void __fastcall dxSkinChooserGalleryItem1SkinChanged(TObject *Sender, const UnicodeString ASkinName);
    void __fastcall NCFG0001MClick(TObject *Sender);
    void __fastcall NIFM0010MClick(TObject *Sender);
    void __fastcall NIFM0030MClick(TObject *Sender);
    void __fastcall NIFM0020MClick(TObject *Sender);
    void __fastcall OnRunProgramClick(TObject *Sender);
    void __fastcall NIHS0010MClick(TObject *Sender);
    void __fastcall NIHS0030MClick(TObject *Sender);
    void __fastcall NIHS0040MClick(TObject *Sender);
    void __fastcall NIAN0010MClick(TObject *Sender);
    void __fastcall NIAN0020MClick(TObject *Sender);
    void __fastcall NIAN0030MClick(TObject *Sender);
    void __fastcall NIAN0040MClick(TObject *Sender);
    void __fastcall NIST0050MClick(TObject *Sender);
    void __fastcall NIST0060MClick(TObject *Sender);
    void __fastcall NIAN0060MClick(TObject *Sender);
    void __fastcall NIAN0050MClick(TObject *Sender);
    void __fastcall NIST0010MClick(TObject *Sender);
    void __fastcall NIST0020MClick(TObject *Sender);
    void __fastcall NIST0030MClick(TObject *Sender);
    void __fastcall NIST0040MClick(TObject *Sender);
    void __fastcall NITS0010MClick(TObject *Sender);
    void __fastcall NIRP0010MClick(TObject *Sender);
    void __fastcall NIHS0020MClick(TObject *Sender);
    void __fastcall NITS0040MClick(TObject *Sender);
    void __fastcall NITS0020MClick(TObject *Sender);
    void __fastcall NITS0030MClick(TObject *Sender);
    void __fastcall ApplicationEvents1Message(tagMSG &Msg, bool &Handled);
    void __fastcall NDSRH010MClick(TObject *Sender);
    void __fastcall NDSRH020MClick(TObject *Sender);
    void __fastcall NDSRH030MClick(TObject *Sender);
    void __fastcall NDSRH040MClick(TObject *Sender);
    void __fastcall NDSRH050MClick(TObject *Sender);
    void __fastcall NDSRM010MClick(TObject *Sender);
    void __fastcall NDSRM020MClick(TObject *Sender);
    void __fastcall NDSRM040MClick(TObject *Sender);
    void __fastcall NVDSH010MClick(TObject *Sender);
    void __fastcall NAVIH010MClick(TObject *Sender);
    void __fastcall NAVIH020MxClick(TObject *Sender);
    void __fastcall NAVIH030MxClick(TObject *Sender);
    void __fastcall NAVIH040MClick(TObject *Sender);
    void __fastcall NAVIH050MClick(TObject *Sender);
    void __fastcall NAVIH060MClick(TObject *Sender);
    void __fastcall NAVIH070MClick(TObject *Sender);
    void __fastcall NVDSH020MxClick(TObject *Sender);
    void __fastcall NVDSH030MxClick(TObject *Sender);
    void __fastcall NVDSH040MClick(TObject *Sender);
    void __fastcall NVDSH050MxClick(TObject *Sender);
    void __fastcall NVDSS010MClick(TObject *Sender);
    void __fastcall NAVIS010MClick(TObject *Sender);
    void __fastcall NAVIM010MClick(TObject *Sender);
    void __fastcall NAVIM020MClick(TObject *Sender);
    void __fastcall NIDB0120MClick(TObject *Sender);
    void __fastcall NIDB0130MClick(TObject *Sender);
    void __fastcall NDSRM030MClick(TObject *Sender);
    void __fastcall NSMS0010MClick(TObject *Sender);
    void __fastcall NSMS0020MClick(TObject *Sender);
    void __fastcall NSMS0030MClick(TObject *Sender);
    void __fastcall NIFM0040MClick(TObject *Sender);
    void __fastcall OnAlarmDblClick(TObject *Sender);
    void __fastcall NIFM0050MClick(TObject *Sender);
    void __fastcall NDSRH060MClick(TObject *Sender);
    void __fastcall NDSRH070MClick(TObject *Sender);
    void __fastcall NTST0000MClick(TObject *Sender);
    void __fastcall NPIS0010MClick(TObject *Sender);
    void __fastcall NIHS0060MClick(TObject *Sender);
    void __fastcall NAVIS020MClick(TObject *Sender);
    void __fastcall NIST0070MClick(TObject *Sender);
    void __fastcall NIST0080MClick(TObject *Sender);
    void __fastcall NVDSS020MClick(TObject *Sender);
    void __fastcall TmrDbCheckTimer(TObject *Sender);
    void __fastcall NPIS0030MClick(TObject *Sender);
    void __fastcall NPIS0020MClick(TObject *Sender);
    void __fastcall NPISH010MClick(TObject *Sender);
    void __fastcall NBDS0010MClick(TObject *Sender);
    void __fastcall NBDS0020MClick(TObject *Sender);
    void __fastcall NBDH0010MClick(TObject *Sender);
    void __fastcall NBDH0020MClick(TObject *Sender);
    void __fastcall NTAS0010MClick(TObject *Sender);
    void __fastcall NTAS0020MClick(TObject *Sender);
    void __fastcall NTAS0030MClick(TObject *Sender);
    void __fastcall NTAS0040MClick(TObject *Sender);
    void __fastcall NTAS0050MClick(TObject *Sender);
    void __fastcall OnMenuMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
    void __fastcall NWBH0010MClick(TObject *Sender);
    void __fastcall NAVIH080MClick(TObject *Sender);
    void __fastcall NIDB0140MClick(TObject *Sender);
    void __fastcall NITS0050MClick(TObject *Sender);
    void __fastcall NVDSM100MClick(TObject *Sender);
    void __fastcall NVDSM020MClick(TObject *Sender);
    void __fastcall NWCAM100MClick(TObject *Sender);
    void __fastcall NWCAM010MClick(TObject *Sender);
    void __fastcall NVDSM000MClick(TObject *Sender);
    void __fastcall NVDSH070MClick(TObject *Sender);
    void __fastcall NVDSH080MClick(TObject *Sender);
    void __fastcall NWCAMH10MClick(TObject *Sender);
    void __fastcall NVDSM300MClick(TObject *Sender);
    void __fastcall NCCAM100MClick(TObject *Sender);
    void __fastcall NCCAMH10MClick(TObject *Sender);
    void __fastcall NCCAM020MClick(TObject *Sender);
    void __fastcall FormDblClick(TObject *Sender);
    void __fastcall NIHS0070MClick(TObject *Sender);
    void __fastcall NTAS0060MClick(TObject *Sender);
    void __fastcall NTAS0070MClick(TObject *Sender);
    void __fastcall ApplicationEvents1ShortCut(TWMKey &Msg, bool &Handled);
    void __fastcall NTAS0080MClick(TObject *Sender);
    void __fastcall NTAS0090MClick(TObject *Sender);
    void __fastcall NPISH020MClick(TObject *Sender);
    void __fastcall NCCTV100MClick(TObject *Sender);
    void __fastcall RCCTVR10RClick(TObject *Sender);
    void __fastcall NVMSR000RClick(TObject *Sender);
    void __fastcall RCCTVH10MClick(TObject *Sender);
    void __fastcall RVMSH100MClick(TObject *Sender);
    void __fastcall RVMSH200MClick(TObject *Sender);
    void __fastcall RVMSH300MClick(TObject *Sender);
    void __fastcall NVMS0400MClick(TObject *Sender);
    void __fastcall NCCTV010MClick(TObject *Sender);
    void __fastcall NCCTV200MClick(TObject *Sender);
    void __fastcall NWCAM020MClick(TObject *Sender);
    void __fastcall NWCAMR10RClick(TObject *Sender);
    void __fastcall NVMSM010MClick(TObject *Sender);
    void __fastcall NIFM0070MClick(TObject *Sender);
    void __fastcall NCRSM100MClick(TObject *Sender);
    void __fastcall NCRSM200MClick(TObject *Sender);
    void __fastcall NCRSM000MClick(TObject *Sender);
    void __fastcall NCRSH100MClick(TObject *Sender);
    void __fastcall NCRSH200MClick(TObject *Sender);
    void __fastcall NDSRM050MClick(TObject *Sender);
    void __fastcall NCRSE000MClick(TObject *Sender);
    void __fastcall NVDSM400MClick(TObject *Sender);
    void __fastcall RCCTVR20RClick(TObject *Sender);
private:	// User declarations

    int             FLogoutTick;

public:

    TPollingUnit    FPollTraffic00; // 링크소통정보(전체)
    TPollingUnit    FPollTraffic05; // UTIS운영정보
    TPollingUnit    FPollDatabase;  // 데이터베이스 상태

    TPollingUnit    FPollStatus01;  // 시설물상태정보
    TPollingUnit    FPollStatus02;  // 프로세스상태정보
    TPollingUnit    FPollStatus03;  // 돌발정보
    TPollingUnit    FPollEvent01;   // 블랙박스이벤트
    TPollingUnit    FPollVilgFrcs;  // 기상정보

    void __fastcall SetColorScheme(String ASkinName);

public:		// User declarations
    __fastcall TFrmMain(TComponent* Owner);

    void __fastcall OnAppHint(TObject *Sender);
    void __fastcall OnAppException(TObject *Sender, Exception *exception);

    void __fastcall ExecuteItsProgram(String AClassName, String AExeName, String AOption);
    void __fastcall TermItsProgram(String AClassName, String AExeName);

	void __fastcall CommClose();
    void __fastcall CloseAllWindow();
    void __fastcall DebugMsg(String AMsg);

    bool __fastcall GetUserMenuRight(String AUserId, String AUserRight);

    void __fastcall InitStatusBar();
    void __fastcall UpdateCommStatus();
    void __fastcall UpdateStatusBar();
    void __fastcall UpdateThreadStatus(bool ARequest, bool APing=true);
    void __fastcall UpdateDbStatus(bool ASelect);

    bool __fastcall StartJobThread();
    void __fastcall TerminateJobThread();
    bool __fastcall PostJobMessage(UINT nMsg, int WParam=0, int LParam=0);

    HWND __fastcall FindChildWindow(String sFormName);

    void __fastcall OnRefreshMessage(WPARAM AWParam, LPARAM ALParam);
    void __fastcall OnDatabaseMessage(WPARAM AWParam, LPARAM ALParam);

    void __fastcall OnPollingThreadDone(TObject *Sender);

    void __fastcall ShowFacilityStatus();
    void __fastcall ShowAutoIncidentInfo();

    bool __fastcall IsDbAlive();
    bool __fastcall DbConnect();

    void __fastcall OnUdpDataRecvMessage(TMessage &Msg);
	BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_CENTERCOMM_DATA_RECV, TMessage, OnUdpDataRecvMessage)
	END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmMain *FrmMain;
//---------------------------------------------------------------------------
#endif

