123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- unit rmfImportFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls;
- type
- TrmfImportForm = class(TForm)
- lePhase: TLabeledEdit;
- leStage: TLabeledEdit;
- Label1: TLabel;
- Label2: TLabel;
- btnOk: TButton;
- btnCancel: TButton;
- procedure btnOkClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- function GetMtfImportInfo(var APhase, AStage: Integer): Boolean;
- implementation
- {$R *.dfm}
- function GetMtfImportInfo(var APhase, AStage: Integer): Boolean;
- var
- vForm: TrmfImportForm;
- begin
- vForm := TrmfImportForm.Create(nil);
- vForm.ClientHeight := 94;
- vForm.ClientWidth := 418;
- try
- Result := vForm.ShowModal = mrOk;
- if Result then
- begin
- APhase := StrToIntDef(vForm.lePhase.Text, -1);
- AStage := StrToIntDef(vForm.leStage.Text, -1);
- end;
- finally
- vForm.Free;
- end;
- end;
- procedure TrmfImportForm.btnOkClick(Sender: TObject);
- var
- iPhase, iStage: Integer;
- begin
- iPhase := StrToIntDef(lePhase.Text, -1);
- iStage := StrToIntDef(leStage.Text, -1);
- if (iPhase >= 0) and (iStage >= 0) then
- ModalResult := mrOk;
- end;
- end.
|