📄 handunit.pas
字号:
unit handUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Buttons;
type
ThandForm = class(TForm)
Panel1: TPanel;
Image1: TImage;
Panel3: TPanel;
Panel4: TPanel;
Panel11: TPanel;
Label6: TLabel;
Label5: TLabel;
Image7: TImage;
Edit3: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
handForm: ThandForm;
implementation
uses Unit4, Unit2, Unit1;
{$R *.DFM}
procedure ThandForm.BitBtn2Click(Sender: TObject);
begin
Panel3.Visible:=false;
close;
end;
procedure ThandForm.BitBtn1Click(Sender: TObject);
var ret:integer;
begin
if trim(edit3.Text)=trim(form1.password.lines.text) then
begin
{==========disconnect==========}
deletefile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+'.cdx');
if RadioButton1.Checked then
begin
form4.ClientDataSet1.SaveToFile(trim('c:\NewStar\Save\'+form4.name.Lines.Text+form2.label4.Caption)+'.sav');
form4.ClientDataSet1.SaveToFile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx');
showmessage('OK! 当前录入已经成功保存,文件在C:\Sky目录下,文件名为:'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx ...');
end else
begin
form4.ClientDataSet1.SaveToFile(trim('c:\NewStar\Save\'+form4.name.Lines.Text+form2.label4.Caption)+'.sav');
form4.ClientDataSet1.SaveToFile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx');
deletefile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx.mmm');
with form2.Archiver1 do
begin
FileName := 'c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx.mmm';
Open;
try
AddFile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx');
deletefile('c:\sky\'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx');
finally
Close;
end;
end;
showmessage('OK! 当前录入已经成功保存,文件在C:\Sky目录下,文件名为:'+form4.name.Lines.Text+form2.label4.Caption+datetostr(date)+'.cdx.mmm 的压缩加密文件,请务必将此文件通过FTP或E_MAIL发送给我们...');
end;
panel3.Visible:=false;
close;
end else
begin
showmessage('警告:你的口令非法请重新录入!');
end;
end;
procedure ThandForm.FormActivate(Sender: TObject);
begin
form2.Enabled:=false;
RadioButton1.Checked:=true;
Panel3.Visible:=true;
edit3.SetFocus;
end;
procedure ThandForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form2.Enabled:=true;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -