//---------------------------------------------------------------------------
#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <vcl\sysutils.hpp>
#include <vcl\windows.hpp>
#include <vcl\messages.hpp>
#include <vcl\sysutils.hpp>
#include <vcl\classes.hpp>
#include <vcl\graphics.hpp>
#include <vcl\controls.hpp>
#include <vcl\forms.hpp>
#include <vcl\dialogs.hpp>
#include <vcl\stdctrls.hpp>
#include <vcl\buttons.hpp>
#include <vcl\extctrls.hpp>
#include <vcl\menus.hpp>
#include <Classes.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include "CSPIN.h"
#include <ComCtrls.hpp>
#pragma hdrstop

#include "Robot.h"

//---------------------------------------------------------------------------
class TMainForm : public TForm
{
__published:   
	TMainMenu *MainMenu;
	TMenuItem *FileNewItem;
	TMenuItem *FileOpenItem;
	TMenuItem *FileSaveItem;
	TMenuItem *FileSaveAsItem;
	TMenuItem *FileExitItem;
	TMenuItem *HelpAboutItem;
	TSaveDialog *SaveDialog;
   TOpenDialog *OpenDialog;
   TButton *UpButton;
   TButton *LeftButton;
   TButton *RightButton;
   TButton *DownButton;
   TButton *ClockWiseButton;
   TButton *AntiClockWiseButton;
   TBevel *Bevel1;
   TTimer *Timer;
   TRadioGroup *ControlModeRadioGroup;
   TButton *LearnButton;
   TPaintBox *PaintBox1;
   TTimer *Timer1;
   TLabel *RecognizeLabel;
   TTimer *RecognizeTimer;
   TMenuItem *N2;
   TMenuItem *N3;
   TMenuItem *N4;
   TMenuItem *N5;
   TMenuItem *N6;
   TMenuItem *N7;
   TMenuItem *N8;
   TOpenDialog *OpenConfigDialog;
   TSaveDialog *SaveConfigDialog;
   TOpenDialog *OpenPatternDialog;
   TSaveDialog *SavePatternDialog;
   TMenuItem *N9;
   TMenuItem *N10;
   TMenuItem *N11;
   TMenuItem *N12;
   TMenuItem *N13;
	void __fastcall FileNew(TObject *Sender);
	void __fastcall FileOpen(TObject *Sender);
	void __fastcall FileSave(TObject *Sender);
	void __fastcall FileSaveAs(TObject *Sender);
	void __fastcall FileExit(TObject *Sender);
	void __fastcall HelpAbout(TObject *Sender);
   void __fastcall TimerTimer(TObject *Sender);
   void __fastcall UpButtonMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
   void __fastcall UpButtonMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
   void __fastcall DownButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall DownButtonMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
   void __fastcall LeftButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall LeftButtonMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
   void __fastcall RightButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall RightButtonMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
   void __fastcall ClockWiseButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall ClockWiseButtonMouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall AntiClockWiseButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall AntiClockWiseButtonMouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
   void __fastcall FormPaint(TObject *Sender);
   void __fastcall LearnButtonClick(TObject *Sender);
   void __fastcall Timer1Timer(TObject *Sender);
   void __fastcall FormCreate(TObject *Sender);
   void __fastcall RecognizeTimerTimer(TObject *Sender);
   void __fastcall N2Click(TObject *Sender);
   void __fastcall N5Click(TObject *Sender);
   void __fastcall N6Click(TObject *Sender);
   void __fastcall N7Click(TObject *Sender);
   void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
   void __fastcall N11Click(TObject *Sender);
   void __fastcall N9Click(TObject *Sender);
   void __fastcall N12Click(TObject *Sender);
   void __fastcall N10Click(TObject *Sender);
private:        // private user declarations
public:         // public user declarations
	virtual __fastcall TMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TMainForm *MainForm;
extern AnsiString typeName[RFINALTOUCH+1];
//---------------------------------------------------------------------------
#endif
