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

#ifndef FrmCommLogFH
#define FrmCommLogFH
//---------------------------------------------------------------------------
#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 "ITSLogF.h"
#include "CDSCtlrF.h"
#include "VMSCommLibF.h"
//---------------------------------------------------------------------------
class TFrmCommLog : public TForm
{
__published:	// IDE-managed Components
    TPanel *plServerInfo;
    TPanel *Panel1;
    TPanel *Panel2;
    TCheckBox *chkLogPause;
    TButton *btnClear;
    TButton *btnCopy;
    TMemo *reMsg;
    TPanel *Panel4;
    TPanel *Panel6;
    TImage *Image2;
    TCheckBox *chkInfo;
    TCheckBox *chkData;
    TCheckBox *chkDetail;
    TCheckBox *chkError;
    TCheckBox *chkWarning;
    TCheckBox *chkDebug;
    TButton *btnSetLog;
    TCheckBox *chkServer;
    TCheckBox *chkClient;
    void __fastcall btnClearClick(TObject *Sender);
    void __fastcall btnCopyClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall btnSetLogClick(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);

private:	// User declarations
    TCDSCtlr    *FObjCtlr;
    int          FObjCtlrIdx;
    AnsiString   FObjCtlrId;
    LOG_INFO     FLogCfg;

public:

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

    void DisplayMsg(String& AMsg);
    void __fastcall ResetDisplayLog(int AControllerIdx=-1);

    void LogWrite(IPC_LOG_MESSAGE *ALog);
    void LogData(IPC_LOG_MESSAGE *ALog);
	void __fastcall OnWMLogDisplayMessage(TMessage &Msg);

	BEGIN_MESSAGE_MAP
		MESSAGE_HANDLER(WM_LOG_DISPLAY, TMessage, OnWMLogDisplayMessage)
	END_MESSAGE_MAP(TForm)

public:
    __property TCDSCtlr* CDSCtlr = { read = FObjCtlr };
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmCommLog *FrmCommLog;
//---------------------------------------------------------------------------
#endif
