unit MotohrCounterTypeProp;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons, Mask;

type
  TMotohrCounterTypePropForm = class(TForm)
    btOk: TButton;
    btCancel: TButton;
    Label1: TLabel;
    edDescr: TMaskEdit;
    cbTimer: TCheckBox;
    Label2: TLabel;
    Label3: TLabel;
  private
    { Private declarations }
  public
  end;

  function ShowMotohrCounterTypeProp(var descr: string; var timer: boolean): boolean;

implementation

{$R *.dfm}

function ShowMotohrCounterTypeProp(var descr: string; var timer: boolean): boolean;
begin
  result := false;
  with TMotohrCounterTypePropForm.create(nil) do try
    cbTimer.Checked := timer;
    edDescr.Text := descr;
    edDescr.SelectAll;
    if ShowModal <> mrOk then
      Exit;
    descr := edDescr.Text;
    timer := cbTimer.Checked;
  finally
    Free;
  end;
  result := true;
end;

end.
