MaiXinRong 5 年之前
父节点
当前提交
1e7be6af46
共有 2 个文件被更改,包括 142 次插入0 次删除
  1. 82 0
      Forms/rmfImportFrm.dfm
  2. 60 0
      Forms/rmfImportFrm.pas

+ 82 - 0
Forms/rmfImportFrm.dfm

@@ -0,0 +1,82 @@
+object rmfImportForm: TrmfImportForm
+  Left = 767
+  Top = 451
+  Width = 426
+  Height = 125
+  Caption = #35831#36755#20837#35201#23548#20837#30340#26399#25968#21644#35282#33394
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Label1: TLabel
+    Left = 15
+    Top = 48
+    Width = 168
+    Height = 13
+    Caption = #35831#33258#24049#25511#21046#26399#25968#21644#35282#33394#30340#27491#30830#24615
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clRed
+    Font.Height = -11
+    Font.Name = 'MS Sans Serif'
+    Font.Style = []
+    ParentFont = False
+  end
+  object Label2: TLabel
+    Left = 16
+    Top = 70
+    Width = 246
+    Height = 13
+    Caption = #35282#33394#35831#36755#20837#25968#23383#65292#21407#25253#20026'0'#65292'1'#23457#20026'1'#65292#20197#27492#31867#25512
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clRed
+    Font.Height = -11
+    Font.Name = 'MS Sans Serif'
+    Font.Style = []
+    ParentFont = False
+  end
+  object lePhase: TLabeledEdit
+    Left = 56
+    Top = 16
+    Width = 121
+    Height = 21
+    EditLabel.Width = 39
+    EditLabel.Height = 13
+    EditLabel.Caption = #26399#25968#65306' '
+    LabelPosition = lpLeft
+    TabOrder = 0
+  end
+  object leStage: TLabeledEdit
+    Left = 273
+    Top = 16
+    Width = 121
+    Height = 21
+    EditLabel.Width = 39
+    EditLabel.Height = 13
+    EditLabel.Caption = #35282#33394#65306' '
+    LabelPosition = lpLeft
+    TabOrder = 1
+  end
+  object btnOk: TButton
+    Left = 280
+    Top = 64
+    Width = 57
+    Height = 25
+    Caption = #30830#23450
+    TabOrder = 2
+    OnClick = btnOkClick
+  end
+  object btnCancel: TButton
+    Left = 349
+    Top = 64
+    Width = 57
+    Height = 25
+    Caption = #21462#28040
+    ModalResult = 2
+    TabOrder = 3
+  end
+end

+ 60 - 0
Forms/rmfImportFrm.pas

@@ -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.