?? clocktime.pas
字號:
unit ClockTime;
interface
uses
Windows, SysUtils, Classes, Graphics, Controls, Forms,
StdCtrls, Mask, PrjConst;
type
TdlgClockTime = class(TForm)
meBegin: TMaskEdit;
Label1: TLabel;
Label2: TLabel;
meEnd: TMaskEdit;
btnOK: TButton;
btnCancel: TButton;
Label3: TLabel;
procedure meBeginExit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function Execute: Boolean;
end;
var
dlgClockTime: TdlgClockTime;
implementation
uses Main, Functions;
{$R *.DFM}
function TdlgClockTime.Execute: Boolean;
begin
if not Assigned(dlgClockTime) then
dlgClockTime:=TdlgClockTime.Create(Application);
with dlgClockTime do
begin
Result:=dlgClockTime.ShowModal=mrOK;
end;
end;
procedure TdlgClockTime.meBeginExit(Sender: TObject);
begin
with Sender as TCustomEdit do
begin
try
if MyStrToTime(Text)>1 then
Raise Exception.Create(SEANEOyENEIHhMmO);
except
if CanFocus then SetFocus;
Raise;
end;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -