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

#ifndef DSRM030MFH
#define DSRM030MFH
//---------------------------------------------------------------------------
#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 "WindowMsgF.h"
#include "CDSCodeF.h"
#include "CDSDsrcF.h"
#include "CDSDsrcSectF.h"
#include "FRAME_DsrcListF.h"
#include "FRAME_DsrcSectListF.h"
#include "FRAME_FlashMapF.h"
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxCheckBox.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.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 "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"

class TDSRM030M : 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 *PnlMenu;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnSave;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel12;
    TcxGroupBox *cxGroupBox1;
    TcxTextEdit *EdRseSectId;
    TcxTextEdit *EdStartSpotId;
    TcxTextEdit *EdStartSpotNm;
    TcxTextEdit *EdRseSectName;
    TcxTextEdit *EdEndSpotId;
    TcxTextEdit *EdEndSpotNm;
    TcxTextEdit *EdRseSectLength;
    TImage *ImgDesc01;
    TcxLabel *cxLabel1;
    TImage *ImgDesc02;
    TcxLabel *cxLabel2;
    TImage *ImgDesc03;
    TcxLabel *cxLabel3;
    TImage *ImgDesc04;
    TcxLabel *cxLabel4;
    TImage *ImgDesc05;
    TcxLabel *cxLabel5;
    TcxLabel *cxLabel8;
    TcxGroupBox *cxGroupBox2;
    TcxGrid *CxLink;
    TcxGridTableView *TvLink;
    TcxGridColumn *ColLink1;
    TcxGridColumn *ColLink2;
    TcxGridColumn *ColLink3;
    TcxGridColumn *ColLink4;
    TcxGridLevel *GlLink;
    TcxGridColumn *ColLink5;
    TcxGridColumn *ColLink6;
    TcxGroupBox *cxGroupBox4;
    TPanel *PnlLinkEdit;
    TImage *ImgDesc06;
    TcxLabel *cxLabel6;
    TcxTextEdit *EdLinkId;
    TcxButton *BtnLinkAdd;
    TcxButton *BtnLinkDel;
    TcxGroupBox *cxGroupBox5;
    TcxSplitter *cxSplitter2;
    TFRAMEDsrcList *FRAMEDsrcList1;
    TcxCheckBox *cxCheckBox1;
    TcxCheckBox *cxCheckBox2;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel13;
    TFRAMEDsrcSectList *FRAMEDsrcSectList1;
    TcxGridColumn *ColLink7;
    TcxLabel *cxLabel14;
    TFRAMEFlashMap *FRAMEGisMap1;
    TcxCheckBox *ChkViewIcon;
    TcxCheckBox *ChkViewName;
    TcxCheckBox *ChkGisZoom;
    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 FRAMEDsrcList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall cxCheckBox1Click(TObject *Sender);
    void __fastcall cxCheckBox2Click(TObject *Sender);
    void __fastcall BtnLinkDelClick(TObject *Sender);
    void __fastcall BtnLinkAddClick(TObject *Sender);
    void __fastcall TvLinkCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall FRAMEDsrcSectList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall ChkGisZoomClick(TObject *Sender);
    void __fastcall ChkViewIconClick(TObject *Sender);


private:	// User declarations
    void __fastcall CommClose();
    TcxDataController *m_pGDC;
    String          FTitle;
    bool            FUpdate;
    bool            FNewDb;
    bool            MapStart;

    TItsDsrcSectManager *MyItsDsrcSectManager;

public:

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

    void __fastcall FormInit();
    void __fastcall UpdateRseIcon();
    void __fastcall UpdateList();

    void __fastcall DisplayInfo(TItsDsrcSect* AObj);
    void __fastcall DisplaySectLink(TItsDsrcSect* AObj);
    void __fastcall RefreshSectLink();

    void __fastcall ChangeEditMode(int AEdit);

    void __fastcall ShockwaveFlash1FlashCall1(TObject *ASender, const WideString request);
};
//---------------------------------------------------------------------------
extern PACKAGE TDSRM030M *DSRM030M;
//---------------------------------------------------------------------------

#endif

