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

#ifndef RFIDpanelH
#define RFIDpanelH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include "Serial.h"
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <Menus.hpp>
#include <ValEdit.hpp>
#include <DBGrids.hpp>
#include <DBCtrls.hpp>
#include <Mask.hpp>
#include <Dialogs.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TTimer *Timer1;
        TGroupBox *GroupBox1;
        TButton *ButtonID;
        TLabel *LabelIDN;
        TEdit *EditJm;
        TEdit *EditPrijm;
        TButton *ButtonUloz;
        TLabel *Label11;
        TLabel *Label12;
        TStringGrid *StringGrid1;
        TLabel *Label10;
        TButton *ButtonOdstran;
        TEdit *EditOdstran;
        TMainMenu *MainMenu1;
        TMenuItem *Soubor1;
        TMenuItem *Komunikace1;
        TMenuItem *Editace1;
        TMenuItem *Odelipoledomodulu1;
        TMenuItem *Natipolezmodulu1;
        TMenuItem *Synchronizujhodiny1;
        TMenuItem *sriovlinka1;
        TMenuItem *COM11;
        TMenuItem *COM21;
        TMenuItem *COM31;
        TLabel *Label9;
        TMenuItem *COM41;
        TMenuItem *Pipoj1;
        TMenuItem *Odpoj1;
        TPanel *Panel1;
        TLabel *LabelKom;
        TLabel *Label14;
        TMenuItem *Ulo1;
        TMenuItem *Otevi1;
        TMenuItem *Konec1;
        TMenuItem *N1;
        TLabel *Labelstav;
        TOpenDialog *OpenDialog1;
        TSaveDialog *SaveDialog1;
        TLabel *Label1;
        void __fastcall Timer1Timer(TObject *Sender);
        void __fastcall ButtonIDClick(TObject *Sender);
        void __fastcall ButtonUlozClick(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall ButtonOdstranClick(TObject *Sender);
        void __fastcall Odelipoledomodulu1Click(TObject *Sender);
        void __fastcall Natipolezmodulu1Click(TObject *Sender);
        void __fastcall Synchronizujhodiny1Click(TObject *Sender);
        void __fastcall FormActivate(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall COM11Click(TObject *Sender);
        void __fastcall COM21Click(TObject *Sender);
        void __fastcall COM31Click(TObject *Sender);
        void __fastcall COM41Click(TObject *Sender);
        void __fastcall Pipoj1Click(TObject *Sender);
        void __fastcall Odpoj1Click(TObject *Sender);
        void __fastcall StringGrid1SetEditText(TObject *Sender, int ACol,
          int ARow, const AnsiString Value);
        void __fastcall Otevi1Click(TObject *Sender);
        void __fastcall StringGrid1GetEditText(TObject *Sender, int ACol,
          int ARow, AnsiString &Value);
        void __fastcall Ulo1Click(TObject *Sender);
        void __fastcall StringGrid1Click(TObject *Sender);
        void __fastcall StringGrid1SelectCell(TObject *Sender, int ACol,
          int ARow, bool &CanSelect);
        void __fastcall Konec1Click(TObject *Sender);
private:	// User declarations


        TSerial *Serial;

        int Port;
        FILE *fr, *f_ini;

        unsigned char stav;

public:		// User declarations

        __fastcall TForm1(TComponent* Owner);
        void __fastcall TForm1:: zobraz(void);
        void __fastcall TForm1:: posli_paket(int pocet);
        //void __fastcall TForm1:: uloz_cas(void);
        //void __fastcall posli_paket(int pocet);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
