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

#ifndef FrmCameraScreenManagerFH
#define FrmCameraScreenManagerFH
//---------------------------------------------------------------------------
#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 "FRAME_ObjListF.h"
#include "cxButtons.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 "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinMcSkin.hpp"

//---------------------------------------------------------------------------
class TFrmCameraScreenManager : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TPanel *PanelBack;
    TPanel *PnlLeft;
    TcxGroupBox *GrpList;
    TPanel *Panel1;
    TPanel *Panel3;
    TcxGroupBox *cxGroupBox1;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Col01;
    TcxGridColumn *Col02;
    TcxGridColumn *Col03;
    TcxGridColumn *Col04;
    TcxGridColumn *Col05;
    TcxGridColumn *Col06;
    TcxGridLevel *GlList;
    TPanel *PnlMenu;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnSave;
    TPanel *PnlCmd;
    TcxButton *BtnSearch;
    TcxGridColumn *Col07;
    TcxGridColumn *Col08;
    TcxGridColumn *Col09;
    TcxGridColumn *Col10;
    TcxGridColumn *Col12;
    TcxGridColumn *Col13;
    TPanel *Panel2;
    TPanel *Panel4;
    TcxGrid *CxCtlr;
    TcxGridTableView *TvCtlr;
    TcxGridColumn *ColCtlr1;
    TcxGridColumn *ColCtlr2;
    TcxGridColumn *ColCtlr3;
    TcxGridColumn *ColLink4;
    TcxGridColumn *ColLink5;
    TcxGridColumn *ColLink6;
    TcxGridLevel *GlCtlr;
    TcxTextEdit *EdOrgName;
    TPanel *Panel5;
    TImage *ImgDesc19;
    TcxLabel *cxLabel2;
    TcxTextEdit *EdName;
    TcxButton *BtnListAdd;
    TcxButton *BtnListDelete;
    TcxButton *BtnUp;
    TcxButton *BtnDown;
    TFRAMEObjList *FRAMEObjList1;
    TcxButton *BtnSearch2;
    TMemo *reMsg;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall BtnEditClick(TObject *Sender);
    void __fastcall BtnSaveClick(TObject *Sender);
    void __fastcall BtnInsertClick(TObject *Sender);
    void __fastcall BtnDeleteClick(TObject *Sender);
    void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift,
          bool &AHandled);
    void __fastcall TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnListAddClick(TObject *Sender);
    void __fastcall BtnListDeleteClick(TObject *Sender);
    void __fastcall BtnUpClick(TObject *Sender);
    void __fastcall BtnDownClick(TObject *Sender);
    void __fastcall BtnSearch2Click(TObject *Sender);
    void __fastcall reMsgDblClick(TObject *Sender);



private:	// User declarations
    void __fastcall CommClose();
    String          FTitle;
    bool            FNewDb;
    bool            EditMode;
public:
    bool            FUpdate;

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

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

    void __fastcall LoadMonitoring();

    void __fastcall DisplayInfo();

    void __fastcall ChangeEditMode(int AEdit);

    void __fastcall FormClear();

    void __fastcall DisplayFormInfo(int AIdx);

    bool __fastcall DelMonitoring(String AFormName, String ANewFormName);

    int __fastcall CheckDupFormName(String ANewName, String AOldName);
    bool __fastcall FindCtlrInfo(String ACtlrNmbr);
    void __fastcall UpdateCtlrSeq();
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmCameraScreenManager *FrmCameraScreenManager;
//---------------------------------------------------------------------------

#endif

