?? u3.pas
字號:
{****************************************************************** }
{ 第三階段-自由辯論階段 }
{ }
{****************************************************************** }
unit u3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Buttons, StdCtrls, jpeg;
type
TForm3 = class(TForm)
Label3: TLabel;
gbZh: TGroupBox;
sbtnZhStart: TSpeedButton;
ZhLeftTime: TLabel;
gbF: TGroupBox;
sbtnFStart: TSpeedButton;
FLeftTime: TLabel;
timerZh: TTimer;
TimerF: TTimer;
lb: TLabel;
Image1: TImage;
lbZh: TLabel;
lbF: TLabel;
procedure timerZhTimer(Sender: TObject);
procedure TimerFTimer(Sender: TObject);
procedure sbtnZhStartClick(Sender: TObject);
procedure sbtnFStartClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
tZh :integer; //正方時間
tF :integer; //反方時間
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses
uMain;
{$R *.dfm}
procedure TForm3.timerZhTimer(Sender: TObject);
begin
ZhleftTime.Caption:=IntToTime(tZh);
if tZh=300 then
begin
beep1;
end;
if tZh=0 then
begin
uMain.beep2;
timerZh.Enabled:=False;
sbtnZhStart.Enabled:=False;
// sbtnFStart.Enabled:=False; //考慮到主席要說:“正方時間到 ”
// if tF>0 then timerF.Enabled:=True; //注釋掉此兩行
end;
tZh:=tZh-1;
end;
procedure TForm3.TimerFTimer(Sender: TObject);
begin
FleftTime.Caption:=IntToTime(tF);
if tF=300 then
begin
beep1;
end;
if tF=0 then
begin
uMain.beep2;
sbtnFStart.Enabled:=False;
timerF.Enabled:=False;
end;
tF:=tF-1;
end;
procedure TForm3.sbtnZhStartClick(Sender: TObject);
begin
sbtnZhStart.Enabled:=False;
sbtnFStart.Enabled:=True;
timerZh.Enabled:=True;
timerF.Enabled:=False;
lb.Caption:='正 方 計 時 中';
lb.Font:=sbtnZhStart.Font;
lb.Font.Size:=28;
if tF<1 then sbtnFStart.Enabled:=False;
end;
procedure TForm3.sbtnFStartClick(Sender: TObject);
begin
sbtnZhStart.Enabled:=True;
sbtnFStart.Enabled:=False;
timerZh.Enabled:=False;
timerF.Enabled:=True;
lb.Caption:='反 方 計 時 中';
lb.Font:=sbtnFStart.Font;
lb.Font.Size:=28;
if tZh<1 then sbtnZhStart.Enabled:=False;
end;
procedure TForm3.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (Key=#113) or (Key=#81) then
Close;
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
// tZh :=350; //正方時間
// tF :=350; //反方時間
tZh :=3000; //正方時間
tF :=3000; //反方時間
lbZh.Font.Color:=uMain.ZhFontColor;
ZhLeftTime.Font.Color:= uMain.ZhFontColor;
lbF.Font.Color:=uMain.FFontColor;
FLeftTime.Font.Color:= uMain.FFontColor;
gbZh.Color:=uMain.ZhBackgroundColor;
gbF.Color:=uMain.FBackgroundColor;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -