TİGERKO l v.24xx FARM SERVER l Yeni Sunucu ODESA Official Tarih 26 KASIM l SAAT 22:00

[Delphi Tbl Boyut Kontrol Etme..]

11 Ocak 2012
12,856
77
48
Dosya boyutu alan fonksiyonumuz

Kod:
Function Get_FileOfSize(Const FileName: String): Integer;

   Var

      cmnsoft: TSearchRec;

   Begin

   Result:= 0;

    If FindFirst(FileName, faAnyFile, cmnsoft) = 0 Then

       Begin

       Result:= cmnsoft.Size;

       FindClose(cmnsoft);

       End;

    End;


Tbl leri bulup boyutunu alan işçilerimiz

Kod:
procedure TForm1.tblyolal;

     Var

         Ix: integer;

 Begin

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_Main_us.tbl');

 label10.Caption := IntToStr(Ix);

  Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_1.tbl');

 label1.Caption := IntToStr(Ix);

   Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_2.tbl');

 label2.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_3.tbl');

 label3.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_4.tbl');

 label4.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_5.tbl');

 label5.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_6.tbl');

 label6.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_7.tbl');

 label7.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_8.tbl');

 label8.Caption := IntToStr(Ix);

 Ix:= Get_FileOfSize(ExtractFileDir(Application.ExeName)+'/data/Skill_Magic_9.tbl');

 label9.Caption := IntToStr(Ix);



  end;


---------------------------------------------------------------------------

Kod:
  procedure tform1.tblkontrol;

   begin

   if not (label1.caption = '12248')then close

   else if not (label2.caption ='2264') then close

   else if not (label3.caption ='21372') then close

   else if not (label4.caption ='78320') then close

   else if not (label5.caption ='1660') then close

   else if not (label6.caption ='20726') then close

   else if not (label7.caption ='160') then close

   else if not (label8.caption ='776') then close

   else if not (label9.caption ='3185') then close

   else If not (label10.caption ='347879') then Close  ;

   end;
################################################

Kolay Gelsin...