mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Code cosmetic in "Insert files" dialog:
* Make sure the INSERT query is fired within a try/except block, and keep form open on any error * Reasonably rename some component names * Remove InsertFilesWindow(), instead cache the instance of InsertFiles in main form, like it is for most other dialogs * Get rid of a with .. do block * Ger rid of a weird form pointer, instead use the "Owner" property
This commit is contained in:
@ -70,8 +70,6 @@ type
|
||||
procedure AcceptFiles( var msg : TMessage ); message WM_DROPFILES;
|
||||
end;
|
||||
|
||||
function InsertFilesWindow (AOwner : TComponent; Flags : String = '') : Boolean;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
@ -80,16 +78,6 @@ uses main, helpers, db;
|
||||
{$R *.DFM}
|
||||
|
||||
|
||||
function InsertFilesWindow (AOwner : TComponent; Flags : String = '') : Boolean;
|
||||
var
|
||||
f : TfrmInsertFiles;
|
||||
begin
|
||||
f := TfrmInsertFiles.Create(AOwner);
|
||||
// todo: pass flags
|
||||
Result := (f.ShowModal=mrOK);
|
||||
FreeAndNil (f);
|
||||
end;
|
||||
|
||||
{ FormShow }
|
||||
procedure TfrmInsertFiles.FormShow(Sender: TObject);
|
||||
begin
|
||||
@ -363,7 +351,6 @@ end;
|
||||
procedure TfrmInsertFiles.ButtonInsertClick(Sender: TObject);
|
||||
begin
|
||||
FProgressForm := TfrmInsertFilesProgress.Create(Self);
|
||||
FProgressForm.InsertFilesForm := Self;
|
||||
FProgressForm.ShowModal;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user