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

#ifndef ITS00G0MFH
#define ITS00G0MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include <ADODB.hpp>
#include <ImgList.hpp>
#include <Graphics.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------

#include "ITS00GEOF.h"
#include "CenterComm.h"
#include "DataTypesF.h"
#include "WindowMsgF.h"

//---------------------------------------------------------------------------
#include "FRAME_FacilityStatusListF.h"
#include "FRAME_ProcessStatusListF.h"
#include "FRAME_UtisStatusListF.h"
#include "FRAME_IncidentListF.h"
#include "FRAME_RepeatCongestListF.h"
#include "FRAME_TrafficMissLinkListF.h"
//---------------------------------------------------------------------------
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxPC.hpp"
#include "cxPCdxBarPopupMenu.hpp"
#include "cxSplitter.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinCaramel.hpp"
#include "dxSkinCoffee.hpp"
#include "dxSkinDarkRoom.hpp"
#include "dxSkinDarkSide.hpp"
#include "dxSkinFoggy.hpp"
#include "dxSkinGlassOceans.hpp"
#include "dxSkiniMaginary.hpp"
#include "dxSkinLilian.hpp"
#include "dxSkinLiquidSky.hpp"
#include "dxSkinLondonLiquidSky.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinMoneyTwins.hpp"
#include "dxSkinOffice2007Black.hpp"
#include "dxSkinOffice2007Blue.hpp"
#include "dxSkinOffice2007Green.hpp"
#include "dxSkinOffice2007Pink.hpp"
#include "dxSkinOffice2007Silver.hpp"
#include "dxSkinOffice2010Black.hpp"
#include "dxSkinOffice2010Blue.hpp"
#include "dxSkinOffice2010Silver.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"

class TITS00G0M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TPanel *PnlInfoLeft;
    TcxSplitter *SplitterLeft;
    TcxGroupBox *GrpProcess;
    TcxSplitter *SplitterInfo01;
    TcxGroupBox *GrpFacility;
    TPanel *PnlCenter;
    TcxSplitter *SplitterSystem;
    TPanel *PnlMapBack;
    TPanel *PnlBottom;
    TcxGroupBox *GrpSystem;
    TcxPageControl *PgSystem;
    TcxTabSheet *TsIncident;
    TcxTabSheet *TsRrCongest;
    TcxTabSheet *TsMissingLink;
    TImageList *ImageList1;
    TcxGroupBox *GrpUtis;
    TcxSplitter *cxSplitter2;
    TFRAMEIncidentList *FRAMEIncidentList1;
    TFRAMERepeatCongestList *FRAMERepeatCongestList1;
    TFRAMETrafficMissLinkList *FRAMETrafficMissLinkList1;
    TcxLabel *LblAlarm;
    TFRAMEProcessStatusList *FRAMEProcessStatusList1;
    TFRAMEFacilityStatusList *FRAMEFacilityStatusList1;
    TFRAMEUtisStatusList *FRAMEUtisStatusList1;
    TPopupMenu *pmuVms;
    TMenuItem *MnuVmsId;
    TMenuItem *N3;
    TMenuItem *mnuVmsMsg;
    TMenuItem *mnuVmsCam;
    TPopupMenu *pmuRse;
    TMenuItem *MnuRseId;
    TMenuItem *N4;
    TMenuItem *pmuRsePing;
    TPopupMenu *pmuCctv;
    TMenuItem *MnuCctvId;
    TMenuItem *N6;
    TMenuItem *mnuStopImage;
    TMenuItem *mnuCctvCam;
    TMenuItem *mnuCctvPingCtrl;
    TMenuItem *N1;
    TMenuItem *mnuMoveCctv;
    TMenuItem *N2;
    TMenuItem *mnuMoveVms;
    TMenuItem *N5;
    TMenuItem *mnuMoveRse;
    TMenuItem *NetworkPing1;
    TMenuItem *mnuCctvPingFibr;
    TMenuItem *mnuCctvPingStrm;
    TMenuItem *mnuCctvPingEncd;
    TMenuItem *mnuCctvPingCapt;
    TMenuItem *NetworkPing2;
    TMenuItem *mnuVmsPingWeb;
    TMenuItem *mnuVmsPingCtrl;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall PgSystemPageChanging(TObject *Sender, TcxTabSheet *NewPage, bool &AllowChange);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FRAMEIncidentList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall FRAMERepeatCongestList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall FRAMETrafficMissLinkList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall FRAMEFacilityStatusList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall FRAMEFacilityStatusList1TvListCellClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall pmuFacilityPopup(TObject *Sender);
    void __fastcall mnuFacilityPingClick(TObject *Sender);
    void __fastcall mnuFacilityMoveClick(TObject *Sender);
    void __fastcall mnuStopImageClick(TObject *Sender);
    void __fastcall mnuCctvCamClick(TObject *Sender);
    void __fastcall mnuVmsMsgClick(TObject *Sender);
    void __fastcall mnuVmsCamClick(TObject *Sender);
private:	// User declarations
    void __fastcall CommClose();

public:
    int             FIncidentCnt;
    int             FRrCongestCnt;
    int             FMissLinkCnt;
    String          FSelId;

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

    void __fastcall LoadLocalSkin();

    void __fastcall InitListData();
    void __fastcall UpdateAlarmStatus();
    void __fastcall UpdateTrafficMissLinkInfo();
    void __fastcall UpdateTrafficRrCongestInfo();
    void __fastcall UpdateIncidentInfo();
    void __fastcall UpdateFacilityStatusInfo();
    void __fastcall UpdateProcessStatusInfo();
    void __fastcall UpdateUtisStatusInfo();
    void __fastcall UpdateFacilityInfo();

    void __fastcall MoveGisFacility(String AType, String AId);

    void __fastcall OnMainFormMessage(TMessage &Msg);
	BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
    END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern PACKAGE TITS00G0M *ITS00G0M;
//---------------------------------------------------------------------------

#endif

