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

#ifndef MachineParamSetting_FormH
#define MachineParamSetting_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <Grids.hpp>

#include "Environment.h"
#include "TntButtons.hpp"
#include "TntComCtrls.hpp"
#include "TntExtCtrls.hpp"
#include "TntGrids.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"

#define _STUDY_MS_SPEED_INDEX 7
#define _STUDY_MS_SHAPE_INDEX 7
//---------------------------------------------------------------------------
class TMachineParamSettingForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntPageControl *PageControl;
	TTntTabSheet *TabSheet1;
	TTntPanel *Panel1;
	TTntBitBtn *BitBtn1;
	TTntBitBtn *BitBtn2;
	TTntTabSheet *TabSheet3;
	TTntGroupBox *GroupBox4;
  TTntGroupBox *GroupBox7;
  TTntLabel *Label53;
	TTntTabSheet *TabSheet4;
	TTntGroupBox *GroupBox6;
	TTntStringGrid *SpeedSettingStringGrid;
	TTntSpeedButton *MSTabletTypeSpeedButton1;
	TTntSpeedButton *MSTabletTypeSpeedButton2;
	TTntSpeedButton *MSTabletTypeSpeedButton3;
	TTntSpeedButton *MSTabletShapeSpeedButton1;
	TTntSpeedButton *MSTabletShapeSpeedButton2;
	TTntSpeedButton *MSTabletShapeSpeedButton3;
	TTntTabSheet *TabSheet5;
	TTntLabel *Label26;
	TTntComboBox *MachineModeComboBox;
	TTntLabel *Label34;
	TTntComboBox *PCPowerModeComboBox;
	TTntTabSheet *TabSheet6;
	TTntCheckBox *DoorInterlockCheckBox;
	TTntSpeedButton *SpeedButton1;
	TTntEdit *BuzzerIntervalEdit;
	TTntGroupBox *GroupBox5;
	TTntCheckBox *EyeProtectionModeCheckBox;
	TTntLabel *Label51;
	TTntLabel *Label52;
	TTntEdit *EyeProtectionModeLEDOnTimeEdit;
	TTntEdit *EyeProtectionModeLEDOffDelayEdit;
	TTntRadioButton *BuzzerContinuousOnRadioButton;
	TTntRadioButton *BuzzerIntervalOnRadioButton;
	TTntTabSheet *TabSheet2;
	TTntGroupBox *GroupBox1;
	TTntLabel *Label1;
	TTntEdit *PressureAlarmLevelEdit;
	TTntLabel *Label2;
	TTntLabel *Label4;
	TTntEdit *VacuumAlarmLevelEdit1;
	TTntLabel *Label5;
	TTntLabel *Label6;
	TTntEdit *VacuumAlarmLevelEdit2;
	TTntLabel *Label7;
	TTntGroupBox *GroupBox2;
	TTntLabel *Label8;
	TTntLabel *Label9;
	TTntLabel *Label10;
	TTntLabel *Label11;
	TTntLabel *Label12;
	TTntLabel *Label13;
	TTntEdit *TemperatureAlarmLevelEdit1;
	TTntEdit *TemperatureAlarmLevelEdit2;
	TTntEdit *TemperatureAlarmLevelEdit3;
	TTntLabel *Label43;
	TTntLabel *Label44;
	TTntEdit *MechanicalMaxSpeedEdit;
	TTntEdit *MechanicalMinSpeedEdit;
	TTntGroupBox *GroupBox8;
	TTntLabel *Label24;
	TTntComboBox *ManualModeSensroIndexComboBox;
	TTntEdit *ManualModeSensorActiveRatioEdit;
	TTntGroupBox *GroupBox9;
	TTntLabel *Label27;
	TTntLabel *Label28;
	TTntEdit *EmptySensorActiveEdit;
	TTntEdit *FullSensorActiveEdit;
        TTntLabel *TntLabel1;
        TTntEdit *EjectorWindStrengthEdit;
    TTntCheckBox *HopperEmptyCheckBox;
  TTntGroupBox *TntGroupBox1;
  TTntStringGrid *StudySpeedSettingStringGrid;
  TTntGroupBox *TntGroupBox2;
  TRadioButton *EjectorNormalModeButton;
  TRadioButton *EjectorSpecialModeRadioButton;
