ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/design/IBDSDialogs.pas
(Generate patch)

Comparing ibx/trunk/design/IBDSDialogs.pas (file contents):
Revision 44 by tony, Tue May 17 08:14:52 2016 UTC vs.
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC

# Line 38 | Line 38 | uses
38   {$ELSE}
39    unix,
40   {$ENDIF}
41 <  SysUtils, Classes, Graphics, Controls,
42 <  Forms, StdCtrls, ExtCtrls, IB, IBDialogs;
41 >  SysUtils, Classes, Graphics, Controls, Dialogs,
42 >  Forms, StdCtrls, ExtCtrls, Buttons, IB, IBDialogs;
43  
44   type
45
45    { TIBDSLCLInterface }
46  
47    TIBDSLCLInterface = class(TIBLCLInterface)
48    private
50    FSetCursorDepth: integer;
49      function GetProjectName: string;
50      procedure GetDatabaseName(DefaultDBName, DefaultUserName: string; var DBName: string;
51        var UserName: string);
# Line 79 | Line 77 | type
77      Bevel1: TBevel;
78      Button1: TButton;
79      Button2: TButton;
80 +    Label1: TLabel;
81 +    OpenDialog1: TOpenDialog;
82      ProjectName: TLabel;
83 +    SpeedButton1: TSpeedButton;
84      TargetCaption: TLabel;
85      Label2: TLabel;
86      Label3: TLabel;
87      Password: TEdit;
88      UserName: TEdit;
89      DatabaseName: TEdit;
90 +    procedure SpeedButton1Click(Sender: TObject);
91    private
92      { private declarations }
93    public
# Line 93 | Line 95 | type
95    end;
96  
97  
98 + { TIBXDSLoginDlg }
99 +
100 + procedure TIBXDSLoginDlg.SpeedButton1Click(Sender: TObject);
101 + begin
102 +  OpenDialog1.InitialDir := ExtractFileDir(DatabaseName.Text);
103 +  if OpenDialog1.Execute then
104 +    DatabaseName.Text := OpenDialog1.FileName;
105 + end;
106 +
107 +
108   function TIBDSLCLInterface.GetProjectName: string;
109   begin
110    Result := ChangeFileExt(ExtractFileName(LazarusIDE.ActiveProject.MainFile.FileName),'');
# Line 175 | Line 187 | end;
187   function TIBDSLCLInterface.LoginDialogEx(var ADatabaseName: string;
188    var AUserName, APassword: string; NameReadOnly: Boolean): Boolean;
189   begin
190 + try
191    with TIBXDSLoginDlg.Create(Application) do
192    try
193      ProjectName.Caption := GetProjectName;
# Line 197 | Line 210 | begin
210    finally
211      Free;
212    end;
213 + except On E:Exception do
214 +   MessageDlg('Unable to Load Login Dialog ' + E.Message,mtError,[mbOK],0);
215 + end;
216   end;
217  
218   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines