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

#ifndef DSRM040MFH
#define DSRM040MFH
//---------------------------------------------------------------------------
#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 "CDSDsrcOfferSectF.h"
#include "FRAME_DsrcListF.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 "cxMaskEdit.hpp"
#include "cxSpinEdit.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"

class TDSRM040M : 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;
    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;
    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;
    TcxSpinEdit *SeCNGSSPD;
    TcxSpinEdit *SeDELYSPD;
    TcxLabel *cxLabel7;
    TImage *ImgDesc07;
    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 *cxLabel9;
    TImage *Image1;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel13;
    TcxCheckBox *ChkGisZoom;
    TFRAMEFlashMap *FRAMEGisMap1;
    TcxCheckBox *ChkViewIcon;
    TcxCheckBox *ChkViewName;
    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 TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    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 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;

    TItsDsrcOfferSectManager *MyItsDsrcOfferSectManager;

public:

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

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

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

    void __fastcall ChangeEditMode(int AEdit);

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

#endif