TGroupBox *GroupBox10;
    TTntLabel *TntLabel2;
    TTntLabel *TntLabel3;
    TEdit *Edit_HCB_IpAddr;
    TEdit *Edit_HCB_TcpPort;
  TTntLabel *GoodCollect1TntLabel;
  TTntEdit *GoodCollect1TntEdit;
  TTntLabel *GoodCollect2TntLabel;
  TTntEdit *GoodCollect2TntEdit;
  TTntCheckBox *BowlfeederSensorActiveCheckbox;
  TPanel *SafetyModePanel;
  TTntRadioButton *SafetyMaintenaceRadioBtn;
  TTntRadioButton *SafetyRunRadioBtn;
  TTntLabel *TntLabel15;
  TTntLabel *RingBlowerDelayLabel;
  TTntEdit *DiskDelayTimeEdit;
  TTntCheckBox *TntCheckBox1;
  TPanel *Panel2;
  TTntCheckBox *SimpleSpeedControlCheckBox;
  TTntGroupBox *TntGroupBox3;
  TTntStringGrid *SimpleSpeedControlStringGrid;
  TTntTabSheet *TabSheet7;
  TTntStringGrid *SimpleSpeedControlStringGrid2;
  TTntGroupBox *TntGroupBox4;
  TTntLabel *TntLabel18;
  TTntCheckBox *Laser_complexer_Enable;
  TTntEdit *Laser_Deley_Time;
  TTntLabel *TntLabel19;
  TTntLabel *TntLabel21;
  TTntEdit *Ipb_board_count;
  TTntLabel *TntLabel22;
  TTntEdit *VBSensorWarningDelayAlarmEdit;
  TTntGroupBox *SensorGroupbox;
  TTntGroupBox *GearRatioGroupBox;
        TTntComboBox *MachineTypeComboBox;
        TTntLabel *TntLabel20;
  TTntCheckBox *ACModeCheckBox;
  TTntLabel *TntLabel23;
  TTntImage *TntImage1;
  TTntCheckBox *cbAutoDemper;
  TTntTabSheet *TabSheet8;
  TTntGroupBox *TntGroupBox5;
  TTntLabel *TntLabel24;
  TTntLabel *TntLabel25;
  TTntEdit *eIn_Sig_SW_Time;
  TTntGroupBox *TntGroupBox6;
  TTntLabel *TntLabel26;
  TTntLabel *TntLabel27;
  TTntEdit *eOut_Sig_SW_Time;
  TTntGroupBox *TPB_Miseject_Setting_GroupBox;
  TTntEdit *eTPB_MisOpenRunTime;
  TTntEdit *eTPB_MisOpenDelayTime;
  TTntLabel *TntLabel28;
  TTntLabel *TntLabel29;
  TTntCheckBox *ckbTPB_Active;
  TTntEdit *eTPB_MisCmdValidCnt;
  TTntLabel *TntLabel30;
  TTntCheckBox *ckbMultiMisejectAction;
  TTntCheckBox *ckbTPB_MisejectOperationMode;
  TTntPanel *HiddenPanel;
        TTntCheckBox *LaserTrigMode;
  TTntComboBox *InverterTypeComboBox;
  TTntLabel *TntLabel37;
  TTntGroupBox *TntGroupBox7;
  TTntCheckBox *CamBootingEnableCheckBox;
    TGroupBox *GroupBox3;
    TTntLabel *Label3;
    TTntLabel *Label35;
    TTntEdit *DefectEjectorLengthEdit;
    TTntEdit *DefectEjectorDelayEdit;
    TTntLabel *Label18;
    TTntLabel *Label36;
    TGroupBox *GroupBox11;
    TTntLabel *Label39;
    TTntLabel *Label15;
    TTntEdit *UnInsEjectorDelayEdit;
    TTntLabel *Label16;
    TTntEdit *UnInsEjectorLengthEdit;
    TTntLabel *Label40;
    TGroupBox *GroupBox12;
    TTntLabel *TntLabel4;
    TTntLabel *TntLabel5;
    TTntLabel *TntLabel11;
    TTntLabel *TntLabel12;
    TTntEdit *GoodEjectorDelayEdit;
    TTntEdit *GoodEjectorLengthEdit;
    TGroupBox *GroupBox13;
    TTntCheckBox *MisejectActiveCheckBox;
    TTntLabel *Label49;
    TTntEdit *MisejectActiveDelayEdit;
	TTntLabel *DistributorOutSigStartDelayLabel;
	TTntEdit *DistributorOutSigStartDelayEdit;
	TTntLabel *DistributorOutSigStartDelaySecLabel;
	TTntLabel *TntLabel6;
	TTntEdit *WaitChangeBarrelTimeEdit;
	TTntLabel *TntLabel7;
	TTntButton *SetDefaultSpeedButton;
	TTntComboBox *SucktionDiskGearRatioComboBox;
	void __fastcall BitBtn1Click(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall MSTabletKindSpeedButtonClick(TObject *Sender);
	void __fastcall SpeedSettingStringGridSelectCell(TObject *Sender,
          int ACol, int ARow, bool &CanSelect);
	void __fastcall SetDefaultSpeedButtonClick(TObject *Sender);
	void __fastcall NumEditClick(TObject *Sender);
	void __fastcall VacuumAlarmLevelEditClick(TObject *Sender);
  void __fastcall SpeedSettingStringGridSetEditText(TObject *Sender,
          int ACol, int ARow, const WideString Value);
  void __fastcall StudySpeedSettingStringGridSelectCell(TObject *Sender,
          int ACol, int ARow, bool &CanSelect);
  void __fastcall EjectorNormalModeButtonClick(TObject *Sender);
  void __fastcall EjectorSpecialModeRadioButtonClick(TObject *Sender);
  void __fastcall Panel2DblClick(TObject *Sender);
  void __fastcall TntCheckBox1Click(TObject *Sender);
  void __fastcall TntFormShow(TObject *Sender);
  void __fastcall SimpleSpeedControlStringGridSelectCell(TObject *Sender,
          int ACol, int ARow, bool &CanSelect);
  void __fastcall Laser_Deley_TimeChange(TObject *Sender);
  void __fastcall ACModeCheckBoxClick(TObject *Sender);
  void __fastcall TntImage1DblClick(TObject *Sender);
  void __fastcall HiddenPanelDblClick(TObject *Sender);
  void __fastcall CheckTPB_BoardExist(void);
  void __fastcall TempOffsetEditClick(TObject *Sender);
private:	// User declarations
	void __fastcall MSTabletKindChange(void);
	TMachineParams TempMachineParams;
	int MSTabletTypeIndex, MSTabletShapeIndex;
  void __fastcall GetDefaultString();
public:		// User declarations
	__fastcall TMachineParamSettingForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMachineParamSettingForm *MachineParamSettingForm;
//---------------------------------------------------------------------------
#endif
