📄 main.pas
字号:
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, BBoard, ExtCtrls;
type
TForm1 = class(TForm)
btExit: TButton;
Panel1: TPanel;
btOnOff: TButton;
Edit1: TEdit;
btText: TButton;
btStyle: TButton;
RadioGroup: TRadioGroup;
BillBoard1: TBillBoard;
procedure btExitClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btOnOffClick(Sender: TObject);
procedure btStyleClick(Sender: TObject);
procedure BillBoard1NeedText(Sender: TObject);
procedure btTextClick(Sender: TObject);
procedure RadioGroupClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
index: integer;
maintext,
jointext: string;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
index := 77;
maintext := 'TBillBoard Beta Release 1 by Mansoft';
jointext := 'I hope you enjoy it!';
Caption := maintext + ' - ' + jointext;
Edit1.Text := jointext;
BillBoard1.Text := maintext;
BillBoard1.AnimationRate := 20;
end;
procedure TForm1.btExitClick(Sender: TObject);
begin
Close;
end;
procedure TForm1.btOnOffClick(Sender: TObject);
begin
BillBoard1.Animation := not( BillBoard1.Animation );
end;
procedure TForm1.btStyleClick(Sender: TObject);
begin
if( BillBoard1.DotStyle = dsDot ) then
begin
BillBoard1.DotStyle := dsBulb;
btStyle.Caption := '&Dot';
end
else
begin
BillBoard1.DotStyle := dsDot;
btStyle.Caption := '&Bulb';
end
end;
procedure TForm1.btTextClick(Sender: TObject);
begin
jointext := Edit1.Text;
Caption := maintext + ' - ' + jointext;
end;
procedure TForm1.RadioGroupClick(Sender: TObject);
var
i: integer;
begin
if( BillBoard1.Animation ) then
begin
i := 20;
case TRadioGroup( Sender ).ItemIndex of
1: i := 100;
2: i := 200;
3: i := 300;
end;
BillBoard1.AnimationRate := i;
end;
end;
procedure TForm1.BillBoard1NeedText(Sender: TObject);
begin
if( BillBoard1.Text = maintext ) then
BillBoard1.Text := jointext
else
BillBoard1.Text := maintext;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -