📄 ringtime.pas
字号:
unit RingTime;
interface
uses
Windows, SysUtils, Classes, Graphics, Controls, Forms,
StdCtrls, Mask, ComCtrls, PrjConst;
type
TdlgRingTime = class(TForm)
Label4: TLabel;
meDuration: TMaskEdit;
edRingTime: TDateTimePicker;
Label1: TLabel;
btnOK: TButton;
btnCancel: TButton;
UpDown1: TUpDown;
procedure FormCreate(Sender: TObject);
procedure meDurationExit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function Execute: Boolean;
end;
var
dlgRingTime: TdlgRingTime;
implementation
{$R *.DFM}
function TdlgRingTime.Execute: Boolean;
begin
if not Assigned(dlgRingTime) then
dlgRingTime:=TdlgRingTime.Create(Application);
with dlgRingTime do
begin
Result:=dlgRingTime.ShowModal=mrOK;
end;
end;
procedure TdlgRingTime.FormCreate(Sender: TObject);
begin
edRingTime.Time:=Time;
end;
procedure TdlgRingTime.meDurationExit(Sender: TObject);
var
nInt: Integer;
begin
try
nInt:=StrToInt(meDuration.Text);
if nInt<1 then
Raise Exception.Create(SOGEAAUIAa);
except
if meDuration.Canfocus then meDuration.SetFocus;
Raise;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -