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

#ifndef CRSM100MFH
#define CRSM100MFH
//---------------------------------------------------------------------------
#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 "CDSCrossF.h"
#include "cxButtons.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxGroupBox.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxSpinEdit.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "FRAME_OpenMapF.h"
#include "FRAME_CrsListF.h"
#include "dxSkinBlack.hpp"
#include "dxSkinMcSkin.hpp"
//---------------------------------------------------------------------------

class TCRSM100M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TPanel *PnlBack;
    TPanel *PnlBottom;
    TcxGroupBox *GrpInfo;
    TPanel *PnlMenu;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnSave;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel12;
    TPanel *PnlEdit;
    TImage *ImgDesc02;
    TImage *ImgDesc03;
    TImage *ImgDesc04;
    TImage *ImgDesc11;
    TcxTextEdit *EdNm;
    TcxSpinEdit *SePosX;
    TcxSpinEdit *SePosY;
    TcxLabel *cxLabel2;
    TcxLabel *cxLabel6;
    TcxLabel *cxLabel18;
    TcxLabel *cxLabel8;
    TcxSplitter *cxSplitter2;
    TcxGroupBox *GrpMap;
    TcxLabel *lblText1;
    TcxLabel *lblText2;
    TcxLabel *lblText3;
    TcxLabel *lblText4;
    TcxLabel *lblText5;
    TFRAMEOpenMap *FRAMEOpenMap1;
    TcxLabel *cxLabel14;
    TcxSpinEdit *Se_STTS_CLCT_CYCL;
    TcxLabel *cxLabel7;
    TcxLabel *cxLabel10;
    TPanel *Panel1;
    TcxLabel *lblText6;
    TcxLabel *lblText7;
    TcxLabel *lblText8;
    TcxLabel *lblText9;
    TImage *ImgDesc01;
    TcxLabel *cxLabel1;
    TcxComboBox *CbType;
    TcxButton *BtnListDelete;
    TcxButton *BtnListAdd;
    TcxSpinEdit *Se_TRAF_CLCT_CYCL;
    TcxLabel *cxLabel13;
    TImage *ImgDesc18;
    TcxLabel *cxLabel4;
    TImage *ImgDesc15;
    TImage *ImgDesc25;
    TcxLabel *cxLabel16;
    TcxTextEdit *ISTL_LCTN_ADDR;
    TcxTextEdit *Ed_ISTL_LCTN_NM;
    TcxLabel *cxLabel15;
    TImage *ImgDesc16;
    TcxComboBox *Cb_CMRA_DRCT_CD;
    TcxSpinEdit *SeBordNum;
    TcxLabel *cxLabel9;
    TImage *ImgDesc14;
    TcxSpinEdit *Se_LOCAL_NO;
    TcxSpinEdit *Se_GROUP_NO;
    TcxLabel *cxLabel5;
    TImage *ImgDesc07;
    TImage *ImgDesc06;
    TcxLabel *cxLabel3;
    TcxMaskEdit *EdCtlrIp;
    TcxTextEdit *EdCmncPort;
    TcxTextEdit *EdType;
    TcxTextEdit *EdId;
    TcxTextEdit *EdNmbr;
    TcxGroupBox *cxGroupBox3;
    TFRAMECrsList *FRAMECrsList1;
    TcxSplitter *cxSplitter1;
    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 FRAMECrsList1TvListCellDblClick(TcxCustomGridTableView *Sender,
          TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall Ed_VDS_PORTKeyPress(TObject *Sender, wchar_t &Key);
    void __fastcall Se_VDS_CHNLPropertiesChange(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 TCRSM100M(TComponent* Owner);

    void __fastcall FormInit();
    void __fastcall UpdateIcon();
    void __fastcall DisplayInfo(TCross* AObj, bool AMoveObj=true);

    void __fastcall ChangeEditMode(int AEdit);

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

#endif

