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

#ifndef VMS0201MFH
#define VMS0201MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <Provider.hpp>
//---------------------------------------------------------------------------
#include "CenterCommF.h"
#include "DataTypesF.h"
#include "WindowMsgF.h"
#include "CDSVmsCtlrF.h"
#include "VMSFORM0F.h"
//---------------------------------------------------------------------------
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Buttons.hpp>
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinsCore.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 "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 "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
#include "cxClasses.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxImage.hpp"
#include "cxLabel.hpp"
#include "cxStyles.hpp"
#include "dxSkinscxPCPainter.hpp"
//---------------------------------------------------------------------------

class TVMS0201M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TPanel *PnlClient;
    TScrollBox *ScrollBox;
    TcxGrid *CxVmsMsg;
    TcxGridTableView *TvVmsMsg;
    TcxGridColumn *ColSch01;
    TcxGridColumn *ColSchMsg;
    TcxGridColumn *ColSch02;
    TcxGridLevel *GlVmsMsg;
    TcxGridColumn *TvVmsMsgColumn1;
    TcxGridColumn *TvVmsMsgColumn2;
    TcxGridColumn *TvVmsMsgColumn3;
    TcxGridColumn *TvVmsMsgColumn4;
    TcxGridColumn *TvVmsMsgColumn5;
    TcxGridColumn *TvVmsMsgColumn6;
    TcxGridColumn *TvVmsMsgColumn7;
    TcxGridColumn *TvVmsMsgColumn8;
    TcxGridColumn *TvVmsMsgColumn9;
    TcxGridColumn *TvVmsMsgColumn10;
    TcxGridColumn *TvVmsMsgColumn11;
    TcxGridColumn *TvVmsMsgColumn12;
    TcxGridColumn *TvVmsMsgColumn13;
    TcxGridColumn *TvVmsMsgColumn14;
    TcxGridColumn *TvVmsMsgColumn15;
    TcxGridColumn *TvVmsMsgColumn16;
    TcxGridColumn *TvVmsMsgColumn17;
    TcxGridColumn *TvVmsMsgColumn18;
    TcxGridColumn *TvVmsMsgColumn19;
    TcxGridColumn *TvVmsMsgColumn20;
    TcxGridColumn *TvVmsMsgColumn21;
    TcxGridColumn *TvVmsMsgColumn22;
    TcxGridColumn *TvVmsMsgColumn23;
    TcxGridColumn *TvVmsMsgColumn24;
    TcxGridColumn *TvVmsMsgColumn25;
    TcxGridColumn *TvVmsMsgColumn26;
    TcxGridColumn *TvVmsMsgColumn27;
    TcxGridColumn *TvVmsMsgColumn28;
    TcxGridColumn *TvVmsMsgColumn29;
    TcxGridColumn *TvVmsMsgColumn30;
    TcxGridColumn *TvVmsMsgColumn31;
    TcxGridColumn *TvVmsMsgColumn32;
    TcxGridColumn *TvVmsMsgColumn33;
    TcxGridColumn *TvVmsMsgColumn34;
    TcxGridColumn *TvVmsMsgColumn35;
    TcxGridColumn *TvVmsMsgColumn36;
    TcxGridColumn *TvVmsMsgColumn37;
    TcxGridColumn *TvVmsMsgColumn38;
    TcxGridColumn *TvVmsMsgColumn39;
    TcxGridColumn *TvVmsMsgColumn40;
    TcxGridColumn *TvVmsMsgColumn41;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall ScrollBoxClick(TObject *Sender);
    void __fastcall ScrollBoxMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta, TPoint &MousePos, bool &Handled);
    void __fastcall FormResize(TObject *Sender);
    void __fastcall FpnlFormClick(TObject *Sender);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall ColSch01CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
          TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
          
private:	// User declarations
    int     FDisplayMode;
    bool    FPlay;

public:
	TList      *FListForm;
    HWND        FWndParent;
    String      FScreenName;
    int         FScreenIndex;
    int         FViewWidth;

    int  FMinWidth, FMinHeight;
    int  FMaxWidth, FMaxHeight;

public:		// User declarations
    __fastcall TVMS0201M(TComponent* AOwner, HWND AHandle, String ACaption, int AScreenIdx);

    void __fastcall ClearFormList();
    bool __fastcall AddVmsForm(String AVmsNmbr);
    void __fastcall RecalFormPosition();
    void __fastcall SetFormSize(int AWidth);

    void __fastcall  SetPlay(bool APlay);

    __property bool  Play = { read = FPlay, write = SetPlay };

    __property int   DisplayMode = { read = FDisplayMode, write = FDisplayMode };

    void __fastcall RefreshScenario();

    void __fastcall OnVmsSelectMessage(TMessage &Msg);
	BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_VMS_SELECT, TMessage, OnVmsSelectMessage)
    END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
//extern PACKAGE TVMS0201M *VMS0201M;
//---------------------------------------------------------------------------
#endif

