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

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "nratcmd.hpp"
#include "nrclasses.hpp"
#include "nrcomm.hpp"
#include "nrcommbox.hpp"
#include "nrgsm.hpp"
#include "nrlogfile.hpp"
#include "CSPIN.h"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TCheckBox *CheckBox1;
        TButton *Button1;
        TnrComm *nrComm1;
        TnrGsm *nrGsm1;
        TnrDeviceBox *nrDeviceBox1;
        TnrLogFile *nrLogFile1;
        TListBox *ListBox1;
        TButton *Button3;
        TLabel *Label2;
        TComboBox *cbOnNewSms;
        TLabel *Label1;
        TPageControl *Pages;
        TTabSheet *TabSheet3;
        TListView *lvInfo;
        TTabSheet *TabSheet1;
        TLabel *Label3;
        TLabel *Label7;
        TEdit *Edit1;
        TButton *Button2;
        TMemo *Memo1;
        TCheckBox *chConfirm;
        TTabSheet *TabSheet2;
        TLabel *Label4;
        TLabel *Label5;
        TLabel *Label6;
        TComboBox *eMem;
        TButton *Button4;
        TButton *Button6;
        TMemo *Memo2;
        TButton *Button5;
        TTabSheet *pgTerminal;
        TMemo *Memo3;
        TTabSheet *pgBook;
        TLabel *Label8;
        TListView *lvPhones;
        TPanel *Panel1;
        TComboBox *ePhoneBookType;
        TButton *Button7;
        TCSpinEdit *eNo;
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall CheckBox1Click(TObject *Sender);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall nrGsm1AfterInit(TObject *Sender);
        void __fastcall nrGsm1GsmError(TObject *Sender, AnsiString sData);
        void __fastcall nrGsm1Ring(TObject *Sender, AnsiString sData);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall cbOnNewSmsChange(TObject *Sender);
        void __fastcall Button3Click(TObject *Sender);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall Button6Click(TObject *Sender);
        void __fastcall Button5Click(TObject *Sender);
        void __fastcall nrGsm1SmsListItem(TObject *Sender, AnsiString aMem,
          int idSms, TnrPduSms *aSms);
        void __fastcall nrGsm1SmsReceived(TObject *Sender, AnsiString aMem,
          int idSms, TnrPduSms *aSms);
        void __fastcall nrGsm1SmsSent(TObject *Sender, AnsiString aMem,
          int idSms, TnrPduSms *aSms);
        void __fastcall FormShow(TObject *Sender);
        void __fastcall Button7Click(TObject *Sender);
        void __fastcall nrGsm1PhoneListFinish(TObject *Sender);
        void __fastcall nrGsm1PhoneListProgress(TObject *Sender,
          bool &flBreak);
        void __fastcall AddInfo(AnsiString sCapt, AnsiString sVal);
private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        virtual void __fastcall Dispatch(void *Message)
        {
          switch(((PMessage)Message)->Msg)
            {
              case  WM_DEVICECHANGE:
                 nrComm1->WMDeviceChange((TMessage&)Message);
                 break;
              default:
                 TForm::Dispatch(Message);
              break;
            }
        }
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
