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

#ifndef Unit3H
#define Unit3H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TForm3 : public TForm
{
__published:	// IDE-managed Components
        TScrollBox *ScrollBox1;
        TMainMenu *MainMenu1;
        TMenuItem *N1;
        TMenuItem *N2;
        TMenuItem *N3;
        TMenuItem *N4;
        TOpenDialog *OpenDialog1;
        TSaveDialog *SaveDialog1;
        TPaintBox *PaintBox2;
        TTable *Table1;
        TDBGrid *DBGrid1;
        TDataSource *DataSource1;
        TMenuItem *N5;
        TMenuItem *N6;
        TMenuItem *N7;
                    TMenuItem *N8;
        TMenuItem *d1;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall N4Click(TObject *Sender);
        void __fastcall N2Click(TObject *Sender);
        void __fastcall PaintBox2Paint(TObject *Sender);
        void __fastcall N5Click(TObject *Sender);
        void __fastcall N6Click(TObject *Sender);
        void __fastcall N7Click(TObject *Sender);
                    void __fastcall N8Click(TObject *Sender);
                    void __fastcall PaintBox2MouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
                    void __fastcall PaintBox2MouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall N22Click(TObject *Sender);


private: int js,jsi,tracknum,trackwidth,dj,Name_Height,j,ljcs[30],ccltwz[30][500],totaldpnum;       //井数 \储层连通位置
         int MN_pos[30],MK_pos[30],Rd_pos[30],Rs_pos[30],Ac_pos[30],Rxo_pos[30],GR_pos[30],SP_pos[30],DEN_pos[30],HAC_pos[30],stedp[30];
         String cc1[30],cc2[30],newname[30],newname1[30],ccold,ccp0[30],ccp[30],ccp2[30],cname1[30][100][10],cname2[30][100][10],cname3[30][100][10],cname30[30][100][10],str16[30][500],str5[30][500],str6[30][500],strdc[30][100]; //断层
         char str[30][500],str1[30][500],str2[30][500],str3[30][500],str0[30][500],str11[30][500],str4[30][500];
         float stdp[30],endp[30],relv[30],Top_deep[30],a[30][40000][50],data[30][40000][50],a2[30][1500][50],a21lj[30][500],ljbwhd0[30][500][6],ljbwhd[30][500][6];
         int temp_index[30][3][4],temp_index1[30][3][4],min,max,ma[30][500],mi[30][500],starti1[30];
          float xcw[30][500], dsw[30][500],hdw[30][500],dbsd[30][500],syhd[30][500],yxhdd[30][500],yx[30][500],       //打开数据库操作
         kxd[30][500],zstl[30][500],s,zdcxs[30][500],hsbhd[30][500],sfsbh[30][500];
         AnsiString jhw[30][500],lb[30][500],stltz[30][500],syjs[30][500],dcjs[30][500],sk[30][500],bk[30][500];
         int jcs[30][500],jsxh[30][500],totalnum[30],pd1,Y1,icolor,moveopen2;int isname;                                                //打开数据库操作
         float xcw1[30][500],dsw1[30][500],hdw1[30][500],dbsd1[30][500],syhd1[30][500],yxhdd1[30][500],yx1[30][500],       //保存数据库操作
         kxd1[30][500],zstl1[30][500],s1,zdcxs1[30][500],hsbhd1[30][500],sfsbh1[30][500];
         AnsiString jhw1[30][500],lb1[30][500],stltz1[30][500],syjs1[30][500],dcjs1[30][500],sk1[30][500],bk1[30][500];
         int jcs1[30][500],jsxh1[30][500];int maxp1[30];int ih[500],jxdb,sdc[30],ic,lpdq; //精细对比 、深度差 、拉平对齐
         AnsiString la_Location[30] ;
         AnsiString la_Name[30],File_name;
         AnsiString dbf_Name[30];
         int Xh[300],Xh1[300],Xhc[300],Switch,a8[10],i9;  //序号
         AnsiString Jh[300],Yczmc[300],Dymc[300],Jhc[300],Yczmcc[300],Dymcc[300],Bz[300],Bzc[300],Jh1[300],Yczmc1[300],Dymc1[300],Bz1[300];  //井号 ‘油层组名称、单元名称、标注
         float Dyds[300],Dyds1[300];
	// User declarations
public:	void __fastcall lthead(TObject *Sender);	// 连通头文件
        void __fastcall GetFileName(String str);
        __fastcall getint(FILE *fp);
        __fastcall getint7(FILE *fp);
        float __fastcall getfloat(FILE *fp);
        float __fastcall getfloat7(FILE *fp);
        __fastcall putint(short ii,FILE *fp);
        __fastcall putfloat(float ff,FILE *fp);
        __fastcall putint7(short ii,FILE *fp);
        __fastcall putfloat7(float ff,FILE *fp);
        void __fastcall smaxmin(int i0);
        void __fastcall draw(int temp[30][3][4],int tracknum,float data[30][40000][50],int index[30],float stdp0[30],float relv0[30],int jss);
        void __fastcall dkcwsjk(TObject *Sender);     //打开层位数据库
        void __fastcall paintfenceng(TObject *Sender);
        void __fastcall hdhf(TObject *Sender);   //厚度划分
        void __fastcall cclt(TObject *Sender);  //储层连通
        void __fastcall lthd(TObject *Sender);  //连通厚度
        void __fastcall dklawj(TObject *Sender);
        void __fastcall ljcjdysjk0(TObject *Sender); //老井沉积单元数据库
        void __fastcall dkcjsjk(TObject *Sender);
        void __fastcall open_074(TObject *Sender);
        void __fastcall TForm3::paintfenceng_074(TObject *Sender);
        __fastcall TForm3(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm3 *Form3;
//---------------------------------------------------------------------------
#endif
