unit RenameSignReportFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TRenameSignReportForm = class(TForm)
    lblNeedRename: TLabel;
    lblAffect: TLabel;
    edtName: TEdit;
    btnOk: TButton;
    btnCancel: TButton;
    procedure btnOkClick(Sender: TObject);
  private
    FDefaultName: string;
    FPhaseIndex: Integer;
  public
    constructor Create(ADefaultName: string; APhaseIndex: Integer);
    property DefaultName: string read FDefaultName;
  end;

function QuestRenameSignReport(var AName: string; APhaseIndex: Integer): Boolean;

implementation

function QuestRenameSignReport(var AName: string; APhaseIndex: Integer): Boolean;
var
  vQuestForm: TRenameSignReportForm;
begin
  vQuestForm := TRenameSignReportForm.Create(AName, APhaseIndex);
  try
    Result := vQuestForm.ShowModal = mrOk;
  finally
    vQuestForm.Free;
  end;
end;

{$R *.dfm}

procedure TRenameSignReportForm.btnOkClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

constructor TRenameSignReportForm.Create(ADefaultName: string;
  APhaseIndex: Integer);
begin
  inherited Create(nil);
  FDefaultName := ADefaultName;
  edtName.Text := FDefaultName;
  FPhaseIndex := APhaseIndex;
  ClientHeight := 132;
  ClientWidth := 366;
end;

end.
