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

#ifndef VMSM660MFH
#define VMSM660MFH
//---------------------------------------------------------------------------
#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 "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 "cxCheckBox.hpp"
#include "FRAME_VmsListF.h"
#include "cxImage.hpp"
#include "cxButtonEdit.hpp"
#include "cxBlobEdit.hpp"

//---------------------------------------------------------------------------
#include "VmsDesignerF.h"
#include "cxColorComboBox.hpp"
#include "CDSVmsObjTypeF.h"
#include "cxCalc.hpp"
//---------------------------------------------------------------------------

class TVMSM660M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TPanel *PanelBack;
    TcxButton *BtnSearch;
    VmsDesigner *VmsDesigner1;
    TcxMaskEdit *EdObjId;
    TcxTextEdit *EdFormId;
    TPanel *PnlMenu;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnSavex;
    TcxGroupBox *cxGroupBox1;
    TPanel *PnlCmd;
    TPanel *Panel2;
    TPanel *PnlEdtBack;
    TPanel *PnlEditForm;
    TcxGroupBox *GrpObj;
    TcxPageControl *PgObject;
    TcxTabSheet *TsObject;
    TcxGrid *CxObjList;
    TcxGridTableView *TvObjList;
    TcxGridColumn *ColObj01;
    TcxGridColumn *ColObj02;
    TcxGridColumn *ColObj03;
    TcxGridColumn *ColIfscId;
    TcxGridColumn *ColIfscNm;
    TcxGridColumn *ColIfscStr;
    TcxGridColumn *ColIfscEnd;
    TcxGridColumn *ColObj04;
    TcxGridColumn *TvObjListColumn9;
    TcxGridColumn *TvObjListColumn10;
    TcxGridColumn *TvObjListColumn11;
    TcxGridColumn *ColMem;
    TcxGridLevel *GlObjList;
    TcxButton *BtnListAdd;
    TcxButton *BtnListDelete;
    TcxPageControl *cxPageControl1;
    TcxTabSheet *cxTabSheet1;
    TcxGrid *CxAxis;
    TcxGridTableView *TvAxis;
    TcxGridColumn *Col00;
    TcxGridColumn *Col01;
    TcxGridColumn *Col02;
    TcxGridColumn *Col03;
    TcxGridColumn *Col04;
    TcxGridColumn *Col05;
    TcxGridLevel *GlAxis;
    TcxButton *BtnClose;
    TcxButton *BtnSave;
    TcxButton *BtnClosex;
    TImage *ImgForm;
    TcxGridColumn *ColObjType;
    TcxGridColumn *Col06;
    TcxGridColumn *Col07;
    TcxGridColumn *ColObj06;
    TcxGridColumn *ColObj07;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnClosexClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall TvObjListFocusedRecordChanged(TcxCustomGridTableView *Sender,
          TcxCustomGridRecord *APrevFocusedRecord, TcxCustomGridRecord *AFocusedRecord,
          bool ANewItemRecordFocusingChanged);
    void __fastcall BtnListAddClick(TObject *Sender);
    void __fastcall BtnListDeleteClick(TObject *Sender);
    void __fastcall BtnSaveClick(TObject *Sender);
    void __fastcall Col05CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);

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

    String          FTitle;
    bool            FUpdate;
    bool            FNewDb;
    bool            EditMode;

    int             FSelIdx;

public:
    TVmsFormDesigner *m_pEdtDesigner;

    String FVmsTypeCd;
    int    FVmsWidth;
    int    FVmsHeight;

    String FVmsNmbr;
    String FFormId;
    int    FFormType;
    String FFormColor;
    String FIfscId[8];
    bool   FSelected;

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

    void __fastcall FormInit();
    void __fastcall RefreshData();

    void __fastcall LoadVmsIfsc(String AVmsNmbr);

    void __fastcall FormClear();

    void __fastcall AddTrafficTypeObject(int ARow, String AIfscId);
    void __fastcall InitObjectList();
    void __fastcall LoadFormObjectInfo(String AFormId, TVmsFormDesigner *ADesigner);
    void __fastcall DispObjectListData();
};
//---------------------------------------------------------------------------
extern PACKAGE TVMSM660M *VMSM660M;
//---------------------------------------------------------------------------

#endif

