You've already forked lazarus-ccr
68 lines
1.3 KiB
ObjectPascal
68 lines
1.3 KiB
ObjectPascal
![]() |
unit FreqSpecsUnit;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||
|
StdCtrls, contexthelpunit;
|
||
|
|
||
|
type
|
||
|
|
||
|
{ TFreqSpecsFrm }
|
||
|
|
||
|
TFreqSpecsFrm = class(TForm)
|
||
|
CancelBtn: TButton;
|
||
|
HelpBtn: TButton;
|
||
|
Memo1: TMemo;
|
||
|
OKBtn: TButton;
|
||
|
VarName: TEdit;
|
||
|
Minimum: TEdit;
|
||
|
Maximum: TEdit;
|
||
|
Range: TEdit;
|
||
|
IntSize: TEdit;
|
||
|
NoInts: TEdit;
|
||
|
Label1: TLabel;
|
||
|
Label2: TLabel;
|
||
|
Label3: TLabel;
|
||
|
Label4: TLabel;
|
||
|
Label5: TLabel;
|
||
|
Label6: TLabel;
|
||
|
procedure HelpBtnClick(Sender: TObject);
|
||
|
procedure IntSizeKeyPress(Sender: TObject; var Key: char);
|
||
|
private
|
||
|
{ private declarations }
|
||
|
public
|
||
|
{ public declarations }
|
||
|
end;
|
||
|
|
||
|
var
|
||
|
FreqSpecsFrm: TFreqSpecsFrm;
|
||
|
|
||
|
implementation
|
||
|
|
||
|
{ TFreqSpecsFrm }
|
||
|
|
||
|
procedure TFreqSpecsFrm.IntSizeKeyPress(Sender: TObject; var Key: char);
|
||
|
var
|
||
|
rangeval : double;
|
||
|
increment : double;
|
||
|
begin
|
||
|
if ord(Key) <> 13 then exit;
|
||
|
rangeval := StrToFloat(Range.Text);
|
||
|
increment := StrToFloat(IntSize.Text);
|
||
|
NoInts.Text := FloatToStr(rangeval / increment);
|
||
|
end;
|
||
|
|
||
|
procedure TFreqSpecsFrm.HelpBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
ContextHelpForm.HelpMessage((Sender as TButton).tag);
|
||
|
end;
|
||
|
|
||
|
initialization
|
||
|
{$I freqspecsunit.lrs}
|
||
|
|
||
|
end.
|
||
|
|