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

#ifndef VMSM200MFH
#define VMSM200MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <FMTBcd.hpp>
#include <Provider.hpp>
#include <SqlExpr.hpp>
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <ComCtrls.hpp>
#include <ADODB.hpp>
#include <Dialogs.hpp>
#include <ExtDlgs.hpp>
//---------------------------------------------------------------------------
#include "cxButtons.hpp"
#include "cxCheckBox.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxSpinEdit.hpp"
#include "cxSplitter.hpp"
#include "cxTextEdit.hpp"
#include "cxTimeEdit.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 "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 "dxSkinscxPCPainter.hpp"
#include "FRAME_VmsIfscListF.h"
#include "FRAME_OpenMapF.h"
#include "CDSVmsIfscF.h"
#include "cxCalc.hpp"

class TVMSM200M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TPanel *PnlBack;
    TPanel *PnlLeft;
    TcxSplitter *cxSplitter1;
    TcxGroupBox *cxGroupBox3;
    TcxGroupBox *GrpMap;
    TPanel *PnlMap;
    TFRAMEVmsIfscList *FRAMEVmsIfscList1;
    TcxSplitter *cxSplitter2;
    TPanel *PnlGrp;
    TPanel *PnlMenu;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnSave;
    TcxGroupBox *cxGroupBox2;
    TcxGroupBox *GrpInfo;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel12;
    TPanel *PnlEdit;
    TImage *ImgDesc19;
    TImage *ImgDesc02;
    TImage *ImgDesc04;
    TImage *ImgDesc12;
    TImage *ImgDesc11;
    TcxTextEdit *EdIfscNm;
    TcxTextEdit *EdStrNm;
    TcxTextEdit *EdIfscId;
    TcxLabel *cxLabel2;
    TcxLabel *cxLabel5;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel13;
    TcxLabel *cxLabel14;
    TcxComboBox *CbDetr;
    TcxTextEdit *EdEndNm;
    TcxGroupBox *GrpLink;
    TcxLabel *cxLabel9;
    TcxLabel *cxLabel15;
    TPanel *Panel1;
    TPanel *PnlLink;
    TImage *ImgDesc06;
    TcxLabel *cxLabel6;
    TcxTextEdit *EdLinkId;
    TcxButton *BtnLinkCopy;
    TcxGrid *CxLink;
    TcxGridTableView *TvLink;
    TcxGridColumn *ColLink1;
    TcxGridColumn *ColLink2;
    TcxGridColumn *ColLink3;
    TcxGridColumn *ColLink4;
    TcxGridColumn *ColLink5;
    TcxGridColumn *ColLink6;
    TcxGridLevel *GlLink;
    TcxButton *BtnSaveAll;
    TcxButton *BtnUp;
    TcxButton *BtnDown;
    TcxButton *BtnLinkDel;
    TcxCheckBox *ChkViewIcon;
    TPanel *Panel2;
    TcxButton *BtnVmsIfscSet;
    TcxCheckBox *ChkAxisYn;
    TImage *ImgDesc07;
    TcxLabel *cxLabel1;
    TcxTextEdit *EdRoadNm;
    TImage *ImgDesc08;
    TcxLabel *cxLabel3;
    TcxTextEdit *EdSpotNm;
    TcxLabel *lblNone;
    TcxLabel *lblSpdErr;
    TcxLabel *lblText1;
    TcxLabel *lblText2;
    TcxLabel *lblText3;
    TcxLabel *lblText6;
    TcxLabel *lblText5;
    TcxLabel *lblText4;
    TcxLabel *lblText9;
    TcxLabel *lblText8;
    TcxLabel *lblText7;
    TcxLabel *lblText10;
    TcxLabel *lblText11;
    TcxLabel *lblText12;
    TcxLabel *lblText13;
    TFRAMEOpenMap *FRAMEOpenMap1;
    TcxGridColumn *ColSeq;
    TPanel *Panel3;
    TLabel *Label17;
    TLabel *Label18;
    TLabel *Label19;
    TPanel *Panel4;
    TPanel *Panel5;
    TPanel *Panel6;
    TLabel *Label03;
    TcxTextEdit *EdMin1;
    TcxTextEdit *EdMax1;
    TLabel *Label01;
    TcxTextEdit *EdMin3;
    TcxTextEdit *EdMax3;
    TLabel *Label02;
    TcxTextEdit *EdMin2;
    TcxTextEdit *EdMax2;
    TPanel *Panel7;
    TLabel *Label1;
    TcxTextEdit *EdCngsSpd;
    TcxButton *BtnSaveCngsSpd;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
    void __fastcall BtnEditClick(TObject *Sender);
    void __fastcall BtnInsertClick(TObject *Sender);
    void __fastcall BtnDeleteClick(TObject *Sender);
    void __fastcall BtnSaveClick(TObject *Sender);
    void __fastcall BtnLinkCopyClick(TObject *Sender);
    void __fastcall TvLinkCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall FRAMEVmsIfscList1TvListCellDblClick(TcxCustomGridTableView *Sender,
          TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall EdMin3KeyPress(TObject *Sender, wchar_t &Key);
    void __fastcall BtnLinkDelClick(TObject *Sender);
    void __fastcall BtnSaveAllClick(TObject *Sender);
    void __fastcall BtnUpClick(TObject *Sender);
    void __fastcall BtnDownClick(TObject *Sender);
    void __fastcall ChkViewIconClick(TObject *Sender);
    void __fastcall BtnVmsIfscSetClick(TObject *Sender);
    void __fastcall ColSeqCustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
    void __fastcall BtnSaveCngsSpdClick(TObject *Sender);


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

    TcxDataController  *m_pGDC;
    String              FTitle;
    bool                FUpdate;
    bool                FNewDb;
    bool                EditMode;

public:
    String sJs;
    int    FLayerIdx;

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

    void __fastcall UpdateSkin();
    void __fastcall FormInit();
    void __fastcall UpdateList();
    void __fastcall UpdateIcon();
    void __fastcall UpdateEditLink();

    void __fastcall FillDetrList(int ADetrId);
    void __fastcall DisplayInfo(TVmsIfsc* AObj);
    void __fastcall DisplayLink(TVmsIfsc* AObj);
    void __fastcall RefreshLink();

    void __fastcall ChangeEditMode(int AEdit);

    bool __fastcall CheckDeleteIfsc(String AIfscId);
    bool __fastcall CheckSpeedValue();

    void __fastcall AddRemoveLink(String ALinkId);

    void __fastcall OpenMapCallback(TObject *ASender, const String AFunc, const String AArgs, const bool AFirst);
};
//---------------------------------------------------------------------------
extern PACKAGE TVMSM200M *VMSM200M;
//---------------------------------------------------------------------------

#endif

