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

#ifndef LaserCalibration_FormH
#define LaserCalibration_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "TntExtCtrls.hpp"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include "TntStdCtrls.hpp"
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class TLaserCalibrationForm : public TForm
{
__published:	// IDE-managed Components
  TPanel *Panel1;
  TPanel *Panel2;
  TTntPanel *ImagePanel;
  TImage *LaserTestImageCamera1;
  TImage *LaserTestImageCamera5;
  TLabel *Label18;
  TLabel *Label30;
  TLabel *LaserTestProgressLabelCamera1;
  TLabel *LaserTestProgressLabelCamera5;
  TProgressBar *LaserTestProgressBarCamera1;
  TProgressBar *LaserTestProgressBarCamera5;
  TPanel *Panel3;
  TButton *Button1;
  TButton *Button2;
  TTntGroupBox *CaptureGroupBox;
  TTntButton *CaptureStartButton;
  TTntButton *CaptureStopButton;
  TTntGroupBox *OptionGroupBox;
  TCheckBox *GridSettingCheckBox;
  TCheckBox *CenterPositionCheckBox;
  TLabel *Label1;
  TEdit *FOVEdit;
  TLabel *Label25;
  TTntButton *NCControlButton;
  TTntButton *CloseButton;
  TTntButton *SpeedControlButton;
  TLabel *Label2;
  TLabel *Label3;
  TEdit *ShutterSpeedTextBox;
  TLabel *Label4;
  TEdit *GainTextBox;
  TTimer *CaptureCheckTimer;
  TBitBtn *BitBtn1;
  TTntButton *sLaserControlBtn;
  void __fastcall Button1Click(TObject *Sender);
  void __fastcall Button2Click(TObject *Sender);
  void __fastcall CloseButtonClick(TObject *Sender);
  void __fastcall NCControlButtonClick(TObject *Sender);
  void __fastcall SpeedControlButtonClick(TObject *Sender);
  void __fastcall CaptureStopButtonClick(TObject *Sender);
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall CaptureStartButtonClick(TObject *Sender);
  void __fastcall CaptureCheckTimerTimer(TObject *Sender);
  void __fastcall BitBtn1Click(TObject *Sender);
  void __fastcall FOVEditClick(TObject *Sender);
  void __fastcall ShutterSpeedTextBoxClick(TObject *Sender);
  void __fastcall GainTextBoxClick(TObject *Sender);
  void __fastcall ShutterSpeedTextBoxKeyPress(TObject *Sender, char &Key);
  void __fastcall GainTextBoxKeyPress(TObject *Sender, char &Key);
  void __fastcall FOVEditKeyPress(TObject *Sender, char &Key);
  void __fastcall sLaserControlBtnClick(TObject *Sender);
private:	// User declarations
  TRect prevRc;
  HWND winHandle;

  void __fastcall InitImageComponents();
  void __fastcall RefreshCameraInfo(int camIndex, float m);
  void __fastcall GetDefaultString();

public:		// User declarations
  __fastcall TLaserCalibrationForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TLaserCalibrationForm *LaserCalibrationForm;
//---------------------------------------------------------------------------
DWORD GetProcessIDByName(AnsiString name);
HANDLE GetWinHandle(ULONG pid);
#endif
