mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 17:01:35 +02:00
Lazarus Data Desktop: cleanup
git-svn-id: trunk@15254 -
This commit is contained in:
parent
90e2a18527
commit
e4968dd922
@ -143,9 +143,6 @@ end;
|
||||
|
||||
constructor TConnectionEditor.Create(AOwner: TComponent);
|
||||
|
||||
Var
|
||||
C : TWinControl;
|
||||
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FTV:=TTreeView.Create(Self);
|
||||
@ -465,7 +462,7 @@ Var
|
||||
L : TStringList;
|
||||
ID : TDDIndexDefs;
|
||||
D : TDDIndexDef;
|
||||
NI,NN : TTreeNode;
|
||||
NI : TTreeNode;
|
||||
I : Integer;
|
||||
|
||||
begin
|
||||
@ -481,8 +478,8 @@ begin
|
||||
begin
|
||||
D:=L.Objects[I] as TDDIndexDef;
|
||||
NI:=NewNode(ATV,ParentNode,D.IndexName,iiIndex);
|
||||
NN:=NewNode(ATV,NI,SNodeIndexFields+D.Fields,iiIndexFields);
|
||||
NN:=NewNode(ATV,NI,SNodeIndexOptions+IndexOptionsToString(D.Options),iiIndexOptions)
|
||||
NewNode(ATV,NI,SNodeIndexFields+D.Fields,iiIndexFields);
|
||||
NewNode(ATV,NI,SNodeIndexOptions+IndexOptionsToString(D.Options),iiIndexOptions)
|
||||
end;
|
||||
finally
|
||||
ID.Free;
|
||||
@ -531,7 +528,6 @@ procedure TConnectionEditor.ShowFields(ATableName : String; ATV : TTreeView;Pare
|
||||
Var
|
||||
L : TStringList;
|
||||
I : Integer;
|
||||
N : TTreeNode;
|
||||
TD : TDDTableDef;
|
||||
begin
|
||||
L:=TStringList.Create;
|
||||
@ -547,7 +543,7 @@ begin
|
||||
end;
|
||||
L.Sorted:=True;
|
||||
For I:=0 to L.Count-1 do
|
||||
N:=NewNode(ATV,ParentNode,L[I],iiField);
|
||||
NewNode(ATV,ParentNode,L[I],iiField);
|
||||
Finally
|
||||
L.Free;
|
||||
end;
|
||||
@ -558,7 +554,6 @@ procedure TConnectionEditor.ShowFields(ATableName : String; ALV : TListView);
|
||||
Var
|
||||
L : TStringList;
|
||||
I : Integer;
|
||||
N : TTreeNode;
|
||||
TD : TDDTableDef;
|
||||
FD : TDDFieldDef;
|
||||
LI : TListItem;
|
||||
@ -593,7 +588,6 @@ procedure TConnectionEditor.SelectFields(TableName : String);
|
||||
|
||||
Var
|
||||
LV : TListView;
|
||||
FN,IDN : TTreeNode;
|
||||
LC : TListColumn;
|
||||
|
||||
begin
|
||||
|
@ -69,7 +69,6 @@ type
|
||||
procedure LBKeyFieldsClick(Sender: TObject);
|
||||
procedure TSResize(Sender: TObject);
|
||||
private
|
||||
FGetTableDef: TDDTableDef;
|
||||
FTableDefs : TDDTableDefs;
|
||||
FGenerator : TFPDDSQLEngine;
|
||||
FSQLGenerated : Boolean;
|
||||
@ -196,7 +195,6 @@ procedure TGenerateSQLForm.GenerateSQL;
|
||||
end;
|
||||
|
||||
Var
|
||||
I : integer;
|
||||
KL,FL : TFPDDFieldList;
|
||||
|
||||
begin
|
||||
|
@ -28,7 +28,7 @@ uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus,
|
||||
ActnList, StdActns, ComCtrls, dicteditor, fpdatadict, IniPropStorage,
|
||||
conneditor, LCLType,
|
||||
inifiles, inicol, RTTICtrls, ExtCtrls, StdCtrls, propertystorage, ddfiles;
|
||||
RTTICtrls, ExtCtrls, StdCtrls, ddfiles;
|
||||
|
||||
type
|
||||
TEngineMenuItem = Class(TMenuItem)
|
||||
@ -158,14 +158,14 @@ type
|
||||
procedure CheckParams;
|
||||
function CloseCurrentConnection: TModalResult;
|
||||
function CloseCurrentTab(AddCancelClose: Boolean = False): TModalResult;
|
||||
function GetConnectionName(var AName: String): Boolean;
|
||||
function GetConnectionName(out AName: String): Boolean;
|
||||
function GetCurrentConnection: TConnectionEditor;
|
||||
function GetCurrentEditor: TDataDictEditor;
|
||||
procedure NewConnection(EngineName : String);
|
||||
procedure NewConnection;
|
||||
procedure OpenConnection(RC: TRecentConnection);
|
||||
procedure RegisterDDEngines;
|
||||
Function SelectEngineType(Var EngineName : String) : Boolean;
|
||||
Function SelectEngineType(out EngineName : String) : Boolean;
|
||||
procedure ShowImportRecentconnections;
|
||||
procedure ShowNewConnectionTypes;
|
||||
procedure ShowRecentConnections;
|
||||
@ -1024,6 +1024,7 @@ begin
|
||||
TD:=CurrentEditor.CurrentTable;
|
||||
If Assigned(TD) then
|
||||
begin
|
||||
AFieldName:='';
|
||||
If InputQuery(Format(SNewField,[TD.TableName]),SNEwFieldName,AFieldName) then
|
||||
If (AFieldName<>'') then
|
||||
CurrentEditor.NewField(AFieldName,TD);
|
||||
@ -1038,9 +1039,12 @@ Var
|
||||
|
||||
begin
|
||||
If Assigned(CurrentEditor) then
|
||||
begin
|
||||
ATableName:='';
|
||||
If InputQuery(SNewTable,SNEwTableName,ATableName) then
|
||||
If (ATableName<>'') then
|
||||
CurrentEditor.NewTable(ATableName);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -1212,7 +1216,7 @@ begin
|
||||
LI.Data:=RC;
|
||||
end;
|
||||
|
||||
Function TMainForm.GetConnectionName(Var AName : String) : Boolean;
|
||||
Function TMainForm.GetConnectionName(out AName : String) : Boolean;
|
||||
|
||||
Var
|
||||
OK : Boolean;
|
||||
@ -1301,10 +1305,11 @@ begin
|
||||
NewConnection(ET);
|
||||
end;
|
||||
|
||||
Function TMainForm.SelectEngineType(Var EngineName : String) : Boolean;
|
||||
Function TMainForm.SelectEngineType(out EngineName : String) : Boolean;
|
||||
|
||||
begin
|
||||
EngineName:='SQLDB';
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
<Filename Value="frmmain.pp"/>
|
||||
<ComponentName Value="MainForm"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<ResourceFilename Value="frmmain.lrs"/>
|
||||
<UnitName Value="frmmain"/>
|
||||
</Unit1>
|
||||
|
@ -207,9 +207,6 @@ end;
|
||||
|
||||
procedure TQueryPanel.CreateImageList;
|
||||
|
||||
Var
|
||||
i : Integer;
|
||||
|
||||
begin
|
||||
FIL:=TImageList.Create(Self);
|
||||
FIL.AddLazarusResource('qrybtn_execute');
|
||||
@ -263,32 +260,32 @@ procedure TQueryPanel.CreateButtons;
|
||||
L:=L+FToolBar.ButtonWidth+1;
|
||||
end;
|
||||
|
||||
Function NewSeparator(Var L : Integer) : TToolButton;
|
||||
|
||||
procedure NewSeparator(Var L : Integer);
|
||||
var
|
||||
B : TToolButton;
|
||||
begin
|
||||
Result:=NewButton(Nil,L);
|
||||
Result.Style:=tbsSeparator;
|
||||
Result.Width:=8;
|
||||
B:=NewButton(Nil,L);
|
||||
B.Style:=tbsSeparator;
|
||||
B.Width:=8;
|
||||
Dec(L,FToolBar.ButtonWidth-8);
|
||||
end;
|
||||
|
||||
Var
|
||||
B : TToolButton;
|
||||
L : integer;
|
||||
|
||||
begin
|
||||
L:=0;
|
||||
B:=NewButton(AExecute,L);
|
||||
B:=NewButton(ACloseQuery,L);
|
||||
NewButton(AExecute,L);
|
||||
NewButton(ACloseQuery,L);
|
||||
NewSeparator(L);
|
||||
B:=NewButton(APreviousQuery,L);
|
||||
B:=NewButton(ANextQuery,L);
|
||||
NewButton(APreviousQuery,L);
|
||||
NewButton(ANextQuery,L);
|
||||
NewSeparator(L);
|
||||
B:=NewButton(ALoadSQL,L);
|
||||
B:=NewButton(ASaveSQL,L);
|
||||
NewButton(ALoadSQL,L);
|
||||
NewButton(ASaveSQL,L);
|
||||
NewSeparator(L);
|
||||
B:=NewButton(AExport,L);
|
||||
B:=NewButton(ACreateCode,L);
|
||||
NewButton(AExport,L);
|
||||
NewButton(ACreateCode,L);
|
||||
end;
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user