?? unit3.pas
字號:
{ 電腦鬧鐘3.0-風之鈴
版權所有(C) 2003.3 <風之鈴>
這一程序是自由軟件,你可以遵照自由軟件基金會出版的GNU通用公共許可
證條款來修改和重新發布這一程序。或者用許可證的第二版,或者(根據你的選
擇)用任何更新的版本。
發布這一程序的目的是希望它有用,但沒有任何擔保。甚至沒有適合特定目
的的隱含的擔保。更詳細的情況請參閱GNU通用公共許可證。
你應該已經和程序一起收到一份GNU通用公共許可證的副本。如果還沒有,
寫信給:
The Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
MA02139, USA
風之鈴:tel:0712-83155 or 13610412046
}
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm3 = class(TForm)
Edit1: TEdit;
Label5: TLabel;
Edit2: TEdit;
Label6: TLabel;
Edit3: TEdit;
Label7: TLabel;
Label1: TLabel;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm3.BitBtn1Click(Sender: TObject);
var
tempstr:string;
setfortemptime:Tdatetime;
begin
if (edit1.Text ='')or(edit2.Text ='')or(edit3.Text ='') then
tempstr:=''
else begin
tempstr:=edit1.text+':'+edit2.text+':'+edit3.text;
setfortemptime:=strtodatetime(tempstr);
tempstr:=formatdatetime('hh:nn:ss',setfortemptime);
end;
myinifile.WriteString('程序參數','autoshut',tempstr);
autoshut:=tempstr;
form3.Close ;
end;
procedure TForm3.FormCreate(Sender: TObject);
var
tempstr:string;
begin
tempstr:=myinifile.ReadString('程序參數','autoshut','00:00:00');
if tempstr<>'' then
begin
edit1.Text :=tempstr[1]+tempstr[2];
edit2.Text :=tempstr[4]+tempstr[5];
edit3.Text :=tempstr[7]+tempstr[8];
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -