Importación inicial

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.MyDAC/internal@5 3346b395-6983-df4c-9436-dd2a26bad8f4
This commit is contained in:
David Arranz 2010-09-16 18:44:43 +00:00
parent 7f7e8ae3e1
commit 16ab57b421
77 changed files with 441 additions and 0 deletions

BIN
5.80.0.50/1/CLRClasses.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRAccess.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRBatchMove.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/CRGrid.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRGrid.res Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRParser.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRVio.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRVioTcp.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRVioTcpSSL.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/CRXml.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/DAConsts.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/DADump.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/DALoader.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/DAScript.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/DBAccess.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/DBAccess.res Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/DacVcl.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MTSCall.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MemDS.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MemData.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MemUtils.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MyAccess.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MyBackup.dcu Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MyCall.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MyClasses.dcu Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,156 @@
object MyConnectForm: TMyConnectForm
Left = 368
Top = 255
ActiveControl = edUsername
BorderIcons = []
BorderStyle = bsDialog
Caption = 'Connect'
ClientHeight = 243
ClientWidth = 291
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
Scaled = False
PixelsPerInch = 96
TextHeight = 13
object Panel: TPanel
Left = 8
Top = 8
Width = 273
Height = 189
Anchors = [akLeft, akTop, akBottom]
BevelInner = bvRaised
BevelOuter = bvLowered
FullRepaint = False
TabOrder = 0
object lbUsername: TLabel
Left = 16
Top = 20
Width = 73
Height = 13
AutoSize = False
Caption = 'Username'
Layout = tlCenter
end
object lbPassword: TLabel
Left = 16
Top = 54
Width = 73
Height = 13
AutoSize = False
Caption = 'Password'
Layout = tlCenter
end
object lbServer: TLabel
Left = 16
Top = 88
Width = 73
Height = 13
AutoSize = False
Caption = 'Server'
Layout = tlCenter
end
object lbPort: TLabel
Left = 16
Top = 122
Width = 73
Height = 13
AutoSize = False
Caption = 'Port'
Layout = tlCenter
end
object lbDatabase: TLabel
Left = 16
Top = 156
Width = 73
Height = 13
AutoSize = False
Caption = 'Database'
Layout = tlCenter
end
object edUsername: TEdit
Left = 104
Top = 16
Width = 153
Height = 21
AutoSelect = False
MaxLength = 32767
TabOrder = 0
OnExit = edExit
end
object edPassword: TEdit
Left = 104
Top = 50
Width = 153
Height = 21
AutoSelect = False
MaxLength = 32767
PasswordChar = '*'
TabOrder = 1
OnExit = edExit
end
object edServer: TComboBox
Left = 104
Top = 84
Width = 153
Height = 21
DropDownCount = 10
ItemHeight = 13
TabOrder = 2
OnDropDown = edServerDropDown
OnExit = edExit
end
object edPort: TEdit
Left = 104
Top = 118
Width = 153
Height = 21
TabOrder = 3
OnExit = edExit
end
object edDatabase: TComboBox
Left = 104
Top = 152
Width = 153
Height = 21
DropDownCount = 10
ItemHeight = 13
TabOrder = 4
OnDropDown = edDatabaseDropDown
OnExit = edExit
end
end
object btConnect: TButton
Left = 52
Top = 209
Width = 89
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Connect'
Default = True
TabOrder = 1
OnClick = btConnectClick
end
object btCancel: TButton
Left = 148
Top = 209
Width = 89
Height = 25
Anchors = [akLeft, akBottom]
Cancel = True
Caption = 'Cancel'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ModalResult = 2
ParentFont = False
TabOrder = 2
end
end

View File

