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

#ifndef VMS0000MFH
#define VMS0000MFH
//---------------------------------------------------------------------------
#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 "VMS00MAPF.h"
#include "CenterCommF.h"
#include "DataTypesF.h"
#include "WindowMsgF.h"
#include "CDSVmsCtlrF.h"
#include "VMSFORM0F.h"
#include "VMSBACKMF.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"
#include "cxClasses.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "cxGridCardView.hpp"
#include "cxGridCustomLayoutView.hpp"
#include "cxCheckBox.hpp"
#include "FRAME_VmsStateF.h"
#include "cxCalc.hpp"
#include "cxGridBandedTableView.hpp"
#include "FRAME_FacilityStatusListF.h"

class TVMS0000M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TPanel *PnlInfoLeft;
    TcxSplitter *SplitterLeft;
    TPanel *PnlCenter;
    TcxSplitter *SplitterSystem;
    TPanel *PnlMapBack;
    TPanel *PnlBottom;
    TImageList *ImageList1;
    TPopupMenu *pmuVms;
    TMenuItem *MnuVmsId;
    TMenuItem *N3;
    TMenuItem *mnuVmsMsg;
    TMenuItem *mnuVmsCam;
    TMenuItem *N2;
    TMenuItem *mnuMoveVms;
    TMenuItem *NetworkPing2;
    TMenuItem *mnuVmsPingWeb;
    TMenuItem *mnuVmsPingCtrl;
    TPanel *PnlBottomLeft;
    TPanel *PnlBottomRight;
    TcxPageControl *PgVmsMonitoring;
    TcxTabSheet *TabVmsString;
    TcxTabSheet *TabVmsFigure;
    TcxPageControl *PgVmsState;
    TcxTabSheet *TabVmsState;
    TcxPageControl *PgVmsIfscTraf;
    TcxTabSheet *TabVmsIfscTraf;
    TImageList *ImageList2;
    TcxCheckBox *ChkWidth;
    TFRAMEVmsState *FRAMEVmsState1;
    TcxPageControl *cxPageControl1;
    TcxTabSheet *cxTabSheet1;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Column01;
    TcxGridColumn *Column02;
    TcxGridColumn *Column03;
    TcxGridColumn *Column04;
    TcxGridColumn *Column05;
    TcxGridColumn *Column06;
    TcxGridColumn *Column07;
    TcxGridColumn *Column08;
    TcxGridColumn *Column09;
    TcxGridColumn *Column10;
    TcxGridColumn *Column11;
    TcxGridColumn *Column12;
    TcxGridColumn *Column99;
    TcxGridLevel *GlList;
    TcxGrid *CxIfsc;
    TcxGridTableView *TvIfsc;
    TcxGridColumn *cxGridColumn1;
    TcxGridColumn *cxGridColumn2;
    TcxGridColumn *cxGridColumn3;
    TcxGridColumn *cxGridColumn4;
    TcxGridColumn *cxGridColumn5;
    TcxGridColumn *cxGridColumn6;
    TcxGridColumn *cxGridColumn7;
    TcxGridColumn *cxGridColumn8;
    TcxGridColumn *cxGridColumn9;
    TcxGridColumn *cxGridColumn10;
    TcxGridColumn *cxGridColumn11;
    TcxGridColumn *cxGridColumn12;
    TcxGridColumn *cxGridColumn13;
    TcxGridLevel *GlIfsc;
    TcxTabSheet *TabVmsStateList;
    TFRAMEFacilityStatusList *FRAMEFacilityStatusList1;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall ScrollBoxMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
          TPoint &MousePos, bool &Handled);
    void __fastcall ChkWidthClick(TObject *Sender);
    void __fastcall FormActivate(TObject *Sender);
    void __fastcall FormDeactivate(TObject *Sender);
    void __fastcall PgVmsMonitoringPageChanging(TObject *Sender, TcxTabSheet *NewPage,
          bool &AllowChange);
    void __fastcall TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall cxGridColumn6CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
          TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
    void __fastcall FRAMEFacilityStatusList1TvListCellDblClick(TcxCustomGridTableView *Sender,
          TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall TvIfscCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift,
          bool &AHandled);

private:	// User declarations
    void __fastcall CommClose();

public:
    TVmsCtlr   *FSelVmsObj;
    TVMSFORM0  *FSelForm;
	TList      *FListForm;
    bool        FReady;
    int         FMonitoringType;

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

    void __fastcall LoadLocalSkin();

    void __fastcall ClearFormList();
    void __fastcall CreateVmsMsgForm(int AWidth);
    void __fastcall LoadVmsIfscInfo(String AVmsNmbr);
    void __fastcall LoadIfscInfo();

    void __fastcall MoveGisFacility(String AType, String AId);

    void __fastcall ActivateForm(bool AActivate);

    void __fastcall OnVmsSelectMessage(TMessage &Msg);
    void __fastcall OnVmsSelectDblClickMessage(TMessage &Msg);
    void __fastcall OnMainFormMessage(TMessage &Msg);
    void __fastcall OnVmsStateRefreshMessage(TMessage &Msg);
    void __fastcall OnVmsFormRefreshMessage(TMessage &Msg);
    void __fastcall OnVmsIncidentRefreshMessage(TMessage &Msg);
	BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_VMS_SELECT, TMessage, OnVmsSelectMessage)
        MESSAGE_HANDLER(WM_VMS_SELECT_DBLCLICK, TMessage, OnVmsSelectDblClickMessage)
        MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
        MESSAGE_HANDLER(WM_VMS_STATE_REFRESH, TMessage, OnVmsStateRefreshMessage)
        MESSAGE_HANDLER(WM_VMS_FORM_REFRESH, TMessage, OnVmsFormRefreshMessage)
        MESSAGE_HANDLER(WM_VMS_INCIDENT_REFRESH, TMessage, OnVmsIncidentRefreshMessage)
    END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern PACKAGE TVMS0000M *VMS0000M;
//---------------------------------------------------------------------------

#endif

