#ifndef OverbyteIcsTimeTst1H
#define OverbyteIcsTimeTst1H

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

#include "OverbyteIcsTypes.hpp"
#include "OverbyteIcsSntp.hpp"

class TTimeDemoForm : public TForm
{
__published:
    TMemo *DisplayMemo;
    TPanel *Panel1;
    TButton *doClose;
    TIcsTimeServer *IcsTimeServer1;
    TIcsTimeClient *IcsTimeClient1;
    TGroupBox *GroupBox1;
    TComboBox *ServerIP;
    TLabel *Label1;
    TGroupBox *GroupBox2;
    TComboBox *ClientTimeServer;
    TLabel *Label2;
    TButton *doServerStart;
    TButton *doServerStop;
    TRadioGroup *ClientProtocol;
    TButton *doClientStart;
    TCheckBox *ServerProtoSntp;
    TCheckBox *ServerProtoTCP;
    TCheckBox *ServerProtoUdp;
    TButton *doClientAbort;
    TButton *doCorrect;
    TLabel *LabelCorrection;
    TRadioGroup *SockFamily;
    TButton *doTestConv;
    void __fastcall doCloseClick(TObject *Sender);
    void __fastcall IcsTimeClient1Time(TObject *Sender, TDateTime DateTime);
    void __fastcall IcsTimeServer1QueryDone(TObject *Sender, Word Error);
    void __fastcall IcsTimeServer1Start(TObject *Sender);
    void __fastcall IcsTimeServer1Stop(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall doServerStartClick(TObject *Sender);
    void __fastcall IcsTimeServer1Query(TObject *Sender, const TSockAddrIn &SocketAddr,
                                        TTimeProtocol TimeProtocol, bool &Continue);
    void __fastcall doClientStartClick(TObject *Sender);
    void __fastcall doClientAbortClick(TObject *Sender);
    void __fastcall doServerStopClick(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall doCorrectClick(TObject *Sender);
    void __fastcall IcsTimeClient1TimeInfo(TObject *Sender, String Info);
    void __fastcall doTestConvClick(TObject *Sender);

public:
    __fastcall TTimeDemoForm(TComponent *Owner);
};

extern PACKAGE TTimeDemoForm *TimeDemoForm;

#endif
