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

#ifndef FrmControllerInfoFH
#define FrmControllerInfoFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <ComCtrls.hpp>
#include <ImgList.hpp>
//---------------------------------------------------------------------------
#include "ITSLogF.h"
#include "AppGlobalF.h"
#include "cxCalc.hpp"
#include "cxClasses.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 "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxStyles.hpp"
#include "dxGDIPlusClasses.hpp"
#include <Menus.hpp>
#include "cxSpinEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
//---------------------------------------------------------------------------
class TFrmControllerInfo : public TForm
{
__published:	// IDE-managed Components
    TPanel *plServerInfo;
    TPanel *Panel1;
    TPanel *Panel2;
    TPanel *plErr;
    TPanel *Panel6;
    TPanel *plTot;
    TPanel *plNor;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Col00;
    TcxGridColumn *Col01;
    TcxGridColumn *Col02;
    TcxGridColumn *Col03;
    TcxGridColumn *Col04;
    TcxGridColumn *Col05;
    TcxGridColumn *Col06;
    TcxGridColumn *Col07;
    TcxGridColumn *Col08;
    TcxGridColumn *Col09;
    TcxGridColumn *Col10;
    TcxGridColumn *Col11;
    TcxGridColumn *Col12;
    TcxGridColumn *Col13;
    TcxGridColumn *Col14;
    TcxGridColumn *Col15;
    TcxGridColumn *Col99;
    TcxGridLevel *GlList;
    TPanel *Panel3;
    TImage *ImgState0;
    TImage *ImgState1;
    TImage *ImgState3;
    TImage *Image4;
    TPopupMenu *pmuController;
    TMenuItem *mnuControllerId;
    TMenuItem *N3;
    TMenuItem *mnuDlndScenario;
    TMenuItem *mnuReqParam;
    TMenuItem *LED1;
    TMenuItem *N4;
    TMenuItem *mnuDisconnect;
    TMenuItem *ON1;
    TMenuItem *OFF1;
    TMenuItem *FAN1;
    TMenuItem *ON2;
    TMenuItem *OFF2;
    TMenuItem *mnuSetBrgh;
    TMenuItem *mnuSetConfig;
    TMenuItem *mnuSetTime;
    TMenuItem *mnuReset;
    TMenuItem *N2;
    TMenuItem *N1;
    TMenuItem *mnuRefresh;
    TMenuItem *N5;
    TMenuItem *N6;
    TMenuItem *mnuReset1;
    TMenuItem *mnuStatus;
    void __fastcall Col01CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
          TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
    void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift,
          bool &AHandled);
    void __fastcall TvListCellClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
          TMouseButton AButton, TShiftState AShift,
          bool &AHandled);
    void __fastcall pmuControllerPopup(TObject *Sender);
    void __fastcall mnuDlndScenarioClick(TObject *Sender);
    void __fastcall mnuReqParamClick(TObject *Sender);
    void __fastcall LEDOnOffClick(TObject *Sender);
    void __fastcall FANOnOffClick(TObject *Sender);
    void __fastcall mnuSetBrghClick(TObject *Sender);
    void __fastcall mnuSetConfigClick(TObject *Sender);
    void __fastcall mnuSetTimeClick(TObject *Sender);
    void __fastcall mnuDisconnectClick(TObject *Sender);
    void __fastcall mnuResetClick(TObject *Sender);
    void __fastcall mnuRefreshClick(TObject *Sender);
    void __fastcall Panel6DblClick(TObject *Sender);
    void __fastcall Panel2DblClick(TObject *Sender);
    void __fastcall mnuReset1Click(TObject *Sender);
    void __fastcall mnuStatusClick(TObject *Sender);

private:	// User declarations
    int    FControllerCnt;
    String FSelControllerNo;
    String FSelControllerNm;

public:
    void __fastcall UpdateCtlrList();

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

    void __fastcall UpdateServerState(int AObj);
    void __fastcall UpdateClientState(int AObj);
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmControllerInfo *FrmControllerInfo;
//---------------------------------------------------------------------------
#endif
