var
Form1: TForm1;
batFile:textfile;
implementation
{$R *.dfm}
procedure TForm1.execButtonClick(Sender: TObject);
begin
assignfile(batFile,'temp.bat');
rewrite(batFile);
writeln(batFile,'%~1'+#10+'pause');
closefile(batFile);
ShellExecute(Application.Handle, 'open', 'temp.bat', pchar('"'+cmdLineEdit.text+'"'), nil, SW_SHOW);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
OpenDialog1.Filter:= '备份文件|*.dmp|所有文件|*.*';
if OpenDialog1.Execute then
begin
fileEdit.text:=OpenDialog1.FileName;
end;
end;
procedure TForm1.blogLabelMouseEnter(Sender: TObject);
begin
blogLabel.Font.style:=[fsUnderline];
end;
procedure TForm1.blogLabelMouseLeave(Sender: TObject);
begin
blogLabel.Font.Style:=[];
end;
procedure TForm1.blogLabelClick(Sender: TObject);
begin
ShellExecute(Handle, 'Open', 'http://blog.csdn.net/sunyujia/', '', '', SW_SHOWNORMAL);
end;
procedure TForm1.databaseEditChange(Sender: TObject);
begin
chgCmdLine();
extCmdLineEdit.Text:='log='+databaseEdit.Text+'.log';
fileEdit.Text:=databaseEdit.Text+'.dmp';
end;
procedure TForm1.chgCmdLine();
begin
cmdLineEdit.text:=userNameEdit.text+'/'+passwordEdit.text+'@'+databaseEdit.text;
if impRadio.Checked=true then
责任编辑:小草