|
@@ -0,0 +1,60 @@
|
|
|
+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.
|