?? unitformshujuyuan.~pas
字號:
unit UnitFormShuJuYuan;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TFormShuJuYuanSheZhi = class(TForm)
ButtonBaoCun: TButton;
ButtonClose: TButton;
LabelRiXian: TLabel;
EditRiXianShuJu: TEdit;
procedure FormShow(Sender: TObject);
procedure ButtonBaoCunClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormShuJuYuanSheZhi: TFormShuJuYuanSheZhi;
implementation
uses KXianMain;
{$R *.DFM}
procedure TFormShuJuYuanSheZhi.FormShow(Sender: TObject);
Var ShuJuYuanFile:TextFile;
Var TempStr:String;
begin
If FileExists('ShuJu.Txt') Then
Begin
AssignFile(ShuJuYuanFile, 'ShuJu.Txt');
FileMode := 0;
Reset(ShuJuYuanFile);
Readln(ShuJuYuanFile,TempStr);
EditRiXianShuJu.Text:=TempStr;
CloseFile(ShuJuYuanFile);
End;
end;
procedure TFormShuJuYuanSheZhi.ButtonBaoCunClick(Sender: TObject);
Var ShuJuYuanFile:TextFile;
begin
Try
AssignFile(ShuJuYuanFile, 'ShuJu.Txt');
FileMode := 1;
ReWrite(ShuJuYuanFile);
Writeln(ShuJuYuanFile,EditRiXianShuJu.Text);
CloseFile(ShuJuYuanFile);
KXianMain.DayPathName:=EditRiXianShuJu.Text;
MessageDlg('數據源設置參數已經成功保存!', mtInformation,[mbOk], 0);
Except
MessageDlg('文件讀寫錯誤,請重試!', mtInformation,[mbOk], 0);
End;
End;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -