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

#ifndef VMSM630MFH
#define VMSM630MFH
//---------------------------------------------------------------------------
#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 "VmsDesignerF.h"
#include "CDSVmsObjTypeF.h"
#include "FFBaseComponent.hpp"
#include "FFBasePlay.hpp"
#include "FFPlay.hpp"
#include "cxButtons.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 "cxImage.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.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 "cxBlobEdit.hpp"
//---------------------------------------------------------------------------

class TVMSM630M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TPanel *PanelBack;
    TcxButton *BtnSearch;
    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;
    TcxButton *BtnClose;
    TcxButton *BtnSave;
    TcxButton *BtnClosex;
    TImage *ImgForm;
    TFFPlayer *FFPlayer1;
    TPanel *Panel1;
    TLabel *lblCurrentPTS1;
    TLabel *lblDuration1;
    TTrackBar *TrackBar1;
    TcxButton *BtnPlay;
    TcxButton *BtnStop;
    TcxButton *BtnPause;
    TcxCheckBox *ChkFullScreen;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Col00;
    TcxGridColumn *Col03;
    TcxGridColumn *Col01;
    TcxGridColumn *Col02;
    TcxGridColumn *Col04;
    TcxGridLevel *GlList;
    VmsDesigner *VmsDesigner1;
    TImage *ImgDesc20;
    TLabel *Label10;
    TcxTextEdit *EdSymbLibNmbr;
    TImage *ImgDesc21;
    TLabel *Label13;
    TcxTextEdit *EdStreamAddr;
    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 BtnSaveClick(TObject *Sender);
    void __fastcall TrackBar1Change(TObject *Sender);
    void __fastcall FFPlayer1FileOpen(TObject *Sender, const __int64 ADuration, int AFrameWidth, int AFrameHeight, int &AScreenWidth,
          int &AScreenHeight);
    void __fastcall FFPlayer1OpenFailed(TObject *Sender);
    void __fastcall FFPlayer1Position(TObject *Sender, const __int64 APTS);
    void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
    void __fastcall BtnPlayClick(TObject *Sender);
    void __fastcall BtnStopClick(TObject *Sender);
    void __fastcall BtnPauseClick(TObject *Sender);
    void __fastcall TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord, TcxCustomGridRecord *AFocusedRecord,
          bool ANewItemRecordFocusingChanged);

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

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

    int             FSelIdx;

    __int64     FDuration;
    bool        FTrackChanging;
    TTrackBar  *FTrackBar;
    TLabel     *FLblDuration;
    TLabel     *FLblCurrPTS;

    TFFPlayer  *FFPlayer;
    TPanel     *FDispArea;
    String      FPlayerFile;

	TList      *FListSymb;

public:
    TVmsFormDesigner *m_pEdtDesigner;

    String FVmsTypeCd;
    int    FVmsWidth;
    int    FVmsHeight;

    String FVmsNmbr;
    String FFormId;
    int    FFormType;
    String FFormColor;
    String FSymbLibNmbr;
    String FStreamAddr;
    bool   FSelected;

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

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

    void __fastcall ClearSymbloList();
    void __fastcall LoadStreamInfo();

    void __fastcall FormClear();

    void __fastcall InitObjectList();
    void __fastcall LoadFormObjectInfo(String AFormId, TVmsFormDesigner *ADesigner);
    void __fastcall DispObjectListData();
};
//---------------------------------------------------------------------------
extern PACKAGE TVMSM630M *VMSM630M;
//---------------------------------------------------------------------------

#endif

