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

#ifndef AVIM020MFH
#define AVIM020MFH
//---------------------------------------------------------------------------
#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 "cxButtons.hpp"
#include "cxCalendar.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 "cxPC.hpp"
#include "cxPCdxBarPopupMenu.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 "dxSkinscxPCPainter.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
#include "cxRadioGroup.hpp"
#include "cxClasses.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDBData.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridDBTableView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxStyles.hpp"
#include "FRAME_GisMapF.h"
#include "cxCheckBox.hpp"
#include "cxCalc.hpp"
#include "FRAME_AviListF.h"
#include "FRAME_AviSectListF.h"

class TAVIM020M : 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 *cxGroupBox5;
    TcxSplitter *cxSplitter2;
    TPanel *PnlInfo;
    TcxGroupBox *GrpInfo;
    TImage *ImgDesc01;
    TImage *ImgDesc03;
    TImage *ImgDesc04;
    TImage *ImgDesc05;
    TImage *ImgDesc07;
    TImage *ImgDesc12;
    TImage *ImgDesc08;
    TImage *ImgDesc09;
    TImage *ImgDesc10;
    TImage *ImgDesc13;
    TImage *ImgDesc14;
    TImage *ImgDesc11;
    TcxLabel *cxLabel1;
    TcxLabel *cxLabel3;
    TcxLabel *cxLabel4;
    TcxLabel *cxLabel5;
    TcxSpinEdit *SeAVI_SECT_DSTC;
    TcxLabel *cxLabel7;
    TcxLabel *cxLabel8;
    TcxLabel *cxLabel9;
    TcxComboBox *CbAVI_CTLR_MNGM_NMBR;
    TcxTextEdit *EdAVI_SECT_NMBR;
    TcxLabel *cxLabel2;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel13;
    TcxSpinEdit *SeSPOT_NUM;
    TcxSpinEdit *SeSTND_DRFT_VAL;
    TcxLabel *cxLabel14;
    TcxSpinEdit *SeSMTH_FCTR;
    TcxLabel *cxLabel15;
    TcxLabel *cxLabel16;
    TcxTextEdit *EdId;
    TPanel *PnlMap;
    TcxGroupBox *GrpLink;
    TcxGrid *CxLink;
    TcxGridTableView *TvLink;
    TcxGridColumn *ColLink1;
    TcxGridColumn *ColLink2;
    TcxGridColumn *ColLink3;
    TcxGridColumn *ColLink4;
    TcxGridColumn *ColLink5;
    TcxGridColumn *ColLink6;
    TcxGridLevel *GlLink;
    TPanel *PnlLinkEdit;
    TImage *ImgDesc06;
    TcxLabel *cxLabel6;
    TcxTextEdit *EdLinkId;
    TcxButton *BtnLinkAdd;
    TcxButton *BtnLinkDel;
    TcxGroupBox *GrpGis;
    TFRAMEGisMap *FRAMEGisMap1;
    TcxCheckBox *ChkGisZoom;
    TcxLabel *cxLabel17;
    TFRAMEAviList *FRAMEAviList1;
    TFRAMEAviSectList *FRAMEAviSectList1;
    TcxTextEdit *EdAVI_SECT_NM;
    TcxLabel *cxLabel18;
    TcxSpinEdit *SeSHRT_PASS_HH;
    TcxSpinEdit *SeLNST_PASS_HH;
    TcxTextEdit *EdSTRT_SPOT_NM;
    TcxTextEdit *EdEND_SPOT_NM;
    TcxSpinEdit *SeMIN_SPED;
    TcxSpinEdit *SeMAX_SPED;
    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 FRAMEGisMap1xclntMapMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
    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 FRAMEAviSectList1TvListCellDblClickSect(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall FRAMEAviList1TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift, bool &AHandled);
    void __fastcall ChkGisZoomClick(TObject *Sender);


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

public:

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

    void __fastcall FormInit();
    void __fastcall UpdateAviIcon();
    void __fastcall UpdateList();

    void __fastcall DisplayInfo(TItsAviSect* AObj);
    void __fastcall DisplayParam(TItsAviSect* AObj);
    void __fastcall DisplayCndt(TItsAviSect* AObj);
    void __fastcall DisplayLink(TItsAviSect* AObj);
    void __fastcall RefreshLink();

    void __fastcall ChangeEditMode(int AEdit);
};
//---------------------------------------------------------------------------
extern PACKAGE TAVIM020M *AVIM020M;
//---------------------------------------------------------------------------

#endif

