📄 databack_un.pas
字号:
unit databack_un;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinData, BusinessSkinForm, bsSkinShellCtrls, bsSkinCtrls,
StdCtrls, Mask, bsSkinBoxCtrls, ComCtrls, bsSkinTabs, bsMessages,
FileCopy,registry;
type
Tbackup = class(TForm)
WVFileCopy1: TWVFileCopy;
bsSkinMessage1: TbsSkinMessage;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinXFormButton1: TbsSkinXFormButton;
bsSkinPageControl1: TbsSkinPageControl;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinData1: TbsSkinData;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinEdit1: TbsSkinEdit;
bsSkinDirectoryEdit1: TbsSkinDirectoryEdit;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinPanel1: TbsSkinPanel;
bsSkinLabel1: TbsSkinLabel;
bsSkinGauge1: TbsSkinGauge;
bsSkinLabel2: TbsSkinLabel;
bsSkinLabel3: TbsSkinLabel;
bsSkinLabel4: TbsSkinLabel;
bsSkinEdit2: TbsSkinEdit;
bsSkinLabel5: TbsSkinLabel;
bsSkinEdit3: TbsSkinEdit;
bsCompressedStoredSkin1: TbsCompressedStoredSkin;
bsSkinButton1: TbsSkinButton;
bsSkinXFormButton3: TbsSkinXFormButton;
procedure bsSkinXFormButton3Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure WVFileCopy1CopyProgress(Sender: TObject; TotalFileSize,
TotalBytesTransferred: Cardinal; Rate: Byte);
procedure WVFileCopy1Finish(Sender: TObject);
procedure bsSkinDirectoryEdit1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
backup: Tbackup;
implementation
{$R *.dfm}
procedure Tbackup.bsSkinXFormButton3Click(Sender: TObject);
begin
application.Terminate;
end;
procedure Tbackup.FormCreate(Sender: TObject);
VAR
reg:tregistry;
skin_s:string;
begin
reg:=tregistry.Create;
reg.RootKey:=hkey_local_machine;
reg.OpenKey('\software\microsoft\windows\bl_soft',true);
if reg.ValueExists('skin') then
begin
skin_s:=reg.ReadString('skin');
end
else
begin
reg.WriteString('skin',ExtractFilePath(Application.ExeName)+'sky\lime\skin.ini');
skin_s:=ExtractFilePath(Application.ExeName)+'sky\lime\skin.ini';
end;
bsCompressedStoredSkin1.LoadFromIniFile(skin_s);
bsSkinData1.LoadCompressedStoredSkin(bsCompressedStoredSkin1);
bsskinedit1.Text:=ExtractFilePath(Application.ExeName) + 'sjyy.Mdb';
bsskindirectoryedit1.Text:=ExtractFilePath(Application.ExeName) ;
end;
{procedure Tbackup.bsSkinButton1Click(Sender: TObject);
var
sou,dst:string;
begin
inherited;
sou:=bsskinedit1.Text ;
// sou:='d:\filecopy\readme.txt';
dst:=bsskindirectoryedit1.Text +'\'+datetostr(now) +'.mdb';
screen.Cursor:=-1;
wvfilecopy1.ExistingFile:=sou;
wvfilecopy1.NewFile:=dst;
wvfilecopy1.Start;
// filecopy(sou,dst);
screen.Cursor:=0;
end;
procedure Tbackup.WVFileCopy1CopyProgress(Sender: TObject; TotalFileSize,
TotalBytesTransferred: Cardinal; Rate: Byte);
begin
inherited;
bsskinlabel1.Caption:=inttostr(rate);
end;
procedure Tbackup.WVFileCopy1Start(Sender: TObject);
begin
inherited;
bsskinlabel1.Caption:='系统开始拷贝文件.......';
end; }
procedure Tbackup.bsSkinButton1Click(Sender: TObject);
var
sou,dst:string;
begin
inherited;
sou:=bsskinedit1.Text ;
// sou:='d:\filecopy\readme.txt';
if copy(trim(bsskindirectoryedit1.Text),length(trim(bsskindirectoryedit1.Text)),1)<>'\' then
dst:=bsskindirectoryedit1.Text +'\'+datetostr(now) +'.mdb'
else
dst:=bsskindirectoryedit1.Text +datetostr(now) +'.mdb' ;
screen.Cursor:=-1;
wvfilecopy1.ExistingFile:=sou;
wvfilecopy1.NewFile:=dst;
bsskinedit2.Clear;
bsskinedit3.Clear;
bsskingauge1.Value :=0;
wvfilecopy1.Start;
// filecopy(sou,dst);
screen.Cursor:=0;
end;
procedure Tbackup.WVFileCopy1CopyProgress(Sender: TObject; TotalFileSize,
TotalBytesTransferred: Cardinal; Rate: Byte);
begin
bsskingauge1.Value :=rate;
bsskinedit2.text:=inttostr(TotalFileSize);
bsskinedit3.Text:=inttostr(TotalBytesTransferred);
end;
procedure Tbackup.WVFileCopy1Finish(Sender: TObject);
begin
wvfilecopy1.Free;
bsskinmessage1.MessageDlg('文件备份完毕!',mtinformation,[mbok],0);
application.Terminate;
end;
procedure Tbackup.bsSkinDirectoryEdit1Change(Sender: TObject);
begin
//bsskindirectoryedit1.EditText :=bsskindirectoryedit1.Text+'\';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -