www.pudn.com > DriveRescuev1.8.zip > propdlg.pas


unit propdlg; 
 
interface 
 
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,  
  Buttons, ExtCtrls; 
 
type 
  TItemPropertiesDialog = class(TForm) 
    OKBtn: TButton; 
    CancelBtn: TButton; 
    Bevel1: TBevel; 
    EditName: TEdit; 
    Label1: TLabel; 
    EditCluster: TEdit; 
    Label2: TLabel; 
    EditSize: TEdit; 
    Label3: TLabel; 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
    ItemName: string; 
    ItemSize: longword; 
    ItemCluster: longword; 
    function Execute: boolean; 
  end; 
 
var 
  ItemPropertiesDialog: TItemPropertiesDialog; 
 
implementation 
 
function TItemPropertiesDialog.Execute; 
var 
  code: integer; 
begin 
  EditName.text:=ItemName; 
  EditSize.text:=Inttostr(ItemSize); 
  EditCluster.text:=Inttostr(ItemCluster); 
  if ShowModal = mrOK then 
  begin 
    ItemName:=EditName.text; 
    val(EditCluster.text, ItemCluster, code); 
    val(EditSize.text, ItemSize, code); 
    result:=TRUE; 
  end else result:=FALSE; 
end; 
 
{$R *.dfm} 
 
end.