Ticket #900 -> Poder eledir la conexión en la pantalla de login
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1061 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
852212684c
commit
703c860436
@ -6,7 +6,7 @@
|
|||||||
<propertysets/>
|
<propertysets/>
|
||||||
<variables>
|
<variables>
|
||||||
<project_path>
|
<project_path>
|
||||||
<![CDATA[C:\Codigo tecsitel]]>
|
<![CDATA[C:\Codigo Tecsitel]]>
|
||||||
</project_path>
|
</project_path>
|
||||||
</variables>
|
</variables>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@ -68,7 +68,7 @@ contains
|
|||||||
uViewPerfilUsuario in 'Usuarios\Views\uViewPerfilUsuario.pas' {frViewPerfilUsuario: TFrame},
|
uViewPerfilUsuario in 'Usuarios\Views\uViewPerfilUsuario.pas' {frViewPerfilUsuario: TFrame},
|
||||||
uIEditorPerfilesUsuario in 'Usuarios\Controller\View\uIEditorPerfilesUsuario.pas',
|
uIEditorPerfilesUsuario in 'Usuarios\Controller\View\uIEditorPerfilesUsuario.pas',
|
||||||
uIEditorPerfilUsuario in 'Usuarios\Controller\View\uIEditorPerfilUsuario.pas',
|
uIEditorPerfilUsuario in 'Usuarios\Controller\View\uIEditorPerfilUsuario.pas',
|
||||||
uEditorUsuarios in 'Usuarios\Views\uEditorUsuarios.pas' {fEditorUsuarios: TForm},
|
uEditorUsuarios in 'Usuarios\Views\uEditorUsuarios.pas' {fEditorUsuarios: T},
|
||||||
uViewUsuarios in 'Usuarios\Views\uViewUsuarios.pas' {frViewUsuarios: TFrame},
|
uViewUsuarios in 'Usuarios\Views\uViewUsuarios.pas' {frViewUsuarios: TFrame},
|
||||||
uEditorUsuario in 'Usuarios\Views\uEditorUsuario.pas' {fEditorUsuario: TFrame},
|
uEditorUsuario in 'Usuarios\Views\uEditorUsuario.pas' {fEditorUsuario: TFrame},
|
||||||
uViewUsuario in 'Usuarios\Views\uViewUsuario.pas' {frViewUsuario: TFrame},
|
uViewUsuario in 'Usuarios\Views\uViewUsuario.pas' {frViewUsuario: TFrame},
|
||||||
|
|||||||
@ -55,11 +55,10 @@
|
|||||||
<DelphiCompile Include="ApplicationBase.dpk">
|
<DelphiCompile Include="ApplicationBase.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Base.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
|
||||||
<DCCReference Include="..\GUIBase.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
|
||||||
<DCCReference Include="..\JvJansD11R.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvJansD11R.dcp" />
|
||||||
<DCCReference Include="..\PluginSDK_D11R.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\PluginSDK_D11R.dcp" />
|
||||||
<DCCReference Include="..\PluginSDK_D110R.dcp" />
|
|
||||||
<DCCReference Include="Empresas\Controller\uDatosBancariosEmpresaController.pas" />
|
<DCCReference Include="Empresas\Controller\uDatosBancariosEmpresaController.pas" />
|
||||||
<DCCReference Include="Empresas\Controller\uEmpresasController.pas" />
|
<DCCReference Include="Empresas\Controller\uEmpresasController.pas" />
|
||||||
<DCCReference Include="Empresas\Controller\View\uIEditorDatosBancarioEmpresa.pas" />
|
<DCCReference Include="Empresas\Controller\View\uIEditorDatosBancarioEmpresa.pas" />
|
||||||
|
|||||||
@ -5,7 +5,7 @@ object fEditorLogin: TfEditorLogin
|
|||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'FactuGES'
|
Caption = 'FactuGES'
|
||||||
ClientHeight = 241
|
ClientHeight = 241
|
||||||
ClientWidth = 385
|
ClientWidth = 392
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -20,16 +20,16 @@ object fEditorLogin: TfEditorLogin
|
|||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 24
|
Left = 27
|
||||||
Top = 108
|
Top = 132
|
||||||
Width = 39
|
Width = 39
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Usuario:'
|
Caption = 'Usuario:'
|
||||||
Transparent = False
|
Transparent = False
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 24
|
Left = 27
|
||||||
Top = 138
|
Top = 162
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Contrase'#241'a:'
|
Caption = 'Contrase'#241'a:'
|
||||||
@ -42,7 +42,7 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Inicio de sesi'#243'n:'
|
Caption = 'Inicio de sesi'#243'n:'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clMenuHighlight
|
Font.Color = clWindowText
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
@ -51,16 +51,25 @@ object fEditorLogin: TfEditorLogin
|
|||||||
object JvGradient1: TJvGradient
|
object JvGradient1: TJvGradient
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 57
|
Top = 57
|
||||||
Width = 385
|
Width = 392
|
||||||
Height = 4
|
Height = 4
|
||||||
Align = alTop
|
Align = alTop
|
||||||
StartColor = 2971346
|
StartColor = 2971346
|
||||||
EndColor = 4828405
|
EndColor = 4828405
|
||||||
|
ExplicitWidth = 385
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 105
|
||||||
|
Width = 47
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Conexi'#243'n:'
|
||||||
|
Transparent = False
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 385
|
Width = 392
|
||||||
Height = 57
|
Height = 57
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -69,7 +78,7 @@ object fEditorLogin: TfEditorLogin
|
|||||||
object Image1: TImage
|
object Image1: TImage
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 385
|
Width = 392
|
||||||
Height = 57
|
Height = 57
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Center = True
|
Center = True
|
||||||
@ -1023,8 +1032,8 @@ object fEditorLogin: TfEditorLogin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object edtPassword: TEdit
|
object edtPassword: TEdit
|
||||||
Left = 96
|
Left = 99
|
||||||
Top = 132
|
Top = 156
|
||||||
Width = 278
|
Width = 278
|
||||||
Height = 21
|
Height = 21
|
||||||
PasswordChar = '*'
|
PasswordChar = '*'
|
||||||
@ -1035,10 +1044,9 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Top = 203
|
Top = 203
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = '&Aceptar'
|
Action = actAceptar
|
||||||
Default = True
|
Default = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnClick = bAceptarClick
|
|
||||||
end
|
end
|
||||||
object bCancelar: TButton
|
object bCancelar: TButton
|
||||||
Left = 296
|
Left = 296
|
||||||
@ -1051,8 +1059,8 @@ object fEditorLogin: TfEditorLogin
|
|||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object edtUser: TEdit
|
object edtUser: TEdit
|
||||||
Left = 96
|
Left = 99
|
||||||
Top = 104
|
Top = 129
|
||||||
Width = 278
|
Width = 278
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -1063,16 +1071,29 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Top = 203
|
Top = 203
|
||||||
Width = 129
|
Width = 129
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'C&onfigurar conexi'#243'n...'
|
Caption = 'C&onfigurar conexiones...'
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnClick = ToolButton4Click
|
OnClick = ToolButton4Click
|
||||||
end
|
end
|
||||||
|
object cbConexiones: TComboBox
|
||||||
|
Left = 99
|
||||||
|
Top = 102
|
||||||
|
Width = 278
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 13
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 6
|
||||||
|
Text = '<No hay conexiones>'
|
||||||
|
Items.Strings = (
|
||||||
|
'<No hay conexiones>')
|
||||||
|
end
|
||||||
object Timer1: TTimer
|
object Timer1: TTimer
|
||||||
Enabled = False
|
Enabled = False
|
||||||
Interval = 5000
|
Interval = 5000
|
||||||
OnTimer = Timer1Timer
|
OnTimer = Timer1Timer
|
||||||
Left = 344
|
Left = 344
|
||||||
Top = 64
|
Top = 8
|
||||||
end
|
end
|
||||||
object JvAppRegistryStorage1: TJvAppRegistryStorage
|
object JvAppRegistryStorage1: TJvAppRegistryStorage
|
||||||
StorageOptions.BooleanStringTrueValues = 'TRUE, YES, Y'
|
StorageOptions.BooleanStringTrueValues = 'TRUE, YES, Y'
|
||||||
@ -1080,8 +1101,8 @@ object fEditorLogin: TfEditorLogin
|
|||||||
StorageOptions.BooleanAsString = False
|
StorageOptions.BooleanAsString = False
|
||||||
Root = 'Software\%APPL_NAME%'
|
Root = 'Software\%APPL_NAME%'
|
||||||
SubStorages = <>
|
SubStorages = <>
|
||||||
Left = 14
|
Left = 278
|
||||||
Top = 168
|
Top = 8
|
||||||
end
|
end
|
||||||
object JvFormStorage1: TJvFormStorage
|
object JvFormStorage1: TJvFormStorage
|
||||||
AppStorage = JvAppRegistryStorage1
|
AppStorage = JvAppRegistryStorage1
|
||||||
@ -1095,7 +1116,16 @@ object fEditorLogin: TfEditorLogin
|
|||||||
Name = 'Ruta'
|
Name = 'Ruta'
|
||||||
Value = ''
|
Value = ''
|
||||||
end>
|
end>
|
||||||
Left = 48
|
Left = 312
|
||||||
Top = 168
|
Top = 8
|
||||||
|
end
|
||||||
|
object ActionList1: TActionList
|
||||||
|
Left = 248
|
||||||
|
Top = 8
|
||||||
|
object actAceptar: TAction
|
||||||
|
Caption = '&Aceptar'
|
||||||
|
OnExecute = actAceptarExecute
|
||||||
|
OnUpdate = actAceptarUpdate
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -8,7 +8,8 @@ uses
|
|||||||
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
||||||
cxImageComboBox, ImgList, PngImageList, pngimage, ToolWin, JvExControls,
|
cxImageComboBox, ImgList, PngImageList, pngimage, ToolWin, JvExControls,
|
||||||
JvComponent, JvGradient, JvGIF, JvComponentBase, JvFormPlacement,
|
JvComponent, JvGradient, JvGIF, JvComponentBase, JvFormPlacement,
|
||||||
JvAppStorage, JvAppRegistryStorage, uIEditorLogin, uUsuariosController;
|
JvAppStorage, JvAppRegistryStorage, uIEditorLogin, uUsuariosController,
|
||||||
|
ActnList;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorLogin = class(TForm, IEditorLogin)
|
TfEditorLogin = class(TForm, IEditorLogin)
|
||||||
@ -26,18 +27,24 @@ type
|
|||||||
JvAppRegistryStorage1: TJvAppRegistryStorage;
|
JvAppRegistryStorage1: TJvAppRegistryStorage;
|
||||||
JvFormStorage1: TJvFormStorage;
|
JvFormStorage1: TJvFormStorage;
|
||||||
Image1: TImage;
|
Image1: TImage;
|
||||||
procedure bAceptarClick(Sender: TObject);
|
cbConexiones: TComboBox;
|
||||||
|
Label2: TLabel;
|
||||||
|
ActionList1: TActionList;
|
||||||
|
actAceptar: TAction;
|
||||||
procedure ToolButton4Click(Sender: TObject);
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure Timer1Timer(Sender: TObject);
|
procedure Timer1Timer(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure edtUserKeyPress(Sender: TObject; var Key: Char);
|
procedure edtUserKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure actAceptarExecute(Sender: TObject);
|
||||||
|
procedure actAceptarUpdate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FController : IUsuariosController;
|
FController : IUsuariosController;
|
||||||
FIntentos : Integer;
|
FIntentos : Integer;
|
||||||
function GetController : IUsuariosController;
|
function GetController : IUsuariosController;
|
||||||
procedure SetController (const AValue : IUsuariosController);
|
procedure SetController (const AValue : IUsuariosController);
|
||||||
|
procedure RellenarConexiones;
|
||||||
published
|
published
|
||||||
property Controller : IUsuariosController read GetController write SetController;
|
property Controller : IUsuariosController read GetController write SetController;
|
||||||
end;
|
end;
|
||||||
@ -50,15 +57,18 @@ uses
|
|||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
const
|
||||||
|
NO_CONEXIONES = '<No hay conexiones>';
|
||||||
|
|
||||||
{
|
{
|
||||||
********************************* TfEditorLogin **********************************
|
********************************* TfEditorLogin **********************************
|
||||||
}
|
}
|
||||||
procedure TfEditorLogin.bAceptarClick(Sender: TObject);
|
procedure TfEditorLogin.actAceptarExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
bOk : Boolean;
|
bOk : Boolean;
|
||||||
begin
|
begin
|
||||||
Timer1.Enabled := False;
|
Timer1.Enabled := False;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
bOK := FController.ComprobarUsuario(edtUser.Text, edtPassword.Text);
|
bOK := FController.ComprobarUsuario(edtUser.Text, edtPassword.Text);
|
||||||
@ -77,21 +87,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorLogin.actAceptarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
(Sender as TAction).Enabled := (cbConexiones.Items.IndexOf(NO_CONEXIONES) = -1);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorLogin.ToolButton4Click(Sender: TObject);
|
procedure TfEditorLogin.ToolButton4Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
ATimer : Boolean;
|
ATimer : Boolean;
|
||||||
begin
|
begin
|
||||||
ATimer := False;
|
{*ATimer := False;
|
||||||
if Timer1.Enabled then
|
if Timer1.Enabled then
|
||||||
begin
|
begin
|
||||||
ATimer := True;
|
ATimer := True;
|
||||||
Timer1.Enabled := False;
|
Timer1.Enabled := False;
|
||||||
end;
|
end;*}
|
||||||
|
|
||||||
dmConexion.ConfigurarConexion;
|
dmConexion.ConfigurarConexion;
|
||||||
|
RellenarConexiones;
|
||||||
|
|
||||||
if ATimer then
|
{*if ATimer then
|
||||||
Timer1.Enabled := True;
|
Timer1.Enabled := True;*}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorLogin.edtUserKeyPress(Sender: TObject; var Key: Char);
|
procedure TfEditorLogin.edtUserKeyPress(Sender: TObject; var Key: Char);
|
||||||
@ -114,10 +130,11 @@ procedure TfEditorLogin.FormShow(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
Self.Caption := AppFactuGES.AppFullName;
|
Self.Caption := AppFactuGES.AppFullName;
|
||||||
JvFormStorage1.RestoreFormPlacement;
|
JvFormStorage1.RestoreFormPlacement;
|
||||||
|
RellenarConexiones;
|
||||||
|
|
||||||
// Hacer login automática si hay usuario/password y no hay más de una base
|
// Hacer login automática si hay usuario/password y no hay más de una base
|
||||||
// de datos como opción para conectarse.
|
// de datos como opción para conectarse.
|
||||||
if ((Length(edtUser.Text) > 0) and (Length(edtPassword.Text) > 0)) then
|
if ((cbConexiones.Items.Count > 0) and (Length(edtUser.Text) > 0) and (Length(edtPassword.Text) > 0)) then
|
||||||
Timer1.Enabled := True;
|
Timer1.Enabled := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -126,6 +143,19 @@ begin
|
|||||||
Result := FController;
|
Result := FController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorLogin.RellenarConexiones;
|
||||||
|
begin
|
||||||
|
cbConexiones.Clear;
|
||||||
|
cbConexiones.Items := dmConexion.ListaConexiones;
|
||||||
|
|
||||||
|
if cbConexiones.Items.Count > 0 then
|
||||||
|
cbConexiones.ItemIndex := 0
|
||||||
|
else begin
|
||||||
|
cbConexiones.Items.Add(NO_CONEXIONES);
|
||||||
|
cbConexiones.ItemIndex := 0
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorLogin.SetController(const AValue: IUsuariosController);
|
procedure TfEditorLogin.SetController(const AValue: IUsuariosController);
|
||||||
begin
|
begin
|
||||||
FController := AValue;
|
FController := AValue;
|
||||||
|
|||||||
@ -114,6 +114,7 @@ contains
|
|||||||
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
|
uReferenciasUtils in 'Utiles\uReferenciasUtils.pas',
|
||||||
uEMailUtils in 'Utiles\uEMailUtils.pas',
|
uEMailUtils in 'Utiles\uEMailUtils.pas',
|
||||||
uSaveClipboard in 'Utiles\uSaveClipboard.pas',
|
uSaveClipboard in 'Utiles\uSaveClipboard.pas',
|
||||||
MidasSpeedFix in 'Utiles\MidasSpeedFix.pas';
|
MidasSpeedFix in 'Utiles\MidasSpeedFix.pas',
|
||||||
|
uEditorConexiones in 'Conexion\uEditorConexiones.pas' {fEditorConexiones: TfEditorConexiones};
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -56,58 +56,51 @@
|
|||||||
<DelphiCompile Include="Base.dpk">
|
<DelphiCompile Include="Base.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\adortl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxDataD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxEditorsD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxExportD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxExtEditorsD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxGridD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxIntl6D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxIntlPrintSys3D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxLibraryD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\cxPageControlD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\DataAbstract_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dbrtl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dclIndyCore.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\designide.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dsnap.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxGDIPlusD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxPSCoreD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\dxThemeD11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\GUISDK_D11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndyCore.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndyProtocols.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\IndySystem.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\Jcl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JclVcl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JSDialog100.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCmpD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCoreD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvDlgsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvMMD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvNetD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvPageCompsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvStdCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\JvSystemD11R.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckMD5.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckUCDataConnector.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\pckUserControl_RT.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\PngComponentsD10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\PNG_D10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\RemObjects_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\RemObjects_Indy_D11.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\rtl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\TB2k_D10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\tbx_d10.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcl.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\vclactnband.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcldb.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\vcljpg.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\VclSmp.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\vclx.dcp" />
|
|
||||||
<DCCReference Include="..\Modulos\Presupuestos de cliente\xmlrtl.dcp" />
|
|
||||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||||
|
<DCCReference Include="Conexion\adortl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxDataD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxEditorsD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxExportD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxExtEditorsD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxGridD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxIntl6D11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxIntlPrintSys3D11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxLibraryD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\cxPageControlD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\DataAbstract_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dbrtl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dclIndyCore.dcp" />
|
||||||
|
<DCCReference Include="Conexion\designide.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dsnap.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dxGDIPlusD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dxPSCoreD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\dxThemeD11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\GUISDK_D11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\IndyCore.dcp" />
|
||||||
|
<DCCReference Include="Conexion\IndyProtocols.dcp" />
|
||||||
|
<DCCReference Include="Conexion\IndySystem.dcp" />
|
||||||
|
<DCCReference Include="Conexion\Jcl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JclVcl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JSDialog100.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvCmpD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvCoreD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvDlgsD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvMMD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvNetD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvPageCompsD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvStdCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\JvSystemD11R.dcp" />
|
||||||
|
<DCCReference Include="Conexion\pckMD5.dcp" />
|
||||||
|
<DCCReference Include="Conexion\pckUCDataConnector.dcp" />
|
||||||
|
<DCCReference Include="Conexion\pckUserControl_RT.dcp" />
|
||||||
|
<DCCReference Include="Conexion\PngComponentsD10.dcp" />
|
||||||
|
<DCCReference Include="Conexion\PNG_D10.dcp" />
|
||||||
|
<DCCReference Include="Conexion\RemObjects_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\RemObjects_Indy_D11.dcp" />
|
||||||
|
<DCCReference Include="Conexion\rtl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\TB2k_D10.dcp" />
|
||||||
|
<DCCReference Include="Conexion\tbx_d10.dcp" />
|
||||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||||
<Form>fConfigurarConexion</Form>
|
<Form>fConfigurarConexion</Form>
|
||||||
<DesignClass>TForm</DesignClass>
|
<DesignClass>TForm</DesignClass>
|
||||||
@ -116,6 +109,17 @@
|
|||||||
<Form>dmConexion</Form>
|
<Form>dmConexion</Form>
|
||||||
<DesignClass>TDataModule</DesignClass>
|
<DesignClass>TDataModule</DesignClass>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="Conexion\uEditorConexiones.pas">
|
||||||
|
<Form>fEditorConexiones</Form>
|
||||||
|
<DesignClass>TfEditorConexiones </DesignClass>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Conexion\vcl.dcp" />
|
||||||
|
<DCCReference Include="Conexion\vclactnband.dcp" />
|
||||||
|
<DCCReference Include="Conexion\vcldb.dcp" />
|
||||||
|
<DCCReference Include="Conexion\vcljpg.dcp" />
|
||||||
|
<DCCReference Include="Conexion\VclSmp.dcp" />
|
||||||
|
<DCCReference Include="Conexion\vclx.dcp" />
|
||||||
|
<DCCReference Include="Conexion\xmlrtl.dcp" />
|
||||||
<DCCReference Include="Configuracion\uDataModuleConfiguracion.pas">
|
<DCCReference Include="Configuracion\uDataModuleConfiguracion.pas">
|
||||||
<Form>dmConfiguracion</Form>
|
<Form>dmConfiguracion</Form>
|
||||||
<DesignClass>TDataModule</DesignClass>
|
<DesignClass>TDataModule</DesignClass>
|
||||||
|
|||||||
@ -53,7 +53,10 @@ begin
|
|||||||
|
|
||||||
s := StrAfter(edtServer.Text + ':', Value);
|
s := StrAfter(edtServer.Text + ':', Value);
|
||||||
s := StrBefore('/bin', s);
|
s := StrBefore('/bin', s);
|
||||||
edtPort.Text := s;
|
|
||||||
|
if s = '' then
|
||||||
|
s := '8099';
|
||||||
|
edtPort.Text := s
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfConfigurarConexion.bProbarClick(Sender: TObject);
|
procedure TfConfigurarConexion.bProbarClick(Sender: TObject);
|
||||||
|
|||||||
@ -7,9 +7,6 @@ uses
|
|||||||
uDABINAdapter, uROClient, uROBinMessage,
|
uDABINAdapter, uROClient, uROBinMessage,
|
||||||
uDADataStreamer, uROWinInetHttpChannel;
|
uDADataStreamer, uROWinInetHttpChannel;
|
||||||
|
|
||||||
const
|
|
||||||
SERVER_URL = 'http://localhost:8099/bin'; // Dirección por defecto del servidor
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TdmConexion = class(TDataModule)
|
TdmConexion = class(TDataModule)
|
||||||
ROMessage: TROBinMessage;
|
ROMessage: TROBinMessage;
|
||||||
@ -19,11 +16,14 @@ type
|
|||||||
anException: Exception; var aRetry: Boolean);
|
anException: Exception; var aRetry: Boolean);
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
FListaConexiones : TStringList;
|
||||||
function GetChannel: TROTransportChannel;
|
function GetChannel: TROTransportChannel;
|
||||||
function GetMessage: TROBinMessage;
|
function GetMessage: TROBinMessage;
|
||||||
function GetTargetURL: String;
|
function GetTargetURL: String;
|
||||||
procedure SetTargetURL(const Value: String);
|
procedure SetTargetURL(const Value: String);
|
||||||
procedure ConfigurarEncriptacionConexion;
|
procedure ConfigurarEncriptacionConexion;
|
||||||
|
function GetListaConexiones: TStringList;
|
||||||
|
procedure SetListaConexiones(const Value: TStringList);
|
||||||
public
|
public
|
||||||
function HayConexion : Boolean;
|
function HayConexion : Boolean;
|
||||||
function ProbarConexion(const ATargetURL : String): Boolean;
|
function ProbarConexion(const ATargetURL : String): Boolean;
|
||||||
@ -31,6 +31,7 @@ type
|
|||||||
property TargetURL : String read GetTargetURL write SetTargetURL;
|
property TargetURL : String read GetTargetURL write SetTargetURL;
|
||||||
property Channel: TROTransportChannel read GetChannel;
|
property Channel: TROTransportChannel read GetChannel;
|
||||||
property Message: TROBinMessage read GetMessage;
|
property Message: TROBinMessage read GetMessage;
|
||||||
|
property ListaConexiones : TStringList read GetListaConexiones write SetListaConexiones;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -42,7 +43,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
uROEncryption, Windows, WinInet, cxControls, uConfigurarConexion, Dialogs, Controls,
|
uROEncryption, Windows, WinInet, cxControls, uConfigurarConexion, Dialogs, Controls,
|
||||||
uDMBase, FactuGES_Intf, uDialogUtils;
|
uDMBase, FactuGES_Intf, uDialogUtils, uEditorConexiones;
|
||||||
|
|
||||||
const
|
const
|
||||||
IE_OFFLINE_ERROR = 'Unexpected error in WinInet HTTP Channel (2)';
|
IE_OFFLINE_ERROR = 'Unexpected error in WinInet HTTP Channel (2)';
|
||||||
@ -60,20 +61,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TdmConexion.ConfigurarConexion;
|
procedure TdmConexion.ConfigurarConexion;
|
||||||
|
var
|
||||||
|
AEditor : TfEditorConexiones;
|
||||||
begin
|
begin
|
||||||
with TfConfigurarConexion.Create(NIL) do
|
AEditor := TfEditorConexiones.Create(NIL);
|
||||||
try
|
try
|
||||||
TargetURL := ROChannel.TargetURL;
|
AEditor.ListaConexiones := FListaConexiones;
|
||||||
if ShowModal = mrOk then
|
if AEditor.ShowModal = mrOk then
|
||||||
begin
|
begin
|
||||||
ROChannel.TargetURL := TargetURL;
|
Self.ListaConexiones := AEditor.ListaConexiones;
|
||||||
ROChannel.Connected := False;
|
dmBase.SalvarConfiguracion;
|
||||||
ROChannel.Connected := True;
|
|
||||||
dmBase.SalvarConfiguracion;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
Free;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
|
AEditor.Release;
|
||||||
|
AEditor := NIL;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TdmConexion.ConfigurarEncriptacionConexion;
|
procedure TdmConexion.ConfigurarEncriptacionConexion;
|
||||||
@ -91,6 +94,7 @@ end;
|
|||||||
|
|
||||||
procedure TdmConexion.DataModuleCreate(Sender: TObject);
|
procedure TdmConexion.DataModuleCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
FListaConexiones := TStringList.Create;
|
||||||
ConfigurarEncriptacionConexion;
|
ConfigurarEncriptacionConexion;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -106,8 +110,9 @@ end;
|
|||||||
|
|
||||||
procedure TdmConexion.DataModuleDestroy(Sender: TObject);
|
procedure TdmConexion.DataModuleDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ROChannel.Connected then
|
{* if ROChannel.Connected then
|
||||||
ROChannel.Connected := False;
|
ROChannel.Connected := False;*}
|
||||||
|
FreeAndNil(FListaConexiones);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TdmConexion.GetChannel: TROTransportChannel;
|
function TdmConexion.GetChannel: TROTransportChannel;
|
||||||
@ -115,6 +120,11 @@ begin
|
|||||||
Result := ROChannel;
|
Result := ROChannel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TdmConexion.GetListaConexiones: TStringList;
|
||||||
|
begin
|
||||||
|
Result := FListaConexiones;
|
||||||
|
end;
|
||||||
|
|
||||||
function TdmConexion.GetMessage: TROBinMessage;
|
function TdmConexion.GetMessage: TROBinMessage;
|
||||||
begin
|
begin
|
||||||
Result := ROMessage;
|
Result := ROMessage;
|
||||||
@ -210,6 +220,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TdmConexion.SetListaConexiones(const Value: TStringList);
|
||||||
|
begin
|
||||||
|
FListaConexiones.Clear;
|
||||||
|
FListaConexiones.AddStrings(Value);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TdmConexion.SetTargetURL(const Value: String);
|
procedure TdmConexion.SetTargetURL(const Value: String);
|
||||||
begin
|
begin
|
||||||
ROChannel.TargetURL := Value;
|
ROChannel.TargetURL := Value;
|
||||||
|
|||||||
119
Source/Base/Conexion/uEditorConexiones.dfm
Normal file
119
Source/Base/Conexion/uEditorConexiones.dfm
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
object fEditorConexiones: TfEditorConexiones
|
||||||
|
Left = 453
|
||||||
|
Top = 234
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = 'Lista de conexiones'
|
||||||
|
ClientHeight = 406
|
||||||
|
ClientWidth = 404
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object bAceptar: TButton
|
||||||
|
Left = 236
|
||||||
|
Top = 373
|
||||||
|
Width = 75
|
||||||
|
Height = 23
|
||||||
|
Action = actAceptar
|
||||||
|
Default = True
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object bCancelar: TButton
|
||||||
|
Left = 321
|
||||||
|
Top = 373
|
||||||
|
Width = 75
|
||||||
|
Height = 23
|
||||||
|
Action = actCancelar
|
||||||
|
Cancel = True
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object PageControl1: TPageControl
|
||||||
|
Left = 6
|
||||||
|
Top = 8
|
||||||
|
Width = 390
|
||||||
|
Height = 356
|
||||||
|
ActivePage = TabSheet1
|
||||||
|
TabOrder = 0
|
||||||
|
object TabSheet1: TTabSheet
|
||||||
|
Caption = 'Lista de conexiones'
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 6
|
||||||
|
Top = 12
|
||||||
|
Width = 149
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Lista de conexiones disponibles'
|
||||||
|
end
|
||||||
|
object bEliminar: TButton
|
||||||
|
Left = 284
|
||||||
|
Top = 90
|
||||||
|
Width = 95
|
||||||
|
Height = 23
|
||||||
|
Action = actEliminar
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object bAnadir: TButton
|
||||||
|
Left = 284
|
||||||
|
Top = 31
|
||||||
|
Width = 95
|
||||||
|
Height = 23
|
||||||
|
Action = actAnadir
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 284
|
||||||
|
Top = 61
|
||||||
|
Width = 95
|
||||||
|
Height = 23
|
||||||
|
Action = actModificar
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ListBox1: TListBox
|
||||||
|
Left = 16
|
||||||
|
Top = 63
|
||||||
|
Width = 272
|
||||||
|
Height = 290
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object ActionList1: TActionList
|
||||||
|
Left = 144
|
||||||
|
Top = 16
|
||||||
|
object actAnadir: TAction
|
||||||
|
Caption = '&A'#241'adir...'
|
||||||
|
OnExecute = actAnadirExecute
|
||||||
|
end
|
||||||
|
object actEliminar: TAction
|
||||||
|
Caption = '&Eliminar'
|
||||||
|
OnExecute = actEliminarExecute
|
||||||
|
OnUpdate = actEliminarUpdate
|
||||||
|
end
|
||||||
|
object actAceptar: TAction
|
||||||
|
Caption = 'A&ceptar'
|
||||||
|
OnExecute = actAceptarExecute
|
||||||
|
end
|
||||||
|
object actCancelar: TAction
|
||||||
|
Caption = '&Cancelar'
|
||||||
|
OnExecute = actCancelarExecute
|
||||||
|
end
|
||||||
|
object actModificar: TAction
|
||||||
|
Caption = '&Modificar...'
|
||||||
|
OnExecute = actModificarExecute
|
||||||
|
OnUpdate = actModificarUpdate
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dsFormasPago: TDADataSource
|
||||||
|
Left = 168
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
end
|
||||||
175
Source/Base/Conexion/uEditorConexiones.pas
Normal file
175
Source/Base/Conexion/uEditorConexiones.pas
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
{
|
||||||
|
===============================================================================
|
||||||
|
Copyright (©) 2006. Rodax Software.
|
||||||
|
===============================================================================
|
||||||
|
Los contenidos de este fichero son propiedad de Rodax Software titular del
|
||||||
|
copyright. Este fichero sólo podrá ser copiado, distribuido y utilizado,
|
||||||
|
en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
|
||||||
|
acuerdo con los términos y condiciones establecidas en el acuerdo/contrato
|
||||||
|
bajo el que se suministra.
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Web: www.rodax-software.com
|
||||||
|
===============================================================================
|
||||||
|
Fecha primera versión: 22-05-2006
|
||||||
|
Versión actual: 1.0.0
|
||||||
|
Fecha versión actual: 22-05-2006
|
||||||
|
===============================================================================
|
||||||
|
Modificaciones:
|
||||||
|
|
||||||
|
Fecha Comentarios
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
===============================================================================
|
||||||
|
}
|
||||||
|
|
||||||
|
unit uEditorConexiones;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
DB, uDADataTable,
|
||||||
|
ActnList, Grids, DBGrids, StdCtrls, ComCtrls, uDAInterfaces, Mask, DBCtrls;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfEditorConexiones = class(TForm)
|
||||||
|
ActionList1: TActionList;
|
||||||
|
dsFormasPago: TDADataSource;
|
||||||
|
actAnadir: TAction;
|
||||||
|
actEliminar: TAction;
|
||||||
|
bEliminar: TButton;
|
||||||
|
actAceptar: TAction;
|
||||||
|
actCancelar: TAction;
|
||||||
|
bAceptar: TButton;
|
||||||
|
bCancelar: TButton;
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
TabSheet1: TTabSheet;
|
||||||
|
Label1: TLabel;
|
||||||
|
bAnadir: TButton;
|
||||||
|
actModificar: TAction;
|
||||||
|
Button1: TButton;
|
||||||
|
ListBox1: TListBox;
|
||||||
|
procedure actCancelarExecute(Sender: TObject);
|
||||||
|
procedure actAceptarExecute(Sender: TObject);
|
||||||
|
procedure actModificarExecute(Sender: TObject);
|
||||||
|
procedure actAnadirExecute(Sender: TObject);
|
||||||
|
procedure actEliminarExecute(Sender: TObject);
|
||||||
|
procedure actModificarUpdate(Sender: TObject);
|
||||||
|
procedure actEliminarUpdate(Sender: TObject);
|
||||||
|
private
|
||||||
|
FListaConexiones : TStringList;
|
||||||
|
function GetListaConexiones: TStringList;
|
||||||
|
procedure SetListaConexiones(const Value: TStringList);
|
||||||
|
procedure RellenarLista;
|
||||||
|
procedure GuardarLista;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
property ListaConexiones : TStringList read GetListaConexiones write SetListaConexiones;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
{ TfEditorConexiones }
|
||||||
|
|
||||||
|
uses
|
||||||
|
uDialogUtils, uConfigurarConexion;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actAceptarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
GuardarLista;
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actAnadirExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with TfConfigurarConexion.Create(NIL) do
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
TargetURL := '';
|
||||||
|
if ShowModal = mrOk then
|
||||||
|
ListBox1.Items.Add(TargetURL);
|
||||||
|
finally
|
||||||
|
Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actCancelarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := mrCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actEliminarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ListBox1.Items.Delete(ListBox1.ItemIndex);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actEliminarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
(Sender as TAction).Enabled := (ListBox1.ItemIndex >= 0)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actModificarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with TfConfigurarConexion.Create(NIL) do
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
TargetURL := ListBox1.Items[ListBox1.ItemIndex];
|
||||||
|
if ShowModal = mrOk then
|
||||||
|
ListBox1.Items[ListBox1.ItemIndex] := TargetURL;
|
||||||
|
finally
|
||||||
|
Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.actModificarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
(Sender as TAction).Enabled := (ListBox1.ItemIndex >= 0)
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TfEditorConexiones.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FListaConexiones := TStringList.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TfEditorConexiones.Destroy;
|
||||||
|
begin
|
||||||
|
FreeAndNil(FListaConexiones);
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfEditorConexiones.GetListaConexiones: TStringList;
|
||||||
|
begin
|
||||||
|
Result := FListaConexiones;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.GuardarLista;
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
FListaConexiones.Clear;
|
||||||
|
for i := 0 to ListBox1.Count - 1 do
|
||||||
|
FListaConexiones.Add(ListBox1.Items[i]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.RellenarLista;
|
||||||
|
begin
|
||||||
|
with ListBox1 do
|
||||||
|
begin
|
||||||
|
Clear;
|
||||||
|
Items.AddStrings(FListaConexiones);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorConexiones.SetListaConexiones(const Value: TStringList);
|
||||||
|
begin
|
||||||
|
FListaConexiones.Clear;
|
||||||
|
FListaConexiones.AddStrings(Value);
|
||||||
|
RellenarLista;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
@ -7,9 +7,6 @@ uses
|
|||||||
uDABINAdapter, uROClient, IniFiles,
|
uDABINAdapter, uROClient, IniFiles,
|
||||||
uDADataStreamer;
|
uDADataStreamer;
|
||||||
|
|
||||||
const
|
|
||||||
SERVER_URL = 'http://localhost:8099/bin';
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TdmConfiguracion = class(TDataModule)
|
TdmConfiguracion = class(TDataModule)
|
||||||
RORemoteService: TRORemoteService;
|
RORemoteService: TRORemoteService;
|
||||||
@ -67,15 +64,30 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TdmConfiguracion.LeerConfiguracion;
|
procedure TdmConfiguracion.LeerConfiguracion;
|
||||||
|
var
|
||||||
|
AStream : TMemoryStream;
|
||||||
begin
|
begin
|
||||||
with FIniFile do
|
AStream := TMemoryStream.Create();
|
||||||
dmConexion.TargetURL := ReadString('Server', 'URL', SERVER_URL);
|
try
|
||||||
|
if (FIniFile.ReadBinaryStream('Server', 'URLs', AStream) > 0) then
|
||||||
|
dmConexion.ListaConexiones.LoadFromStream(AStream);
|
||||||
|
finally
|
||||||
|
FreeAndNIL(AStream);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TdmConfiguracion.SalvarConfiguracion;
|
procedure TdmConfiguracion.SalvarConfiguracion;
|
||||||
|
var
|
||||||
|
AStream : TMemoryStream;
|
||||||
begin
|
begin
|
||||||
with FIniFile do
|
AStream := TMemoryStream.Create();
|
||||||
WriteString('Server', 'URL', dmConexion.TargetURL);
|
try
|
||||||
|
dmConexion.ListaConexiones.SaveToStream(AStream);
|
||||||
|
AStream.Position := 0;
|
||||||
|
FIniFile.WriteBinaryStream('Server', 'URLs', AStream);
|
||||||
|
finally
|
||||||
|
FreeAndNil(AStream);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -32,6 +32,6 @@ begin
|
|||||||
uBootStrap.Run; // <- Aquí dentro está Application.Run
|
uBootStrap.Run; // <- Aquí dentro está Application.Run
|
||||||
uBootStrap.Terminate;
|
uBootStrap.Terminate;
|
||||||
|
|
||||||
Application.Terminate; //<- No descomentar para así ver los Memory Leaks
|
//Application.Terminate; //<- No descomentar para así ver los Memory Leaks
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||||
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">9</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.9.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.9.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">9</VersionInfo><VersionInfo Name="Release">5</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.9.5.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.9.5.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
MAINICON ICON "C:\Codigo tecsitel\Resources\Iconos\Factuges.ico"
|
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico"
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 1,9,4,0
|
FILEVERSION 1,9,5,0
|
||||||
PRODUCTVERSION 1,9,4,0
|
PRODUCTVERSION 1,9,5,0
|
||||||
FILEFLAGSMASK 0x3FL
|
FILEFLAGSMASK 0x3FL
|
||||||
FILEFLAGS 0x00L
|
FILEFLAGS 0x00L
|
||||||
FILEOS 0x40004L
|
FILEOS 0x40004L
|
||||||
@ -13,10 +13,10 @@ BEGIN
|
|||||||
BLOCK "0C0A04E4"
|
BLOCK "0C0A04E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Rodax Software S.L.\0"
|
VALUE "CompanyName", "Rodax Software S.L.\0"
|
||||||
VALUE "FileVersion", "1.9.4.0\0"
|
VALUE "FileVersion", "1.9.5.0\0"
|
||||||
VALUE "InternalName", "FactuGES\0"
|
VALUE "InternalName", "FactuGES\0"
|
||||||
VALUE "ProductName", "FactuGES\0"
|
VALUE "ProductName", "FactuGES\0"
|
||||||
VALUE "ProductVersion", "1.9.4.0\0"
|
VALUE "ProductVersion", "1.9.5.0\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
MAINICON ICON "C:\Codigo tecsitel\Resources\Iconos\Servidor.ico"
|
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Servidor.ico"
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 1,9,4,0
|
FILEVERSION 1,9,4,0
|
||||||
PRODUCTVERSION 1,9,4,0
|
PRODUCTVERSION 1,9,4,0
|
||||||
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.9.4.0\0"
|
VALUE "FileVersion", "1.9.4.0\0"
|
||||||
VALUE "ProductVersion", "1.9.4.0\0"
|
VALUE "ProductVersion", "1.9.4.0\0"
|
||||||
VALUE "CompileDate", "jueves, 16 de febrero de 2012 17:45\0"
|
VALUE "CompileDate", "lunes, 11 de junio de 2012 16:21\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user