unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IniFiles, StdCtrls, Buttons;
type
TForm1 = class(TForm)
EL: TEdit;
BO: TSpeedButton;
BS: TSpeedButton;
OD: TOpenDialog;
SD: TSaveDialog;
procedure BOClick(Sender: TObject);
procedure BSClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Ini : TIniFile;
implementation
{$R *.dfm}
procedure TForm1.BOClick(Sender: TObject);
begin
if not OD.Execute then
Exit
else
Ini := TIniFile.Create(OD.FileName);
EL.Text := Ini.ReadString('ZS-2009','1','') ;
Ini.Free;
end;
procedure TForm1.BSClick(Sender: TObject);
begin
if not SD.Execute then
Exit;
Ini := TIniFile.Create(SD.FileName);
Ini.WriteString('ZS-2009','1',EL.Text);
Ini.Free;
end;
end.
DL SC
No comments:
Post a Comment