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

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include "SerialComm.h"
//---------------------------------------------------------------------------
typedef struct __menu
{
    AnsiString Name ;
    unsigned int Price ;
} MENU ;

typedef struct __order
{
    int Menu ;
    int Qty ;
} ORDER ;
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
    TPanel *Panel2;
    TStringGrid *StringGrid1;
    TStringGrid *StringGrid2;
    TPanel *Panel3;
    TBitBtn *BitBtn1;
    TStatusBar *StatusBar1;
    TBevel *Bevel1;
    TTimer *Timer1;
    TBitBtn *BitBtn2;
    TBitBtn *BitBtn3;
    TBitBtn *BitBtn4;
        TStringGrid *StringGrid3;
        TLabel *Label1;
        TStringGrid *StringGrid4;
        TLabel *Label2;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall Timer1Timer(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
    void __fastcall BitBtn2Click(TObject *Sender);
    void __fastcall BitBtn3Click(TObject *Sender);
    void __fastcall BitBtn4Click(TObject *Sender);
    void __fastcall BitBtn5Click(TObject *Sender);
private:	// User declarations
    SerialComm * pSerialComm ;
    BOOL m_bOrderOK1, m_bOrderOK2 ;
    int m_iMenuCnt1, m_iMenuCnt2 ;
    int discount;
    ORDER stOrder1[100] ;
    ORDER stOrder2[100] ;


    void __fastcall Display1(void) ;
    void __fastcall Display2(void) ;
    void __fastcall Menu_Cancel1(int Menu) ;
    void __fastcall Menu_Cancel2(int Menu) ;    
public:		// User declarations
    MENU stMenu[100] ;
    unsigned int TotalAmount;
    unsigned int Number;
    unsigned int dis_flag1,dis_flag2,order_flag,member_flag;
    __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

