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


#ifndef SectSelectCom_ParamH
#define SectSelectCom_ParamH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "Data_Gen.h"
#include "GArrow.h"
#include <Grids.hpp>
#include <ComCtrls.hpp>
#include <jpeg.hpp>

//TArrow CoorAx;


//---------------------------------------------------------------------------
class TSectSelectCom_ParamFrame : public TFrame
{
__published:	// IDE-managed Components
        TGroupBox *GroupBox_Common;
        TButton *Button_Apply;
        TPageControl *PageControl2;
		TTabSheet *TabSheet_Standart;
        TLabel *Label10;
        TComboBox *ComboBox_profil;
        TStringGrid *StringGrid_B;
	TPageControl *PageControl_StandDvut;
        TTabSheet *TabSheet_StandTube;
        TPageControl *PageControl_Tube;
        TTabSheet *TabSheet_Square;
        TTabSheet *TabSheet_Rect;
        TComboBox *ComboBox_h_b_rect;
        TLabel *Label_h_b_rect;
        TComboBox *ComboBox_t_rect;
        TLabel *Label_t_rect;
        TRadioGroup *RadioGroup_orient;
        TImage *Image_rect;
        TStringGrid *StringGrid_Tube;
        TComboBox *ComboBox_h_b_square;
		TLabel *Label_b_h_square;
        TComboBox *ComboBox_t_square;
        TLabel *Label_t_square;
        TImage *Image_square;
	TLabel *Label_type_sect;
        TComboBox *ComboBox_TypeSect;
        TCheckBox *CheckBox_type_sect;
        TTabSheet *TabSheet_GOST57837;
        TRadioGroup *RadioGroupGOST57837;
        TTabSheet *TabSheet_CYL;
		TLabel *Label9;
        TLabel *Label11;
        TImage *Image_Cyl;
        TComboBox *ComboBox_Cyl_D;
        TComboBox *ComboBox_Cyl_t;
        TStringGrid *StringGrid_Cyl;
	TTabSheet *TabSheet_TavrStandart;
	TLabel *Label2;
	TPageControl *PageControl_Tavr;
	TTabSheet *TabSheet_Tavr_GOST;
	TComboBox *ComboBox_Tavr;
	TStringGrid *StringGrid_Tavr;
	TRadioGroup *RadioGroup_Tavr_GOST;
	TTabSheet *TabSheet_TU;
	TImage *Image_stand;
	TRadioGroup *RadioGroup_TU;
	TImage *Image_tavr;
	TTabSheet *TabSheet_Tavr_TU;
	TRadioGroup *RadioGroup_Tavr_TU;
        void __fastcall Write_sect(TObject *Sender);
        int  __fastcall Read_sect();
        void __fastcall DrawSect();
        void __fastcall CheckChangeSect();
        void __fastcall Check_Original();
        void __fastcall Check_Type(TObject *Sender);
        void __fastcall Check_Modify();
        void __fastcall Edit6_Change(TObject *Sender);
        void __fastcall Edit1_Change(TObject *Sender);
        void __fastcall Edit2_Change(TObject *Sender);
        void __fastcall Edit3_Change(TObject *Sender);
		void __fastcall Edit4_Change(TObject *Sender);
        void __fastcall Edit5_Change(TObject *Sender);
        void __fastcall Button_ApplyClick(TObject *Sender);
        void __fastcall CheckBox1MouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall ComboBox_TypeSectChange(TObject *Sender);
		//void __fastcall draw_dvutavr(TImage * Image1,SECT_DVUTAVR *sect);
		//void __fastcall draw_square_tube(TImage * Image1,SECT_SQUARE *sect);
		//void __fastcall draw_rect_tube(TImage * Image1, SECT_RECT *sect);
		//void __fastcall draw_circular_tube(TImage * Image1, SECT_CIRC *sect);
		//void __fastcall draw_axes(TImage * Image1);
		void __fastcall Edit3Change(TObject *Sender);
        void __fastcall ComboBox_profilChange(TObject *Sender);
        void __fastcall Change_type_sect(int index_profil, TObject *Sender);
        void __fastcall Change_type_sect_tube(int index_profil, TObject *Sender);
        void __fastcall PageControl_StandDvutChange(TObject *Sender);
        void __fastcall RadioGroup_orientClick(TObject *Sender);

        void __fastcall Put_h_rect(TObject *Sender);
        void __fastcall ComboBox_h_b_rectChange(TObject *Sender);
        void __fastcall ComboBox_t_rectChange(TObject *Sender);
        void __fastcall ComboBox_h_b_squareChange(TObject *Sender);
        void __fastcall ComboBox_t_squareChange(TObject *Sender);
        void __fastcall CheckBox_type_sectClick(TObject *Sender);
        void __fastcall RectTube_Change(TObject *Sender);
        void __fastcall SquareTube_Change(TObject *Sender);
        // Заполнить список профилей
        void __fastcall FillComboBox1(TObject *Sender);
		void __fastcall RadioGroupGOST57837Click(TObject *Sender);
        void __fastcall ComboBox_Cyl_DChange(TObject *Sender);
        void __fastcall ComboBox_Cyl_tChange(TObject *Sender);
        void __fastcall CylTube_Change(TObject *Sender);
	void __fastcall RadioGroup_Tavr_GOSTClick(TObject *Sender);
	void __fastcall ComboBox_TavrChange(TObject *Sender);
	void __fastcall RadioGroup_TUClick(TObject *Sender);
	void __fastcall RadioGroup_Tavr_TUClick(TObject *Sender);
	void __fastcall PageControl_TavrChange(TObject *Sender);
		//void __fastcall draw_axes_zero(TImage *Image_Ax, int x0, int y0);



private:	// User declarations
public:		// User declarations
		__fastcall TSectSelectCom_ParamFrame(TComponent* Owner);
		int index_composed;
        int index_GOST_or_TU;
		int index_TAVR_GOST_or_TU;
		double width;
		double thick;
		double kf;

};
//---------------------------------------------------------------------------
extern PACKAGE TSectSelectCom_ParamFrame *SectSelectCom_ParamFrame;
//---------------------------------------------------------------------------
#endif
