mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 18:58:12 +02:00
* Possibility to add charset in SQL connection dialog
git-svn-id: trunk@20755 -
This commit is contained in:
parent
2bfcf73b02
commit
51437d9019
@ -1,15 +1,15 @@
|
||||
object SQLConnectionForm: TSQLConnectionForm
|
||||
Left = 549
|
||||
Height = 177
|
||||
Height = 215
|
||||
Top = 454
|
||||
Width = 314
|
||||
Width = 345
|
||||
ActiveControl = EHostName
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Connect to a database'
|
||||
ClientHeight = 177
|
||||
ClientWidth = 314
|
||||
LCLVersion = '0.9.25'
|
||||
ClientHeight = 215
|
||||
ClientWidth = 345
|
||||
LCLVersion = '0.9.27'
|
||||
object LEHostName: TLabel
|
||||
Left = 8
|
||||
Height = 23
|
||||
@ -58,35 +58,47 @@ object SQLConnectionForm: TSQLConnectionForm
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object LCharset: TLabel
|
||||
Left = 36
|
||||
Height = 21
|
||||
Top = 143
|
||||
Width = 46
|
||||
Alignment = taRightJustify
|
||||
AutoSize = False
|
||||
Caption = '&Charset'
|
||||
FocusControl = ECharset
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object EHostName: TEdit
|
||||
Left = 89
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 15
|
||||
Width = 216
|
||||
Width = 247
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 0
|
||||
end
|
||||
object EDatabaseName: TEdit
|
||||
Left = 89
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 43
|
||||
Width = 216
|
||||
Width = 247
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 1
|
||||
end
|
||||
object EUserName: TEdit
|
||||
Left = 89
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 74
|
||||
Width = 216
|
||||
Width = 247
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 2
|
||||
end
|
||||
object EPassword: TEdit
|
||||
Left = 89
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 105
|
||||
Width = 216
|
||||
Width = 247
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
EchoMode = emPassword
|
||||
PasswordChar = '*'
|
||||
@ -94,12 +106,17 @@ object SQLConnectionForm: TSQLConnectionForm
|
||||
end
|
||||
object BPButtons: TButtonPanel
|
||||
Left = 6
|
||||
Height = 42
|
||||
Top = 135
|
||||
Width = 302
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
Height = 38
|
||||
Top = 171
|
||||
Width = 333
|
||||
TabOrder = 4
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
end
|
||||
object ECharset: TEdit
|
||||
Left = 92
|
||||
Height = 24
|
||||
Top = 140
|
||||
Width = 84
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
||||
|
@ -34,10 +34,12 @@ type
|
||||
|
||||
TSQLConnectionForm = class(TForm)
|
||||
BPButtons: TButtonPanel;
|
||||
ECharset: TEdit;
|
||||
EHostName: TEdit;
|
||||
EDatabaseName: TEdit;
|
||||
EUserName: TEdit;
|
||||
EPassword: TEdit;
|
||||
LCharset: TLabel;
|
||||
LEUserName: TLabel;
|
||||
LEPassword: TLabel;
|
||||
LEHostName: TLabel;
|
||||
@ -55,6 +57,7 @@ type
|
||||
Property DatabaseName : String Index 1 Read GetString Write SetString;
|
||||
Property UserName : String Index 2 Read GetString Write SetString;
|
||||
Property Password : String Index 3 Read GetString Write SetString;
|
||||
Property Charset : String Index 4 Read GetString Write SetString;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -86,6 +89,7 @@ begin
|
||||
DatabaseName:=L.Values[KeyDatabaseName];
|
||||
UserName:=L.Values[KeyUserName];
|
||||
Password:=XorDecode(KeyEncode,L.Values[KeyPassword]);
|
||||
Charset:=L.Values[KeyCharset];
|
||||
end;
|
||||
if (ShowModal=mrOK) then
|
||||
begin
|
||||
@ -95,6 +99,7 @@ begin
|
||||
L.Values[KeyDatabaseName]:=DatabaseName;
|
||||
L.Values[KeyUserName]:=UserName;
|
||||
L.Values[KeyPassword]:=XorEncode(KeyEncode,Password);
|
||||
L.Values[KeyCharset]:=Charset;
|
||||
Result:=L.CommaText;
|
||||
end;
|
||||
finally
|
||||
@ -117,6 +122,7 @@ begin
|
||||
1 : Result:=EDatabaseName.Text;
|
||||
2 : Result:=EUserName.Text;
|
||||
3 : Result:=EPassword.Text;
|
||||
4 : Result:=ECharSet.Text;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -132,6 +138,7 @@ begin
|
||||
1 : EDatabaseName.Text:=AValue;
|
||||
2 : EUserName.Text:=AValue;
|
||||
3 : EPassword.Text:=AValue;
|
||||
4 : ECharset.Text:=Avalue;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user