mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Replace remaining loadXYZwindow() functions for dialogs by a more native way.
This commit is contained in:
@ -42,8 +42,6 @@ type
|
|||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CopyTableWindow(AOwner: TComponent): Boolean;
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -51,19 +49,6 @@ uses helpers, main;
|
|||||||
|
|
||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
{**
|
|
||||||
Create form on demand
|
|
||||||
@param TComponent Owner of form (should be calling form)
|
|
||||||
@return Boolean Form closed using modalresult mrOK
|
|
||||||
}
|
|
||||||
function CopyTableWindow(AOwner: TComponent): Boolean;
|
|
||||||
var
|
|
||||||
f : TCopyTableForm;
|
|
||||||
begin
|
|
||||||
f := TCopyTableForm.Create(AOwner);
|
|
||||||
Result := (f.ShowModal=mrOK);
|
|
||||||
FreeAndNil(f);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TCopyTableForm.radioStructureClick(Sender: TObject);
|
procedure TCopyTableForm.radioStructureClick(Sender: TObject);
|
||||||
|
@ -72,7 +72,6 @@ type
|
|||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function loaddataWindow(AOwner: TComponent): Boolean;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -81,20 +80,6 @@ uses Main, helpers;
|
|||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
|
|
||||||
{**
|
|
||||||
Create form on demand
|
|
||||||
@param TComponent Owner of form (should be calling form)
|
|
||||||
@return Boolean Form closed using modalresult mrOK
|
|
||||||
}
|
|
||||||
function loaddataWindow(AOwner: TComponent): Boolean;
|
|
||||||
var
|
|
||||||
f : Tloaddataform;
|
|
||||||
begin
|
|
||||||
f := Tloaddataform.Create(AOwner);
|
|
||||||
Result := (f.ShowModal=mrOK);
|
|
||||||
FreeAndNil(f);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{**
|
{**
|
||||||
FormCreat
|
FormCreat
|
||||||
|
@ -18,7 +18,7 @@ uses
|
|||||||
CommCtrl, Contnrs, Generics.Collections,
|
CommCtrl, Contnrs, Generics.Collections,
|
||||||
routine_editor, trigger_editor, options, EditVar, helpers, createdatabase, table_editor,
|
routine_editor, trigger_editor, options, EditVar, helpers, createdatabase, table_editor,
|
||||||
TableTools, View, Usermanager, SelectDBObject, connections, sqlhelp, mysql_connection,
|
TableTools, View, Usermanager, SelectDBObject, connections, sqlhelp, mysql_connection,
|
||||||
mysql_api, insertfiles, searchreplace;
|
mysql_api, insertfiles, searchreplace, loaddata, copytable;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -791,6 +791,8 @@ type
|
|||||||
InsertFiles: TfrmInsertFiles;
|
InsertFiles: TfrmInsertFiles;
|
||||||
EditVariableForm: TfrmEditVariable;
|
EditVariableForm: TfrmEditVariable;
|
||||||
SearchReplaceDialog: TfrmSearchReplace;
|
SearchReplaceDialog: TfrmSearchReplace;
|
||||||
|
ImportTextfileDialog: Tloaddataform;
|
||||||
|
CopyTableDialog: TCopyTableForm;
|
||||||
|
|
||||||
// Virtual Tree data arrays
|
// Virtual Tree data arrays
|
||||||
VTRowDataListVariables,
|
VTRowDataListVariables,
|
||||||
@ -923,7 +925,7 @@ const
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
About, loaddata, printlist, copytable, mysql_structures, UpdateCheck, uVistaFuncs, runsqlfile,
|
About, printlist, mysql_structures, UpdateCheck, uVistaFuncs, runsqlfile,
|
||||||
column_selection, data_sorting, grideditlinks;
|
column_selection, data_sorting, grideditlinks;
|
||||||
|
|
||||||
|
|
||||||
@ -1818,7 +1820,9 @@ end;
|
|||||||
procedure TMainForm.actImportCSVExecute(Sender: TObject);
|
procedure TMainForm.actImportCSVExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Import Textfile
|
// Import Textfile
|
||||||
loaddataWindow(self);
|
if not Assigned(ImportTextfileDialog) then
|
||||||
|
ImportTextfileDialog := Tloaddataform.Create(Self);
|
||||||
|
ImportTextfileDialog.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.actPreferencesExecute(Sender: TObject);
|
procedure TMainForm.actPreferencesExecute(Sender: TObject);
|
||||||
@ -1941,7 +1945,9 @@ end;
|
|||||||
procedure TMainForm.actCopyTableExecute(Sender: TObject);
|
procedure TMainForm.actCopyTableExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// copy table
|
// copy table
|
||||||
CopyTableWindow(self);
|
if not Assigned(CopyTableDialog) then
|
||||||
|
CopyTableDialog := TCopyTableForm.Create(Self);
|
||||||
|
CopyTableDialog.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user