#ifndef OverbyteIcsSysLogClientDemo1H
#define OverbyteIcsSysLogClientDemo1H

#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>

#include "OverbyteIcsSysLogClient.hpp"
#include "OverbyteIcsSysLogDefs.hpp"
#include "OverbyteIcsIniFiles.hpp"
#include "OverbyteIcsTypes.hpp"
#include "OverbyteIcsWSocket.hpp"

#include <memory>

class TSysLogClientForm : public TForm
{
__published:
    TPanel *ToolPanel;
    TMemo *DisplayMemo;
    TLabel *Label1;
    TLabel *Label2;
    TLabel *Label3;
    TLabel *Label4;
    TLabel *Label5;
    TLabel *Label6;
    TLabel *Label7;
    TLabel *Label8;
    TLabel *Label9;
    TLabel *Label10;
    TLabel *Label11;
    TLabel *Label12;
    TLabel *Label13;
    TLabel *Label14;
    TLabel *Label15;
    TEdit *TextEdit;
    TComboBox *FacilityComboBox;
    TComboBox *SeverityComboBox;
    TEdit *ProcessNameEdit;
    TEdit *ProcessIDEdit;
    TEdit *ServerEdit;
    TCheckBox *ProcessMySelfCheckBox;
    TButton *SendButton;
    TEdit *HostnameEdit;
    TShape *Shape1;
    TShape *Shape2;
    TShape *Shape3;
    TShape *Shape4;
    TShape *Shape5;
    TShape *Shape6;
    TShape *Shape7;
    TShape *Shape8;
    TCheckBox *DefaultPRICheckBox;
    TCheckBox *NowCheckBox;
    TEdit *MonthEdit;
    TEdit *DayEdit;
    TEdit *HourEdit;
    TEdit *MinEdit;
    TEdit *SecEdit;
    TEdit *YearEdit;
    TEdit *MsgIDEdit;
    TEdit *StructDataEdit;
    TPanel *RFCPanel;
    TRadioButton *RFC3164RadioButton;
    TRadioButton *RFC5424RadioButton;
    TButton *SetDefaultButton;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall ProcessMySelfCheckBoxClick(TObject *Sender);
    void __fastcall DefaultPRICheckBoxClick(TObject *Sender);
    void __fastcall SendButtonClick(TObject *Sender);
    void __fastcall NowCheckBoxClick(TObject *Sender);
    void __fastcall RFC5424RadioButtonClick(TObject *Sender);
    void __fastcall RFC3164RadioButtonClick(TObject *Sender);
    void __fastcall SetDefaultButtonClick(TObject *Sender);

private:
    String FIniFileName;
    bool FInitialized = false;
    std::unique_ptr<TSysLogClient> FSysLogClient;

    void Display(const String &Msg);
    void UpdateControlStates();

public:
    __fastcall TSysLogClientForm(TComponent *Owner);
    __property String IniFileName = {read = FIniFileName, write = FIniFileName};
};

extern PACKAGE TSysLogClientForm *SysLogClientForm;

#endif
