mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 21:10:29 +01:00
* Setting for disabling mysql version check
This commit is contained in:
parent
75b9afdc92
commit
62e3936fab
48
components/sqldbrest/design/dlgeditorsettings.lfm
Normal file
48
components/sqldbrest/design/dlgeditorsettings.lfm
Normal file
@ -0,0 +1,48 @@
|
||||
object SchemaEditorSettingsDialog: TSchemaEditorSettingsDialog
|
||||
Left = 417
|
||||
Height = 214
|
||||
Top = 162
|
||||
Width = 408
|
||||
Caption = 'Schema editor settings'
|
||||
ClientHeight = 214
|
||||
ClientWidth = 408
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '3.99.0.0'
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
object GBConnections: TGroupBox
|
||||
Left = 0
|
||||
Height = 73
|
||||
Top = 0
|
||||
Width = 408
|
||||
Align = alTop
|
||||
Caption = 'Connections'
|
||||
ClientHeight = 56
|
||||
ClientWidth = 406
|
||||
TabOrder = 0
|
||||
object cbDisableVersionCheck: TCheckBox
|
||||
Left = 16
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 246
|
||||
Caption = 'Disable MySQL Library version check'
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object BPSettings: TButtonPanel
|
||||
Left = 6
|
||||
Height = 38
|
||||
Top = 170
|
||||
Width = 396
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
end
|
||||
end
|
||||
62
components/sqldbrest/design/dlgeditorsettings.pas
Normal file
62
components/sqldbrest/design/dlgeditorsettings.pas
Normal file
@ -0,0 +1,62 @@
|
||||
unit dlgeditorsettings;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ButtonPanel;
|
||||
|
||||
type
|
||||
|
||||
{ TSchemaEditorSettingsDialog }
|
||||
|
||||
TSchemaEditorSettingsDialog = class(TForm)
|
||||
BPSettings: TButtonPanel;
|
||||
cbDisableVersionCheck: TCheckBox;
|
||||
GBConnections: TGroupBox;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
Procedure LoadSettings;
|
||||
Procedure SaveSettings;
|
||||
end;
|
||||
|
||||
var
|
||||
SchemaEditorSettingsDialog: TSchemaEditorSettingsDialog;
|
||||
|
||||
implementation
|
||||
|
||||
uses schemaeditorconf;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TSchemaEditorSettingsDialog }
|
||||
|
||||
procedure TSchemaEditorSettingsDialog.FormShow(Sender: TObject);
|
||||
begin
|
||||
LoadSettings;
|
||||
end;
|
||||
|
||||
procedure TSchemaEditorSettingsDialog.LoadSettings;
|
||||
begin
|
||||
cbDisableVersionCheck.Checked:=SchemaSettings.DisableMySQLVersionCheck;
|
||||
end;
|
||||
|
||||
procedure TSchemaEditorSettingsDialog.SaveSettings;
|
||||
begin
|
||||
SchemaSettings.DisableMySQLVersionCheck:=cbDisableVersionCheck.Checked;
|
||||
if SchemaSettings.CurrentFile<>'' then
|
||||
SchemaSettings.SaveToFile(SchemaSettings.CurrentFile);
|
||||
end;
|
||||
|
||||
procedure TSchemaEditorSettingsDialog.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
if ModalResult=mrOK then
|
||||
SaveSettings;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
121
components/sqldbrest/design/schemaeditorconf.pas
Normal file
121
components/sqldbrest/design/schemaeditorconf.pas
Normal file
@ -0,0 +1,121 @@
|
||||
unit schemaeditorconf;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, inifiles;
|
||||
|
||||
Const
|
||||
DefaultDisableMySQLVersionCheck = False;
|
||||
|
||||
Type
|
||||
|
||||
{ TSchemaSettings }
|
||||
|
||||
TSchemaSettings = class(TPersistent)
|
||||
private
|
||||
FCurrentFile: String;
|
||||
FDisableMySQLVersionCheck: Boolean;
|
||||
Public
|
||||
Constructor Create; virtual;
|
||||
Procedure Reset; virtual;
|
||||
Class Function DefaultFileName : String;
|
||||
Procedure LoadFromIni(aIni : TCustomIniFile); virtual;
|
||||
Procedure SaveToIni(aIni : TCustomIniFile); virtual;
|
||||
Procedure LoadFromFile(const aFileName : String);
|
||||
Procedure SaveToFile(const aFileName : String);
|
||||
Property CurrentFile : String Read FCurrentFile;
|
||||
Published
|
||||
Property DisableMySQLVersionCheck : Boolean Read FDisableMySQLVersionCheck Write FDisableMySQLVersionCheck;
|
||||
end;
|
||||
|
||||
Function SchemaSettings : TSchemaSettings;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
SConnections = 'SchemaConnections';
|
||||
KeyDisableMySQLVersionCheck = 'DisableMySQLVersionCheck';
|
||||
|
||||
var
|
||||
_settings : TSchemaSettings;
|
||||
|
||||
Function SchemaSettings : TSchemaSettings;
|
||||
|
||||
begin
|
||||
if not assigned(_settings) then
|
||||
_settings:=TSchemaSettings.Create;
|
||||
Result:=_settings;
|
||||
end;
|
||||
|
||||
{ TSchemaSettings }
|
||||
|
||||
constructor TSchemaSettings.Create;
|
||||
begin
|
||||
Reset;
|
||||
end;
|
||||
|
||||
procedure TSchemaSettings.Reset;
|
||||
|
||||
begin
|
||||
DisableMySQLVersionCheck:=DefaultDisableMySQLVersionCheck;
|
||||
end;
|
||||
|
||||
class function TSchemaSettings.DefaultFileName: String;
|
||||
begin
|
||||
Result:=GetAppConfigFile(False);
|
||||
end;
|
||||
|
||||
procedure TSchemaSettings.LoadFromIni(aIni: TCustomIniFile);
|
||||
|
||||
begin
|
||||
With aIni do
|
||||
begin
|
||||
DisableMySQLVersionCheck:=ReadBool(SConnections,KeyDisableMySQLVersionCheck,DisableMySQLVersionCheck);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSchemaSettings.SaveToIni(aIni: TCustomIniFile);
|
||||
|
||||
begin
|
||||
With aIni do
|
||||
begin
|
||||
WriteBool(SConnections,KeyDisableMySQLVersionCheck,DisableMySQLVersionCheck);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSchemaSettings.LoadFromFile(const aFileName: String);
|
||||
|
||||
var
|
||||
Ini : TMemIniFile;
|
||||
|
||||
begin
|
||||
FCurrentFile:=AFileName;
|
||||
Ini:=TMemIniFile.Create(aFileName);
|
||||
try
|
||||
LoadFromIni(Ini);
|
||||
finally
|
||||
Ini.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSchemaSettings.SaveToFile(const aFileName: String);
|
||||
var
|
||||
Ini : TMemIniFile;
|
||||
|
||||
begin
|
||||
FCurrentFile:=AFileName;
|
||||
Ini:=TMemIniFile.Create(aFileName);
|
||||
try
|
||||
SaveToIni(Ini);
|
||||
Ini.UpdateFile;
|
||||
finally
|
||||
Ini.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Files Count="26">
|
||||
<Files Count="28">
|
||||
<Item1>
|
||||
<Filename Value="dlgrestfieldoptions.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
@ -127,6 +127,14 @@
|
||||
<Filename Value="frasqldbrestparamedit.pp"/>
|
||||
<UnitName Value="frasqldbrestparamedit"/>
|
||||
</Item26>
|
||||
<Item27>
|
||||
<Filename Value="schemaeditorconf.pas"/>
|
||||
<UnitName Value="schemaeditorconf"/>
|
||||
</Item27>
|
||||
<Item28>
|
||||
<Filename Value="dlgeditorsettings.pas"/>
|
||||
<UnitName Value="dlgeditorsettings"/>
|
||||
</Item28>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="3">
|
||||
|
||||
@ -8,11 +8,10 @@ unit sqldbrestschemadesigner;
|
||||
interface
|
||||
|
||||
uses
|
||||
dlgrestfieldoptions, dlgsqldbrestconnection, fraconnections,
|
||||
fraschematableseditor, frasqldbfullrestschemaaditor, frasqldbrestfieldedit,
|
||||
frasqldbrestresourceedit, fraSQLDBRestSchemaEditor, frmeditframedialog,
|
||||
sqldbschemaedittools, frasqldbresourcefields, build304,
|
||||
frasqldbresourceparams, frasqldbrestparamedit, LazarusPackageIntf;
|
||||
dlgrestfieldoptions, dlgsqldbrestconnection, fraconnections, fraschematableseditor, frasqldbfullrestschemaaditor,
|
||||
frasqldbrestfieldedit, frasqldbrestresourceedit, fraSQLDBRestSchemaEditor, frmeditframedialog, sqldbschemaedittools,
|
||||
frasqldbresourcefields, build304, frasqldbresourceparams, frasqldbrestparamedit, schemaeditorconf, dlgeditorsettings,
|
||||
LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ object BaseEditFrame: TBaseEditFrame
|
||||
Height = 240
|
||||
Top = 0
|
||||
Width = 320
|
||||
LCLVersion = '2.3.0.0'
|
||||
TabOrder = 0
|
||||
DesignLeft = 568
|
||||
DesignTop = 388
|
||||
|
||||
@ -58,6 +58,17 @@ Const
|
||||
Type
|
||||
TOnGetSQLConnection = Procedure (Sender : TObject; aConnName : String; Out aConn : TSQLConnection) of object;
|
||||
|
||||
{ TSchemaConnector }
|
||||
|
||||
TSchemaConnector = Class(TSQLConnector)
|
||||
private
|
||||
FDisableLibraryCheck: Boolean;
|
||||
Public
|
||||
Procedure CreateProxy; override;
|
||||
Property DisableLibraryCheck : Boolean Read FDisableLibraryCheck Write FDisableLibraryCheck;
|
||||
end;
|
||||
|
||||
|
||||
{ TBaseEditFrame }
|
||||
|
||||
TBaseEditFrame = Class(TFrame)
|
||||
@ -107,6 +118,7 @@ Type
|
||||
Protected
|
||||
Function CreateResourceList: TSQLDBRestResourceList; override;
|
||||
end;
|
||||
|
||||
{ TMySQLDBRestConnection }
|
||||
|
||||
TMySQLDBRestConnection = Class(TSQLDBRestConnection)
|
||||
@ -214,6 +226,19 @@ Resourcestring
|
||||
|
||||
implementation
|
||||
|
||||
uses typinfo, schemaeditorconf;
|
||||
|
||||
{ TSchemaConnector }
|
||||
|
||||
procedure TSchemaConnector.CreateProxy;
|
||||
begin
|
||||
inherited CreateProxy;
|
||||
if pos('mysql',LowerCase(Self.ConnectorType))>0 then
|
||||
if DisableLibraryCheck and IsPublishedProp(Proxy,'SkipLibraryVersionCheck') then
|
||||
SetOrdProp(Proxy,'SkipLibraryVersionCheck',Ord(True));
|
||||
end;
|
||||
|
||||
|
||||
{$IFNDEF HAS_PARAMS}
|
||||
|
||||
{ TSQLDBRestResourceHelper }
|
||||
@ -294,7 +319,8 @@ begin
|
||||
Result:=C.SingleConnection;
|
||||
if Result=Nil then
|
||||
begin
|
||||
Result:=TSQLConnector.Create(Self.Owner);
|
||||
Result:=TSchemaConnector.Create(Self.Owner);
|
||||
TSchemaConnector(Result).DisableLibraryCheck:=SchemaSettings.DisableMySQLVersionCheck;
|
||||
Result.Transaction:=TSQLTransaction.Create(Self.Owner);
|
||||
Result.Transaction.DataBase:=Result;
|
||||
C.ConfigConnection(Result);
|
||||
@ -378,10 +404,11 @@ end;
|
||||
|
||||
procedure TMySQLDBRestConnection.CreateConnection;
|
||||
|
||||
|
||||
begin
|
||||
FreeAndNil(FMyConnection);
|
||||
FMyConnection:=TSQLConnector.Create(Nil);
|
||||
FMyConnection:=TSchemaConnector.Create(Nil);
|
||||
if SchemaSettings.DisableMySQLVersionCheck then
|
||||
TSchemaConnector(FMyConnection).DisableLibraryCheck:=SchemaSettings.DisableMySQLVersionCheck;
|
||||
FMyTransaction:=TSQLTransaction.Create(nil);
|
||||
FMyConnection.Transaction:=FMyTransaction;
|
||||
ConfigConnection(FMyConnection);
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 487
|
||||
Height = 408
|
||||
Height = 360
|
||||
Top = 298
|
||||
Width = 755
|
||||
ActiveControl = fraEditor.fraConn.TVConnections
|
||||
Caption = 'REST Schema designer'
|
||||
ClientHeight = 408
|
||||
ClientHeight = 360
|
||||
ClientWidth = 755
|
||||
Menu = MMain
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
Position = poDesktopCenter
|
||||
SessionProperties = 'Height;Left;Top;Width;MRUSchema.Recent'
|
||||
LCLVersion = '2.3.0.0'
|
||||
LCLVersion = '3.99.0.0'
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
inline fraEditor: TSchemaEditorFrame
|
||||
Height = 408
|
||||
Height = 360
|
||||
Width = 755
|
||||
Align = alClient
|
||||
ClientHeight = 408
|
||||
ClientHeight = 360
|
||||
ClientWidth = 755
|
||||
DesignLeft = 546
|
||||
DesignTop = 298
|
||||
inherited fraConn: TfraConnections
|
||||
Height = 408
|
||||
Height = 360
|
||||
Width = 203
|
||||
Align = alLeft
|
||||
ClientHeight = 408
|
||||
ClientHeight = 360
|
||||
ClientWidth = 203
|
||||
inherited TVConnections: TTreeView
|
||||
Height = 352
|
||||
Height = 304
|
||||
Top = 56
|
||||
Width = 203
|
||||
end
|
||||
@ -47,23 +47,23 @@ object MainForm: TMainForm
|
||||
end
|
||||
end
|
||||
inherited splConnection: TSplitter
|
||||
Height = 408
|
||||
Height = 360
|
||||
end
|
||||
inherited fraSchema: TSQLDBRestSchemaEditorFrame
|
||||
Left = 208
|
||||
Height = 408
|
||||
Height = 360
|
||||
Width = 547
|
||||
Align = alClient
|
||||
ClientHeight = 408
|
||||
ClientHeight = 360
|
||||
ClientWidth = 547
|
||||
TabOrder = 2
|
||||
inherited PResources: TPanel
|
||||
Height = 376
|
||||
Height = 328
|
||||
Width = 170
|
||||
ClientHeight = 376
|
||||
ClientHeight = 328
|
||||
ClientWidth = 170
|
||||
inherited TVResources: TTreeView
|
||||
Height = 352
|
||||
Height = 304
|
||||
Width = 170
|
||||
end
|
||||
inherited LResources: TLabel
|
||||
@ -72,11 +72,11 @@ object MainForm: TMainForm
|
||||
end
|
||||
inherited Splitter1: TSplitter
|
||||
Left = 170
|
||||
Height = 376
|
||||
Height = 328
|
||||
end
|
||||
inherited PDock: TPanel
|
||||
Left = 175
|
||||
Height = 376
|
||||
Height = 328
|
||||
Width = 372
|
||||
end
|
||||
inherited Panel1: TPanel
|
||||
@ -121,15 +121,15 @@ object MainForm: TMainForm
|
||||
Category = 'Schema'
|
||||
Caption = 'Load schema'
|
||||
ImageIndex = 1
|
||||
OnExecute = ALoadSchemaExecute
|
||||
ShortCut = 16463
|
||||
OnExecute = ALoadSchemaExecute
|
||||
end
|
||||
object ASaveSchema: TAction
|
||||
Category = 'Schema'
|
||||
Caption = 'Save schema'
|
||||
ImageIndex = 0
|
||||
OnExecute = ASaveSchemaExecute
|
||||
ShortCut = 16467
|
||||
OnExecute = ASaveSchemaExecute
|
||||
end
|
||||
object ASaveSchemaAs: TAction
|
||||
Category = 'Schema'
|
||||
@ -141,15 +141,20 @@ object MainForm: TMainForm
|
||||
Category = 'Schema'
|
||||
Caption = 'New schema'
|
||||
ImageIndex = 5
|
||||
OnExecute = ASchemaNewExecute
|
||||
ShortCut = 16462
|
||||
OnExecute = ASchemaNewExecute
|
||||
end
|
||||
object aQuit: TAction
|
||||
Category = 'File'
|
||||
Caption = 'Quit'
|
||||
ImageIndex = 6
|
||||
OnExecute = aQuitExecute
|
||||
ShortCut = 16465
|
||||
OnExecute = aQuitExecute
|
||||
end
|
||||
object AShowSettings: TAction
|
||||
Caption = 'Settings...'
|
||||
ImageIndex = 7
|
||||
OnExecute = AShowSettingsExecute
|
||||
end
|
||||
end
|
||||
object MMain: TMainMenu
|
||||
@ -182,6 +187,9 @@ object MainForm: TMainForm
|
||||
object MIRecent: TMenuItem
|
||||
Caption = 'Recent schemas'
|
||||
end
|
||||
object MIShowSettings: TMenuItem
|
||||
Action = AShowSettings
|
||||
end
|
||||
object MISep2: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
@ -220,44 +228,51 @@ object MainForm: TMainForm
|
||||
Left = 423
|
||||
Top = 63
|
||||
Bitmap = {
|
||||
4C7A0700000018000000180000009E0400000000000078DAED5A496B1441148E
|
||||
1BEEA207F77D43DC8299AA9A31C643CE2EE0424EA2E2C15F20AE88C683181114
|
||||
D499EA4ED0685091A8278F8231F1E2410F229A38DD93287117DC41F432BEEA9E
|
||||
9EE999744FBA7AAAB2982A2866BAA8FE5EF7ABAA575F7DFDCACA54095A0C0DA7
|
||||
C35574502E3E548A6B83E2877FDFE2EF513A7EF1F710825FE4FEBEC22FB52A7C
|
||||
E1F87FD8DCEEBC58319F55434787A0EDAF38FC9EEBC6D0C86151F85D7132A3B0
|
||||
EF0B1DCD9489DF71A162D660F18F33BEC6E58AA956153EBE8363FEABA2380A2F
|
||||
270989DF1ED646207CB68635FC2C28EFE1C567FD4C5A3E0D9EFF39AF0D9EF5D9
|
||||
D9109B6EE8F8058F0DDEF56F34C4E6409BC9CB1179E20BC4D3C5D0DE1D24F6C8
|
||||
8E6D430CBF1BE6CF91543D21AF13ABA7B02A10FF96713E36494E7C40D7D2B565
|
||||
C359FFA446B6415B2BECF75FEC8A5B4D1ADD1A16DFD4F0BBE7F19513EC79898F
|
||||
FBF725C7423D3FF8DB7A6E1D6DECAD6F4AC31B78F1533A5A6DF5A3F841C1F3D6
|
||||
D935AF7F0B2FFE3B1D8DCBF4FBE975E662FF5DFD7FF0E27735568FC9C727751E
|
||||
DCAE2E2C7E672252EEED1FCFDAD2D7E3CBB55642CC4FDE925B5FF877A6165D5F
|
||||
43B1B0B80963D1242A7616CCF5CD2C26898CFDEE7B007B57266E06C6E7D53BEC
|
||||
B31EBA2B0B5F94DE22EBFC251A5FD4757FE10F28FFEBF8F6631D8D72F711E89F
|
||||
9B2DB5D5230B3144E1A79B6B46D8EDB9739210FFB87CE2ECE7D9789188A052F0
|
||||
4D0D35669FDBC51544AD6FB74FBCB81DFCDE3775B43B9D2E1B5604E7AA1717CE
|
||||
C7EFC1A5F26A92922B7E36329CE9139C7B6A0ADBE119EF647DEFB2E168722625
|
||||
7B19EFB16C68648FFF38404CA778A7E7F8C05EE5F067C746CF3DC1EAFBC81B9F
|
||||
34B33374F071C9E7705D8D6B2667F0BFC9D631062BBEE23F8AFF28FEA3F88F64
|
||||
FF77C35EB88F69066C0DB3790AFFD78BF2CFD3A6F2F1A5C4D420FE4D52BCDDD4
|
||||
489B5BFF6167D612FCF39EED4F99EB73BEFBBB86CE84C187FB8E3ACFEDD3FF87
|
||||
C50D1817D0D1165EFF39FA86ED138B077C74F802D4EF663D596752BC2AD3DEC2
|
||||
CB7FBACF568ECDE93380514F56025E95ADDF462BAD78D7105D08D7AF99BD22FC
|
||||
E76D92463615B63B76E1FF2F86D14ED72EB0AECF2F196D69DED6F755FCCA4FFF
|
||||
E98DFFBCA438EAF60FF0D12E98F3F3581BFB85B6CE62FA4F50FEC3F62D178EC9
|
||||
7C93D5D145E93F1A3A215DFFC9AE2FA5FFF4DDB73595FF13FA7D55FE8FCACFE9
|
||||
8FFC1F1D1F61DF313D6368822C629A4A587C88C1077A9B4B4C973028B91E2A3F
|
||||
27C377FCFBDBEB96D980F3D20D5E7CBFEF8A5EB1C1D157B8FCA3E3FD7EBA43BE
|
||||
D6870E858C9F56FE0FCB637A492B67839F77F8EA40456CF0CCC17C1D285FCB32
|
||||
757C5AD0FCBF9AD581283995B34DDA9C6FA0220B9BC7C015EF593ED4F01388D5
|
||||
2745DBE8B8543531A9E1877EDF0E85ECE36CAD73E68DFC7F1C4562FE4F96DF4B
|
||||
CAFF61392D3A3664E6FFF0E6CDF0E25B67983899CB6B835B1FB36DA464E6FF98
|
||||
F1C81295FFA3F015BEC21FEAF8AA28FD479DAF070E3E9CC3A8A3C74BC0BF68F1
|
||||
9F9C1E2F1AFFAB93AF91D2624B814FBF91E0FFCF4ECEA9634394DEE579868C47
|
||||
960F34FCDEFC93AC276BECFB632BE0FA83307C8ADF7624F032DBF751CCC65BEC
|
||||
F8A2B8E4F9297B7DA9F8A6388AD4F20F1C8E1DA3
|
||||
4C7A080000001800000018000000810500000000000078DAED5B4B6F1C451036
|
||||
2F25E111C10102E10D460842AC78BB7B1713103EF3907828A7288938F00B200F
|
||||
A200E680304202E5B1DB33B6C0240284029C382261122E1CE0805062EFCCAC97
|
||||
C824902005BC20A17059AAE6B13BB33B339E9EED5EDBB85B6A79A65DFD554F75
|
||||
75757575EDC0802E598B6DD066BE4AF6AAC587CAE95856FCFCDF9BFE1DBDE3A7
|
||||
7F8714FC94FEFDC2EFB56A7CE9F89750B7E78E0CDF89D536C93E68FB571E7EF7
|
||||
BAB10DF68A2CFC7A99DDDC497BDA24B7A8C49F3D3CBC71A5C827985FFB83E11B
|
||||
DD2A7D7E5786FEEBA27D14519F2427FE4C5E1E99F0710D1BF4A7AC7E8F283ED2
|
||||
397CE82618FF29511E22EB736EB2B4C136E969111EA2EBDF9E2CDD066D8EA88F
|
||||
28625FC09EDE0BEDF3596C8F6ADBB6CAF0E7417FF6D726183B53D97C035689F8
|
||||
9FD9874AEBD5D807F251736CE072A4B70CF61CB49D80FDFEA257E90987179FCD
|
||||
8BEF18F4DCA9F2A66B3DBDA4AF27D3B2D7728D1FE4ED8EDB244F2E465B33E813
|
||||
A2F835936C76E938FDA663BCE35E8DD04F8BE29F33C9D53EDD5F71672E7C0ED1
|
||||
3744F1EB53A36BA3F86C3CC6B71BCF8B3F57290CC5CB27B64EF77B7E85D64A0E
|
||||
FD142DEDF545FFF16BEAFA5A8D05ED26CCC53159B6B343D79F469B24D3F687FB
|
||||
00F64EDF6E66C6178D7778673DF2A52A7C59F11655E72FD9F8B2DE970A7F59C9
|
||||
DFA49F7F6F92ABC23412E5F3E9F4D8E8959D18B2F09BC7B75DE1B5B7CF4952E4
|
||||
139249B09FB7EC45A5407AC1770C32D51A77C85790B5BEC33289F3EDE0EFD78E
|
||||
4976359B0397A5E01C8DF385A3F85DBE54A45A9C7D98C4C3F7992EC0B9675B67
|
||||
3B8CF18B96EC433C82989CC3D98BE8F7B83C0CF642F23C804DE77447ECFCC05E
|
||||
15F8CF018FEE3DC1A5FD2E1E9F1DC73374F67989FA70F5A92DD7FBF87FAA8E63
|
||||
AC547CEDFF68FF47FB3FDAFF512CFF79D80B5FC29801AE61D453787E54967C7E
|
||||
3C36744D2F36358B7C2D4E9F770C76321CFFC1336B0FF2F915F727FFFDBDC4FD
|
||||
DD20EFE4C1877E07827127D0375CDF007D01933C232ABF20BEE1C9C4F503CE07
|
||||
FE02D40567823DE270FA90DF3E2DEAFFCCBF3BB2AE1D9F018C09B609F0B67AF1
|
||||
DBE2886BEF268B77C3FB19E497E2FF9CB578E1A9CEF6802F3CFF8D1833FCE1BB
|
||||
DCF743836BDC98B77BBF4A7F4E8AFF2CE6FF54392D86E503FE681D74FE0E6CC3
|
||||
BFD0369716FFC9EAFFE0BE15C2715036AD38BAACF88F41DE501EFF69AD2F1DFF
|
||||
E9DFDD9ACEFFC9FDBD3AFF47E7E72C45FE8F49F7E33D66AC0DADB07B30A69217
|
||||
1F6CF09EC57409E31236671FE7CACFF1FD9D647A6FDD220F382F7D228A9F74AF
|
||||
18671B82F88A907C4CBA3B29EE108DF5917D39EDA79BFF83794C553E722BC879
|
||||
7B621C288587880E46E340D1589663D2B725E9FFD1561C88B3B7DABCD9C9E00E
|
||||
5466413D065FF12B578606FD016CF59BB279CCBEBFF53ACBA0DF26DD1D4AD9C7
|
||||
71AD0BE68DFCFF7C1485F93F2DFF5E51FE0FE6B498D45699FF239A37238AEF9E
|
||||
61CAEC76511EC2F1318F474D65FE8F532E0CEAFC1F8DAFF135FE6AC7D745C77F
|
||||
F4F97AF9E0C3398C07F17805F8475CFFA71D8F978DFF4790AF51334AF7813FFD
|
||||
8B02F9FF1EE49C063C64C5BB62CF90E5C203CB0D7F31F958136C8BD7BFF420BC
|
||||
FF260D9FD3B3B3157ABF27FB22C5F9963BBFA4AC583F55AF2F6DDFB48FA2CB0A
|
||||
28D6C1C1353627A358F159367ED5200702FDAEFA77F0BD14DC57AB06DD5D9F7A
|
||||
7CAD75B0B81EC6DDFE3D013C631BFE0F69D2722693B0C1F62EF836DE01BC46B7
|
||||
ED270DF77F9E9D5E10E1816312B509D8272B3E7E777B6C99F63107FB64D71557
|
||||
DE8D50FF4B16277B660E0F6FC46A61BC9C63CCBE2D2BEC9365DC96495E8DCCA5
|
||||
97B3D11587B43AF34BA10FEA559AEE562B85C7E2BE1FC7DC493B93F0FB68C458
|
||||
2A7C4F9F611D65918FF71B6921F9A4CE2FF0E8757EFBA59FAAD7976AFBE0DD71
|
||||
9002F47F398B7D43DAE5669FFBBDBFACD6F21F5D4208CA
|
||||
}
|
||||
end
|
||||
object SDSchema: TSaveDialog
|
||||
|
||||
@ -13,6 +13,7 @@ type
|
||||
{ TMainForm }
|
||||
|
||||
TMainForm = class(TForm)
|
||||
AShowSettings: TAction;
|
||||
aQuit: TAction;
|
||||
ASchemaNew: TAction;
|
||||
ASaveSchemaAs: TAction;
|
||||
@ -23,6 +24,7 @@ type
|
||||
alMain: TActionList;
|
||||
ILMain: TImageList;
|
||||
IPSMain: TIniPropStorage;
|
||||
MIShowSettings: TMenuItem;
|
||||
MIRecent: TMenuItem;
|
||||
MFile: TMenuItem;
|
||||
MIReadConnections: TMenuItem;
|
||||
@ -49,6 +51,7 @@ type
|
||||
procedure ASaveSchemaAsExecute(Sender: TObject);
|
||||
procedure ASaveSchemaExecute(Sender: TObject);
|
||||
procedure ASchemaNewExecute(Sender: TObject);
|
||||
procedure AShowSettingsExecute(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure IPSMainRestoreProperties(Sender: TObject);
|
||||
@ -65,6 +68,7 @@ type
|
||||
Procedure LoadSchemaFile(const aFileName : String);
|
||||
Procedure SaveSchemaFile(const aFileName : String);
|
||||
Procedure SetCaption;
|
||||
procedure ShowSettingsForm;
|
||||
public
|
||||
|
||||
end;
|
||||
@ -74,10 +78,9 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses sqldbrestbridge, sqldbrestini;
|
||||
uses dlgeditorsettings,sqldbrestbridge, sqldbrestini;
|
||||
|
||||
resourcestring
|
||||
SSchemaChanged = 'Schema changed';
|
||||
@ -222,6 +225,22 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.AShowSettingsExecute(Sender: TObject);
|
||||
begin
|
||||
ShowSettingsForm;
|
||||
end;
|
||||
|
||||
procedure TMainForm.ShowSettingsForm;
|
||||
|
||||
begin
|
||||
With TSchemaEditorSettingsDialog.Create(Self) do
|
||||
try
|
||||
ShowModal;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
begin
|
||||
CanClose:=CheckSave;
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<SaveClosedFiles Value="False"/>
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
<SaveJumpHistory Value="False"/>
|
||||
<SaveFoldState Value="False"/>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="schemaeditor"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -29,7 +29,6 @@
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
|
||||
@ -7,11 +7,12 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, frmMain, schemaconns;
|
||||
Forms, frmMain, schemaeditorconf, schemaconns;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
SchemaSettings.LoadFromFile(TSchemaSettings.DefaultFileName);
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
|
||||
Binary file not shown.
@ -124,6 +124,7 @@ uses
|
||||
frmsqldbrestdispatchini,
|
||||
frmsqldbrestselecttables,
|
||||
dlgeditsqldbrestschema,
|
||||
schemaeditorconf,
|
||||
reslazsqldbrest;
|
||||
|
||||
Var
|
||||
@ -150,7 +151,7 @@ begin
|
||||
TSQLDBRestBusinessProcessor,'ResourceName',TSQLDBRestResourceNamePropertyEditor);
|
||||
RegisterComponentEditor(TSQLDBRESTSchema,TSQLDBRESTSchemaComponentEditor);
|
||||
RegisterComponentEditor(TSQLDBRestDispatcher,TSQLDBRestDispatcherComponentEditor);
|
||||
|
||||
SchemaSettings.LoadFromFile(IncludeTrailingPathDelimiter(LazarusIDE.GetPrimaryConfigPath)+'schemaeditor.ini');
|
||||
FileDescriptorRestModule:=TFileRestModule.Create;
|
||||
RegisterProjectFileDescriptor(FileDescriptorRestModule);
|
||||
FormEditingHook.RegisterDesignerBaseClass(TSQLDBRestModule);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user