@ -0,0 +1,285 @@
//////////////////////////////////////////////////
// Data Access Components for MySQL
// Copyright © 1998-2009 Devart. All right reserved.
// Connect Form
//////////////////////////////////////////////////
{$IFNDEF CLR}
unit MyConnectForm;
{$ENDIF}
interface
{$IFNDEF LINUX}
{$DEFINE MSWINDOWS}
{$ENDIF}
{$IFDEF LINUX}
{$IFNDEF FPC}
{$DEFINE KYLIX}
{$ENDIF}
{$ENDIF}
uses
{$IFDEF MSWINDOWS}
Windows, Messages,
{$ENDIF}
{$IFNDEF KYLIX}
SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
{$ELSE}
SysUtils, Types, Classes, QGraphics, QControls, QForms, QDialogs, QStdCtrls,
QExtCtrls,
{$ENDIF}
{$IFDEF FPC}
LResources,
{$ENDIF}
MemUtils, DBAccess, MyCall, MyAccess, TypInfo;
type
TMyConnectForm = class(TForm)
Panel: TPanel;
lbUsername: TLabel;
lbPassword: TLabel;
lbServer: TLabel;
edUsername: TEdit;
btConnect: TButton;
btCancel: TButton;
edPassword: TEdit;
edServer: TComboBox;
lbPort: TLabel;
lbDatabase: TLabel;
edPort: TEdit;
edDatabase: TComboBox;
procedure btConnectClick(Sender: TObject);
procedure edServerDropDown(Sender: TObject);
procedure edDatabaseDropDown(Sender: TObject);
procedure edExit(Sender: TObject);
private
FConnectDialog: TCustomConnectDialog;
FRetries: integer;
FOldCreateOrder: boolean;
FRetry: boolean;
FListGot: boolean;
procedure SetConnectDialog(Value: TCustomConnectDialog);
protected
procedure DoInit; virtual;
procedure DoConnect; virtual;
public
published
property ConnectDialog: TCustomConnectDialog read FConnectDialog write SetConnectDialog;
property OldCreateOrder: boolean read FOldCreateOrder write FOldCreateOrder;
end;
implementation
{$IFNDEF FPC}
{$IFDEF IDE}
{$R *.dfm}
{$ENDIF}
{$IFNDEF LINUX}
{$R MyConnectForm.dfm}
{$ELSE}
{$R *.xfm}
{$ENDIF}
{$ENDIF}
procedure TMyConnectForm.DoInit;
var
PropInfo: PPropInfo;
VisibleEditors: integer;
StepH, DeltaH, T: integer;
begin
FRetry := False;
FRetries := FConnectDialog.Retries;
Caption := FConnectDialog.Caption;
FListGot := False;
with FConnectDialog do begin
lbUsername.Caption := UsernameLabel;
lbPassword.Caption := PasswordLabel;
lbServer.Caption := ServerLabel;
btConnect.Caption := ConnectButton;
btCancel.Caption := CancelButton;
edUsername.Text := Connection.Username;
edPassword.Text := Connection.Password;
edServer.Text := Connection.Server;
if (edUsername.Text <> '') and (edPassword.Text = '') then
ActiveControl := edPassword;
end;
VisibleEditors := 3;
PropInfo := GetPropInfo(FConnectDialog, 'PortLabel');
if PropInfo <> nil then
lbPort.Caption := GetStrProp(FConnectDialog, PropInfo);
PropInfo := GetPropInfo(FConnectDialog, 'DatabaseLabel');
if PropInfo <> nil then
lbDatabase.Caption := GetStrProp(FConnectDialog, PropInfo);
PropInfo := GetPropInfo(FConnectDialog, 'ShowPort');
if PropInfo <> nil then begin
lbPort.Visible := Boolean(GetOrdProp(FConnectDialog, PropInfo));
edPort.Visible := lbPort.Visible;
if edPort.Visible then
Inc(VisibleEditors);
end;
StepH := edPassword.Top - edUsername.Top;
PropInfo := GetPropInfo(FConnectDialog, 'ShowDatabase');
if PropInfo <> nil then begin
lbDatabase.Visible := Boolean(GetOrdProp(FConnectDialog, PropInfo));
edDatabase.Visible := lbDatabase.Visible;
if edDatabase.Visible then begin
Inc(VisibleEditors);
if edPort.Visible then
T := edPort.Top
else
T := edServer.Top;
edDatabase.Top := T + StepH;
lbDatabase.Top := edDatabase.Top + (lbUsername.Top - edUsername.Top);
end;
end;
DeltaH := ClientHeight - Panel.Height;
ClientHeight := StepH * VisibleEditors + 19 + DeltaH;
if FConnectDialog.Connection is TCustomMyConnection then begin
edDatabase.Text := TCustomMyConnection(FConnectDialog.Connection).Database;
end;
if FConnectDialog.Connection.ClassName = 'TMyEmbConnection' then begin
lbServer.Enabled := False;
edServer.Enabled := False;
lbPort.Enabled := False;
edPort.Enabled := False;
end
else begin
lbServer.Enabled := True;
edServer.Enabled := True;
lbPort.Enabled := True;
edPort.Enabled := True;
end;
if FConnectDialog.Connection is TMyConnection then begin
edPort.Text := IntToStr(TMyConnection(FConnectDialog.Connection).Port);
end;
end;
procedure TMyConnectForm.DoConnect;
begin
try
edExit(nil);
FConnectDialog.Connection.PerformConnect(FRetry);
ModalResult := mrOk;
except
on E: EDAError do begin
Dec(FRetries);
FRetry := True;
if FRetries = 0 then
ModalResult:= mrCancel;
case E.ErrorCode of
ER_ACCESS_DENIED_ERROR: ActiveControl := edUsername;
CR_UNKNOWN_HOST: ActiveControl := edServer;
end;
raise;
end
else
raise;
end;
end;
procedure TMyConnectForm.SetConnectDialog(Value: TCustomConnectDialog);
begin
FConnectDialog := Value;
DoInit;
end;
procedure TMyConnectForm.btConnectClick(Sender: TObject);
begin
DoConnect;
end;
procedure TMyConnectForm.edServerDropDown(Sender: TObject);
var
OldCursor: TCursor;
List: _TStringList;
begin
if FListGot then
Exit;
FListGot := True;
OldCursor := Screen.Cursor;
Screen.Cursor := crSQLWait;
List := _TStringList.Create;
try
FConnectDialog.GetServerList(List);
AssignStrings(List, edServer.Items);
finally
List.Free;
Screen.Cursor := OldCursor;
end;
end;
procedure TMyConnectForm.edDatabaseDropDown(Sender: TObject);
var
OldCursor: TCursor;
OldLoginPrompt: boolean;
List: _TStringList;
begin
if not (FConnectDialog.Connection is TCustomMyConnection) then
Exit;
edDatabase.Items.Clear;
OldLoginPrompt := FConnectDialog.Connection.LoginPrompt;
OldCursor := Screen.Cursor;
Screen.Cursor := crSQLWait;
List := _TStringList.Create;
try
FConnectDialog.Connection.LoginPrompt := False;
GetDatabasesList(TCustomMyConnection(FConnectDialog.Connection), List);
AssignStrings(List, edDatabase.Items);
finally
List.Free;
FConnectDialog.Connection.LoginPrompt := OldLoginPrompt;
Screen.Cursor := OldCursor;
end;
end;
procedure TMyConnectForm.edExit(Sender: TObject);
begin
try
FConnectDialog.Connection.Password := edPassword.Text;
FConnectDialog.Connection.Server := edServer.Text;
FConnectDialog.Connection.UserName := edUsername.Text;
if FConnectDialog.Connection is TCustomMyConnection then begin
TCustomMyConnection(FConnectDialog.Connection).Database := edDatabase.Text;
end;
if FConnectDialog.Connection is TMyConnection then begin
TMyConnection(FConnectDialog.Connection).Port := StrToInt(edPort.Text);
end;
except
ActiveControl := Sender as TWinControl;
raise;
end;
end;
initialization
if GetClass('TMyConnectForm') = nil then
Classes.RegisterClass(TMyConnectForm);
{$IFDEF FPC}
{$i MyConnectForm.lrs}
{$ENDIF}
end.

Binary file not shown.

BIN
5.80.0.50/1/MyConsts.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MyDacVcl.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MyDump.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MyLoader.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MyParser.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MyScript.dcu Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MyServices.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MySqlApi.dcu Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MySqlBind.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MySqlErrors.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MySqlNet.dcu Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/MySqlStmt.dcu Normal file

Binary file not shown.

BIN
5.80.0.50/1/MySqlType.dcu Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/Win32Timer.dcu Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/dac105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/dac105.dcp Normal file

Binary file not shown.

BIN
5.80.0.50/1/dacvcl105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/dacvcl105.dcp Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/dcldac105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/dclmydac105.bpl Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/mydac105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/mydac105.dcp Normal file

Binary file not shown.

BIN
5.80.0.50/1/mydacvcl105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/mydacvcl105.dcp Normal file

Binary file not shown.

Binary file not shown.

BIN
5.80.0.50/1/mysqlmon105.bpl Normal file

Binary file not shown.

BIN
5.80.0.50/1/mysqlmon105.dcp Normal file

Binary file not shown.