|
|
unit u_update;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB,inifiles, BusinessSkinForm, bsSkinData, bsSkinCtrls,
|
|
|
ComCtrls, ExtCtrls,ShellApi, VCLUnZip, VCLZip, kpSFXCfg, StdCtrls,
|
|
|
Buttons;
|
|
|
|
|
|
type
|
|
|
TForm1 = class(TForm)
|
|
|
t_sys_soft: TADOQuery;
|
|
|
t_sys_softDSDesigner2: TBlobField;
|
|
|
bsStoredSkin1: TbsStoredSkin;
|
|
|
bsSkinData1: TbsSkinData;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
Timer1: TTimer;
|
|
|
SFXConfig1: TSFXConfig;
|
|
|
unzipper: TVCLUnZip;
|
|
|
Button1: TButton;
|
|
|
BitBtn1: TBitBtn;
|
|
|
VCLZip1: TVCLZip;
|
|
|
procedure t_sys_softBeforeOpen(DataSet: TDataSet);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure Button1Click(Sender: TObject);
|
|
|
procedure unzipperUnZipComplete(sender: TObject; FileCount: Integer);
|
|
|
procedure BitBtn1Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
Form1: TForm1;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure TForm1.t_sys_softBeforeOpen(DataSet: TDataSet);
|
|
|
var
|
|
|
str:string;
|
|
|
inifile1:Tinifile;
|
|
|
begin
|
|
|
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
|
|
|
str:='';
|
|
|
str:='Provider='+inifile1.ReadString('database','Provider','');
|
|
|
str:=str+'Password='+inifile1.ReadString('database','Password','');
|
|
|
str:=str+'Persist Security Info='+inifile1.ReadString('database','Persist Security Info','');
|
|
|
str:=str+'User ID='+inifile1.ReadString('database','User ID','');
|
|
|
str:=str+'Initial Catalog='+inifile1.ReadString('database','Initial Catalog','');
|
|
|
str:=str+'Data Source='+inifile1.ReadString('database','Data Source','');
|
|
|
t_sys_soft.ConnectionString:=str;
|
|
|
inifile1.Free;
|
|
|
end;
|
|
|
|
|
|
procedure TForm1.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_sys_soft.open;
|
|
|
Timer1.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
procedure TForm1.Button1Click(Sender: TObject);
|
|
|
begin
|
|
|
with unzipper do
|
|
|
begin
|
|
|
zipname:=ExtractFilePath(Application.ExeName)+'DONGSHENGWEB.zip';
|
|
|
ReadZip;
|
|
|
FilesList.Add('*.*');
|
|
|
DestDir :='E:\CESHI\DS';
|
|
|
UnZip;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure TForm1.unzipperUnZipComplete(sender: TObject;
|
|
|
FileCount: Integer);
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure TForm1.BitBtn1Click(Sender: TObject);
|
|
|
begin
|
|
|
with VCLZip1 do
|
|
|
begin
|
|
|
FilesList.Clear;
|
|
|
FilesList.Add('E:\CESHI\DS\*.*');
|
|
|
DestDir :='E:\CESHI';
|
|
|
zipname:=ExtractFilePath(Application.ExeName)+'DONGSHENGWEB1123.zip';
|
|
|
Zip;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|