📄 ucssz.pas
字号:
unit UCssz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, UBase, StdCtrls, Buttons, ComCtrls, IniFiles;
type
TFCssz = class(TFBase)
Edit_lj: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit_xx: TEdit;
SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Edit_xxKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FCssz: TFCssz;
implementation
uses UPublic;
{$R *.dfm}
procedure TFCssz.FormCreate(Sender: TObject);
var
vSysFile: TiniFile;
ComputerName: array[0..MAX_COMPUTERNAME_LENGTH+1] of char; // holds the name
Size: dword; // holds the size
str: string;
begin
inherited;
vSysFile := TiniFile.create(SysPath+'STUSys.ini');
Edit_lj.Text :=vSysFile.readstring ('cssz','DataSource','');
vSysFile.Free;
Edit_xx.Text := g_Sys.School
end;
procedure TFCssz.SpeedButton2Click(Sender: TObject);
begin
inherited;
Close;
end;
procedure TFCssz.SpeedButton1Click(Sender: TObject);
var
vSysFile: TiniFile;
begin
vSysFile := TiniFile.create(SysPath+'STUSys.ini');
if (trim(Edit_lj.Text)='')or(trim(Edit_xx.Text)='') then begin
Ask('信息填写不全,请重新填写!','信息',MB_ICONINFORMATION);
Edit_lj.SetFocus;
exit;
end;
vSysFile.WriteString ('cssz','DataSource',trim(Edit_lj.Text));
vSysFile.WriteString ('cssz','School',trim(Edit_xx.Text));
vSysFile.Free;
Ask('重启程序设置才有效','信息',MB_ICONINFORMATION);
Close;
end;
procedure TFCssz.Edit_xxKeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then SpeedButton1.Click;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -