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

#ifndef komunikaceH
#define komunikaceH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>
#include "serial.h"
#include "PERFGRAP.h"
#include <Menus.hpp>
#include <Dialogs.hpp>
#include <Buttons.hpp>
#include "piereg.h"
//---------------------------------------------------------------------------
class TfrmHlavni : public TForm
{
__published:	// IDE-managed Components
        TTimer *tmrCti;
        TLabel *lblSmer;
        TTimer *tmrFocus;
        TEdit *edtRizeni;
        TScrollBar *scrDraha;
        TMemo *memoTraj;
        TMainMenu *MainMenu;
        TMenuItem *Soubor1;
        TMenuItem *Nov1;
        TMenuItem *Otevri;
        TMenuItem *Uloz;
        TMenuItem *Konec;
        TOpenDialog *dlgOpen;
        TSaveDialog *dlgSave;
        TTimer *tmrVyckej;
        TButton *btnProg;
        TRadioGroup *rgSmer;
        TButton *btnJedProgram;
        TLabel *lblDrahaUjeta;
        TLabel *lblPocetRadku;
        TLabel *lblAktRadek;
        TLabel *lblBaterie;
        TLabel *Label5;
        TLabel *lblI1;
        TLabel *lblKroky1;
        TLabel *lblKroky2;
        TLabel *Label3;
        TTimer *tmrPockej;
        TEdit *edtDraha;
        TGroupBox *Cidla;
        TCheckBox *chbCidlo1;
        TCheckBox *chbCidlo2;
        TCheckBox *chbCidlo3;
        TCheckBox *chbCidlo4;
        TCheckBox *chbCidlo5;
        TLabel *lblStav;
        TLabel *lblZabezpeceni;
        TLabel *Label12;
        TRadioGroup *rbgRychlost;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label4;
        TBevel *Bevel1;
        TPie *Pie;
        TLabel *lblUhel;
        TLabel *Label6;
        TLabel *Label7;
        TLabel *Label8;
        TLabel *Label9;
        TLabel *Label10;
        TLabel *Label11;
        TLabel *Label13;
        TLabel *lblSouc;
        TLabel *lblBS;


        void __fastcall FormCreate(TObject *Sender);

        
        void __fastcall Memo1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall tmrCtiTimer(TObject *Sender);
        void __fastcall Edit1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall tmrFocusTimer(TObject *Sender);
        void __fastcall edtRizeniKeyUp(TObject *Sender, WORD &Key,
          TShiftState Shift);

        void __fastcall OdesliData(void);
        void __fastcall OdesliData2(void);
        void __fastcall OdesliData3(void);
        void __fastcall ZobrazStavCidel(void);

        void __fastcall NulujPocitadla(void);

        void __fastcall KonecClick(TObject *Sender);
        void __fastcall OtevriClick(TObject *Sender);
     
        void __fastcall UlozClick(TObject *Sender);
        void __fastcall Nov1Click(TObject *Sender);
        void __fastcall btnProgClick(TObject *Sender);
        void __fastcall btnJedProgramClick(TObject *Sender);
        void __fastcall scrRychlostExit(TObject *Sender);
        
        void __fastcall tmrPockejTimer(TObject *Sender);
        void __fastcall scrDrahaChange(TObject *Sender);
        void __fastcall tmrVyckejTimer(TObject *Sender);
        void __fastcall rbgRychlostClick(TObject *Sender);

private:	// User declarations
        TSerial *Serial;
public:		// User declarations
        __fastcall TfrmHlavni(TComponent* Owner);
        __fastcall ~TfrmHlavni();

        //TEdit *Edit1;
        TEdit *Edit2;
        TEdit *Edit3;
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmHlavni *frmHlavni;
//---------------------------------------------------------------------------
#endif
