A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
|
|
@ -0,0 +1,51 @@
|
|||
unit Unit1;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
EditInputField: TEdit;
|
||||
ButtonRandom: TButton;
|
||||
ButtonIncrement: TButton;
|
||||
procedure EditInputFieldChange(Sender: TObject);
|
||||
procedure ButtonIncrementClick(Sender: TObject);
|
||||
procedure ButtonRandomClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TForm1.EditInputFieldChange(Sender: TObject);
|
||||
begin
|
||||
TRY
|
||||
StrToInt(EditInputField.Text);
|
||||
EXCEPT
|
||||
ShowMessage('Error! The Input Value is not numeric!');
|
||||
EditInputField.Text := '0';
|
||||
END;
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonIncrementClick(Sender: TObject);
|
||||
begin
|
||||
EditInputField.text := IntToStr(StrToInt(EditInputField.Text) + 1);
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonRandomClick(Sender: TObject);
|
||||
begin
|
||||
Randomize;
|
||||
EditInputField.Text := IntToStr(Random(High(Integer)));
|
||||
end;
|
||||
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue