45 |
|
{$X+} (* Extended syntax: On *) |
46 |
|
{$Z1} (* Minimum Enumeration Size: 1 Byte *) |
47 |
|
|
48 |
– |
|
48 |
|
interface |
49 |
|
|
50 |
|
uses |
51 |
< |
{Windows,} Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
51 |
> |
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
52 |
|
StdCtrls, ExtCtrls, IBDataBase, IB, IBXConst, LResources; |
53 |
|
|
54 |
|
type |
56 |
|
{ TIBDatabaseEditForm } |
57 |
|
|
58 |
|
TIBDatabaseEditForm = class(TForm) |
59 |
+ |
UseSystemDefaultCS: TCheckBox; |
60 |
+ |
GroupBox2: TGroupBox; |
61 |
|
Panel1: TPanel; |
62 |
|
DatabaseName: TEdit; |
63 |
|
Label1: TLabel; |
94 |
|
procedure SQLRoleChange(Sender: TObject); |
95 |
|
procedure CharacterSetChange(Sender: TObject); |
96 |
|
procedure TestClick(Sender: TObject); |
97 |
+ |
procedure UseSystemDefaultCSChange(Sender: TObject); |
98 |
|
private |
99 |
|
{ Private declarations } |
100 |
|
Database: TIBDatabase; |
245 |
|
st := GetParam('lc_ctype'); |
246 |
|
if (st <> '') then |
247 |
|
CharacterSet.ItemIndex := CharacterSet.Items.IndexOf(st); |
248 |
+ |
if Database.UseDefaultSystemCodePage then |
249 |
+ |
UseSystemDefaultCS.Checked := true |
250 |
+ |
else |
251 |
+ |
UseSystemDefaultCS.Checked := false; |
252 |
|
Result := False; |
253 |
|
if ShowModal = mrOk then |
254 |
|
begin |
263 |
|
end; |
264 |
|
Database.Params := DatabaseParams.Lines; |
265 |
|
Database.LoginPrompt := LoginPrompt.Checked; |
266 |
+ |
Database.UseDefaultSystemCodePage := UseSystemDefaultCS.Checked; |
267 |
|
Result := True; |
268 |
|
end; |
269 |
|
end; |
375 |
|
end; |
376 |
|
end; |
377 |
|
|
378 |
+ |
procedure TIBDatabaseEditForm.UseSystemDefaultCSChange(Sender: TObject); |
379 |
+ |
begin |
380 |
+ |
CharacterSet.Enabled := not UseSystemDefaultCS.Checked; |
381 |
+ |
if UseSystemDefaultCS.Checked then |
382 |
+ |
DeleteParam('lc_ctype') |
383 |
+ |
else |
384 |
+ |
if (CharacterSet.Text <> 'None') then {do not localize} |
385 |
+ |
AddParam('lc_ctype', CharacterSet.Text) |
386 |
+ |
end; |
387 |
+ |
|
388 |
|
|
389 |
|
end. |