#ifndef OverbyteIcsTelnetClient1H
#define OverbyteIcsTelnetClient1H

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

#include "OverbyteIcsTnEmulVT.hpp"
#include "OverbyteIcsTypes.hpp"
#include "OverbyteIcsEmulVT.hpp"

class TTelnetForm : public TForm
{
__published:
    TTnEmulVT *TnEmulVT1;
    TButton *ConnectButton;
    TLabel *Label1;
    TEdit *HostNameEdit;
    TLabel *Label2;
    TEdit *PortEdit;
    TButton *DisconnectButton;
    TLabel *StatusLabel;
    TButton *SendButton;
    TButton *OptionsButton;
    TCheckBox *LocalEchoCheckBox;
    TButton *RequestLocalEchoOnButton;
    TButton *RequestLocalEchoOffButton;
    void __fastcall ConnectButtonClick(TObject *Sender);
    void __fastcall FormResize(TObject *Sender);
    void __fastcall DisconnectButtonClick(TObject *Sender);
    void __fastcall TnEmulVT1SessionConnected(TObject *Sender);
    void __fastcall TnEmulVT1SessionClosed(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall SendButtonClick(TObject *Sender);
    void __fastcall OptionsButtonClick(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall LocalEchoCheckBoxClick(TObject *Sender);
    void __fastcall RequestLocalEchoOnButtonClick(TObject *Sender);
    void __fastcall RequestLocalEchoOffButtonClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);

private:
    String FIniFileName;
    bool FInitialized = false;

    void __fastcall TnEmulVT1LocalEcho(TObject *Sender);

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

extern PACKAGE TTelnetForm *TelnetForm;

#endif
