home *** CD-ROM | disk | FTP | other *** search
/ Quake++ for Quake / Quake++.iso / quake / unit6.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-20  |  893 b   |  54 lines

  1. unit Unit6;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   Tren = class(TForm)
  11.     Label1: TLabel;
  12.     Label2: TLabel;
  13.     Edit1: TEdit;
  14.     Button1: TButton;
  15.     Button2: TButton;
  16.     procedure Button2Click(Sender: TObject);
  17.     procedure Button1Click(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   ren: Tren;
  26.   f:File;
  27.   s,gdd:String;
  28.  
  29. implementation
  30.  
  31. uses unit1;
  32. {$R *.DFM}
  33.  
  34. procedure Tren.Button2Click(Sender: TObject);
  35. begin
  36. close;
  37. end;
  38.  
  39. procedure Tren.Button1Click(Sender: TObject);
  40. begin
  41. s:=label1.caption;
  42. if edit1.text<>'' then
  43. Begin
  44.      AssignFile(f,s);
  45.      rename(f,edit1.text);
  46. End;
  47. getdir(0,gdd);
  48. Form1.filelistbox1.directory:='c:\';
  49. form1.filelistbox1.directory:=gdd;
  50. close;
  51. end;
  52.  
  53. end.
  54.