git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES/trunk@4 3f40d355-893c-4141-8e64-b1d9be72e7e7
558 lines
18 KiB
ObjectPascal
558 lines
18 KiB
ObjectPascal
{
|
|
===============================================================================
|
|
Copyright (©) 2002. 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: 03-11-2002
|
|
Versión actual: 1.0.0
|
|
Fecha versión actual: 03-11-2002
|
|
===============================================================================
|
|
Modificaciones:
|
|
|
|
Fecha Comentarios
|
|
---------------------------------------------------------------------------
|
|
===============================================================================
|
|
}
|
|
|
|
unit Configuracion;
|
|
|
|
interface
|
|
|
|
uses
|
|
SysUtils, Classes, cxClasses, cxStyles, cxGridTableView, cxGridCardView,
|
|
ImgList, Controls, FR_Class, FR_DSet, FR_DBSet, cxEdit,
|
|
cxEditRepositoryItems, cxContainer, cxDBEditRepository, Entidades,
|
|
am2000menuitem, am2000utils, am2000popupmenu, am2000options, am2000skin,
|
|
am2000, AdvPanel, cxPropertiesStore, cxDBExtLookupComboBox,
|
|
cxIntlScheduler, cxIntlPrintSys3, cxintl;
|
|
|
|
const
|
|
FICHERO_CONFIGURACION = 'factuges.ini';
|
|
FICHERO_COLORES = 'colores.ini';
|
|
|
|
type
|
|
TdmConfiguracion = class(TDataModule)
|
|
cxAlmacenEstilosGrid: TcxStyleRepository;
|
|
cxBackground: TcxStyle;
|
|
cxContent: TcxStyle;
|
|
cxContentEven: TcxStyle;
|
|
cxContentOdd: TcxStyle;
|
|
cxFilterBox: TcxStyle;
|
|
cxFooter: TcxStyle;
|
|
cxGroup: TcxStyle;
|
|
cxGroupByBox: TcxStyle;
|
|
cxHeader: TcxStyle;
|
|
cxInactive: TcxStyle;
|
|
cxIncSearch: TcxStyle;
|
|
cxIndicator: TcxStyle;
|
|
cxPreview: TcxStyle;
|
|
cxSelection: TcxStyle;
|
|
StyleSheetGrid: TcxGridTableViewStyleSheet;
|
|
StyleSheetCard: TcxGridCardViewStyleSheet;
|
|
cxCardBorder: TcxStyle;
|
|
cxRowCaption: TcxStyle;
|
|
cxCaptionRow: TcxStyle;
|
|
cxSelectionCardRow: TcxStyle;
|
|
cxInactiveCardView: TcxStyle;
|
|
cxEstiloEditoresFondoOscuro: TcxEditStyleController;
|
|
cxEstiloEditoresFondoClaro: TcxEditStyleController;
|
|
amSkinPrincipal: TAnimatedSkin2000;
|
|
cxEditRepository1: TcxEditRepository;
|
|
cxEditRepository1TextItem1: TcxEditRepositoryTextItem;
|
|
cxEditRepository1LookupComboBoxItem1: TcxEditRepositoryLookupComboBoxItem;
|
|
cxEditRepository1ExtLookupComboBoxItem1: TcxEditRepositoryExtLookupComboBoxItem;
|
|
cxStyle1: TcxStyle;
|
|
cxIntlScheduler1: TcxIntlScheduler;
|
|
cxIntlPrintSys31: TcxIntlPrintSys3;
|
|
cxIntl1: TcxIntl;
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
destructor Destroy; override;
|
|
end;
|
|
|
|
|
|
function LeerConfiguracion : boolean;
|
|
|
|
procedure ConfigurarVentanaPrincipal (Objeto : TWinControl);
|
|
procedure ConfigurarPantallaAcceso (Objeto : TWinControl);
|
|
procedure ConfigurarBarraLateral(Objeto : TWinControl; Entidad : TRdxEntidad);
|
|
procedure ConfigurarFrame(Objeto : TWinControl; Entidad : TRdxEntidad);
|
|
|
|
function PuedeSincronizar : boolean;
|
|
|
|
var
|
|
ListaBD : TStringList;
|
|
dmConfiguracion: TdmConfiguracion;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
uses
|
|
Windows, Forms, inifiles, Mensajes, Dialogs, cxDropDownEdit, cxTextEdit,
|
|
Graphics, extctrls, stdctrls, pngimage, FthImage, RdxTitulos, RdxPageControl,
|
|
RdxPaneles, RdxBarras, RdxBotones, OutlookXP;
|
|
|
|
var
|
|
FColores : TStringList;
|
|
|
|
function DarColorEntidad (Entidad : String; NombreColor : String) : TColor;
|
|
var
|
|
i : Integer;
|
|
begin
|
|
if (length(Entidad) = 0) then
|
|
exit;
|
|
|
|
i := FColores.IndexOf(Entidad);
|
|
with (FColores.Objects[i] as TStringList) do
|
|
Result := StrToInt(Values[NombreColor]);
|
|
end;
|
|
|
|
function GetResourceAsPNG(const resname: string): TPngObject;
|
|
var
|
|
Stream: TResourceStream;
|
|
begin
|
|
Stream := TResourceStream.Create(hInstance, ResName, 'PNG');
|
|
try
|
|
Result := TPngObject.Create;
|
|
Result.LoadFromStream(Stream);
|
|
finally
|
|
Stream.Free;
|
|
end;
|
|
end;
|
|
|
|
procedure ConfigurarPantallaAcceso (Objeto : TWinControl);
|
|
var
|
|
i : integer;
|
|
ImagenPNG : TPNGObject;
|
|
CadenaAux : String;
|
|
begin
|
|
for i := 0 to Objeto.ComponentCount-1 do
|
|
begin
|
|
if Objeto.Components[i] is TcxTextEdit then
|
|
(Objeto.Components[i] as TcxTextEdit).Style.BorderColor := DarColorEntidad('barraprincipal', 'ToolbarColor1');
|
|
|
|
{if Objeto.Controls[i].Name = 'imgSombra' then
|
|
begin
|
|
ImagenPNG := GetResourceAsPNG('SOMBRA');
|
|
try
|
|
(Objeto.Controls[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;}
|
|
|
|
if Objeto.Components[i].Name = 'imgFondo' then
|
|
begin
|
|
ImagenPNG := GetResourceAsPNG('WP_FONDO');
|
|
try
|
|
(Objeto.Components[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;
|
|
|
|
if Objeto.Components[i].Name = 'pnlBarraSuperior' then
|
|
begin
|
|
with Objeto.Components[i] as TRdxGradientePanel do
|
|
begin
|
|
BackGroundEffect := bdDown;
|
|
ColorStart := DarColorEntidad('barraprincipal', 'ToolbarColor2');
|
|
ColorEnd := DarColorEntidad('barraprincipal', 'ToolbarColor1');
|
|
end;
|
|
end;
|
|
|
|
if Objeto.Components[i].Name = 'eVersion' then
|
|
begin
|
|
with Objeto.Components[i] as TLabel do
|
|
Font.Color := DarColorEntidad('barraprincipal', 'ToolbarColor1');
|
|
end;
|
|
|
|
if Objeto.Components[i].Name = 'eEmpresa' then
|
|
begin
|
|
with Objeto.Components[i] as TLabel do
|
|
Font.Color := DarColorEntidad('barraprincipal', 'ToolbarColor2');
|
|
end;
|
|
|
|
if Objeto.Components[i].Name = 'eBienvenido' then
|
|
begin
|
|
with Objeto.Components[i] as TLabel do
|
|
Font.Color := DarColorEntidad('barraprincipal', 'ToolbarColor2');
|
|
end;
|
|
|
|
if ((Objeto.Components[i] is TWinControl) and
|
|
(csAcceptsControls in (Objeto.Components[i] as TWinControl).ControlStyle)) then
|
|
ConfigurarPantallaAcceso(Objeto.Components[i] as TWinControl)
|
|
end;
|
|
end;
|
|
|
|
procedure ConfigurarBarraLateral(Objeto: TWinControl; Entidad: TRdxEntidad);
|
|
var
|
|
i : integer;
|
|
TextoEntidad : String;
|
|
ImagenPNG : TPNGObject;
|
|
CadenaAux : String;
|
|
begin
|
|
TextoEntidad := DarNombreGrupo(Entidad);
|
|
if (Objeto is TCustomForm) then
|
|
(Objeto as TCustomForm).Color := DarColorEntidad('General', 'BackgroundColor');
|
|
for i := 0 to Objeto.ControlCount-1 do
|
|
begin
|
|
if Objeto.Controls[i].Name = 'pnlTitulo' then
|
|
(Objeto.Controls[i] as TPanel).Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
|
|
if Objeto.Controls[i].Name = 'eTitulo' then
|
|
(Objeto.Controls[i] as TLabel).Font.Color := clWhite;
|
|
|
|
if Objeto.Controls[i].Name = 'pnlBarraLateral' then
|
|
(Objeto.Controls[i] as TPanel).Color := DarColorEntidad(TextoEntidad, 'Color3');
|
|
|
|
if Objeto.Controls[i].Name = 'shSeparador' then
|
|
(Objeto.Controls[i] as TShape).Pen.Color := DarColorEntidad(TextoEntidad, 'Color2');
|
|
|
|
if Objeto.Controls[i].Name = 'imgSombra' then
|
|
begin
|
|
ImagenPNG := GetResourceAsPNG('SOMBRA');
|
|
try
|
|
(Objeto.Controls[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;
|
|
|
|
if Objeto.Controls[i].Name = 'imgFondo' then
|
|
begin
|
|
case Entidad of
|
|
entAgenda : CadenaAux := 'WP_AGENDA';
|
|
entDatos : CadenaAux := 'WP_DATOS';
|
|
entCliente : CadenaAux := 'WP_CLIENTES';
|
|
entProveedor : CadenaAux := 'WP_PROVEEDORES';
|
|
entEntLibro : CadenaAux := 'WP_CONTABILIDAD';
|
|
entInformes : CadenaAux := 'WP_INFORMES';
|
|
end;
|
|
ImagenPNG := GetResourceAsPNG(CadenaAux);
|
|
try
|
|
(Objeto.Controls[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;
|
|
|
|
if Objeto.Controls[i] is TRdxBotonLateral then
|
|
with Objeto.Controls[i] as TRdxBotonLateral do
|
|
begin
|
|
Height := 50;
|
|
Color := DarColorEntidad(TextoEntidad, 'Color3');
|
|
ColorFocused := DarColorEntidad('General', 'ControlFocusColor');
|
|
ColorDown := DarColorEntidad(TextoEntidad, 'Color2');
|
|
ColorBorder := DarColorEntidad(TextoEntidad, 'Color3');
|
|
ColorHighLight := DarColorEntidad(TextoEntidad, 'Color2');
|
|
ColorShadow := DarColorEntidad(TextoEntidad, 'Color2');
|
|
Font.Color := clBlack;
|
|
Font.Style := [];
|
|
FontDown.Color := clWhite;
|
|
FontDown.Style := [fsBold];
|
|
end;
|
|
|
|
if csAcceptsControls in Objeto.Controls[i].ControlStyle then
|
|
ConfigurarBarraLateral(Objeto.Controls[i] as TWinControl, Entidad)
|
|
end;
|
|
end;
|
|
|
|
procedure ConfigurarFrame(Objeto: TWinControl; Entidad: TRdxEntidad);
|
|
var
|
|
i : integer;
|
|
TextoEntidad : String;
|
|
ImagenPNG : TPNGObject;
|
|
CadenaAux : String;
|
|
begin
|
|
TextoEntidad := DarNombreGrupo(Entidad);
|
|
|
|
if (Objeto is TCustomForm) then
|
|
(Objeto as TCustomForm).Color := DarColorEntidad('General', 'BackgroundColor');
|
|
|
|
for i := 0 to Objeto.ComponentCount-1 do
|
|
begin
|
|
if Objeto.Components[i].Name = 'imgSombra' then
|
|
begin
|
|
ImagenPNG := GetResourceAsPNG('SOMBRA');
|
|
try
|
|
(Objeto.Components[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;
|
|
|
|
{ Esto es para que no falle cuando la entidad es EntVacia porque en el
|
|
fichero de colores no está definida esa entidad. }
|
|
if Entidad = entVacia then
|
|
Continue;
|
|
|
|
if (Objeto.Components[i] is TRdxCabecera) then
|
|
begin
|
|
(Objeto.Components[i] as TRdxCabecera).Font.Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TRdxPagesControl) then
|
|
begin
|
|
(Objeto.Components[i] as TRdxPagesControl).ColorTab := DarColorEntidad(TextoEntidad, 'Color3');
|
|
(Objeto.Components[i] as TRdxPagesControl).FontTab.Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TRdxPanelTituloOperacion) then
|
|
begin
|
|
(Objeto.Components[i] as TRdxPanelTituloOperacion).Color := DarColorEntidad(TextoEntidad, 'Color3');
|
|
(Objeto.Components[i] as TRdxPanelTituloOperacion).Font.Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TRdxBarraSuperior) and
|
|
(Objeto.Components[i].Name = 'pnlExtra') then
|
|
begin
|
|
(Objeto.Components[i] as TRdxBarraSuperior).Color := $00D9E5E9;
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TRdxBarraSuperior) and
|
|
(Objeto.Components[i].Name <> 'pnlExtra') then
|
|
begin
|
|
(Objeto.Components[i] as TRdxBarraSuperior).Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
(Objeto.Components[i] as TRdxBarraSuperior).Font.Color := DarColorEntidad(TextoEntidad, 'Color3');
|
|
end;
|
|
|
|
if ((Objeto.Components[i] is TRdxBotonSuperior) or
|
|
((Objeto.Components[i] is TRdxBotonMenu) and
|
|
(TRdxBotonMenu(Objeto.Components[i]).Parent is TRdxBarraSuperior))) then
|
|
begin
|
|
with (Objeto.Components[i] as TRdxBoton) do
|
|
begin
|
|
Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
ColorFocused := DarColorEntidad(TextoEntidad, 'Color2');
|
|
ColorDown := DarColorEntidad(TextoEntidad, 'Color2');
|
|
ColorBorder := DarColorEntidad(TextoEntidad, 'Color3');
|
|
ColorHighLight := DarColorEntidad(TextoEntidad, 'Color2');
|
|
ColorShadow := DarColorEntidad(TextoEntidad, 'Color2');
|
|
Font.Color := DarColorEntidad(TextoEntidad, 'Color3');
|
|
Font.Style := [fsBold];
|
|
FontDown.Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
FontDown.Style := [fsBold];
|
|
end;
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TPopupMenu2000) then
|
|
begin
|
|
with (Objeto.Components[i] as TPopupMenu2000).Options.Colors do
|
|
begin
|
|
Bevel := DarColorEntidad(TextoEntidad, 'Color3');
|
|
BevelShadow := DarColorEntidad(TextoEntidad, 'Color3');
|
|
Frame := DarColorEntidad(TextoEntidad, 'Color2');
|
|
FrameShadow := DarColorEntidad(TextoEntidad, 'Color2');
|
|
Border := DarColorEntidad(TextoEntidad, 'Color1');
|
|
Highlight := DarColorEntidad(TextoEntidad, 'Color3');
|
|
HighlightText := DarColorEntidad(TextoEntidad, 'Color1');
|
|
Pressed := DarColorEntidad(TextoEntidad, 'Color2');
|
|
PressedText := DarColorEntidad(TextoEntidad, 'Color1');
|
|
Line := DarColorEntidad(TextoEntidad, 'Color2');
|
|
Menu := DarColorEntidad(TextoEntidad, 'Color1');
|
|
MenuText := DarColorEntidad(TextoEntidad, 'Color3');
|
|
end;
|
|
with (Objeto.Components[i] as TPopupMenu2000).Options.Margins do
|
|
begin
|
|
Border := 2;
|
|
Bevel := 1;
|
|
Frame := 1;
|
|
end;
|
|
end;
|
|
|
|
if (Objeto.Components[i] is TAdvPanel) then
|
|
begin
|
|
(Objeto.Components[i] as TAdvPanel).Caption.Font.Color := DarColorEntidad(TextoEntidad, 'Color1');
|
|
(Objeto.Components[i] as TAdvPanel).Caption.MinMaxButtonColor := DarColorEntidad(TextoEntidad, 'Color1');
|
|
end;
|
|
|
|
if ((Objeto.Components[i] is TWinControl) and
|
|
(csAcceptsControls in (Objeto.Components[i] as TWinControl).ControlStyle)) then
|
|
ConfigurarFrame(Objeto.Components[i] as TWinControl, Entidad)
|
|
end;
|
|
end;
|
|
|
|
procedure ConfigurarVentanaPrincipal(Objeto: TWinControl);
|
|
var
|
|
i : integer;
|
|
ImagenPNG : TPNGObject;
|
|
CadenaAux : String;
|
|
begin
|
|
if (Objeto is TCustomForm) then
|
|
(Objeto as TCustomForm).Color := DarColorEntidad('General', 'BackgroundColor');
|
|
|
|
for i := 0 to Objeto.ControlCount-1 do
|
|
begin
|
|
if Objeto.Controls[i] is TLabel then
|
|
(Objeto.Controls[i] as TLabel).Font.Color := DarColorEntidad('barraprincipal', 'ToolbarFontColor');
|
|
|
|
if Objeto.Controls[i] is TFourthImage then
|
|
with (Objeto.Controls[i] as TFourthImage) do
|
|
begin
|
|
if Name = 'bEmpresas' then
|
|
CadenaAux := 'BT_ALMACEN';
|
|
if Name = 'bAgenda' then
|
|
CadenaAux := 'BT_AGENDA';
|
|
if Name = 'bDatos' then
|
|
CadenaAux := 'BT_DATOS';
|
|
if Name = 'bClientes' then
|
|
CadenaAux := 'BT_CLIENTES';
|
|
if Name = 'bProveedores' then
|
|
CadenaAux := 'BT_PROVEEDORES';
|
|
if Name = 'bInformes' then
|
|
CadenaAux := 'BT_INFORMES';
|
|
if Name = 'bContabilidad' then
|
|
CadenaAux := 'BT_CONTABILIDAD';
|
|
if Name = 'bOpciones' then
|
|
CadenaAux := 'BT_OPCIONES';
|
|
if Name = 'bSincronizacion' then
|
|
CadenaAux := 'BT_SINCRONIZACION';
|
|
ImagenPNG := GetResourceAsPNG(CadenaAux);
|
|
Options.EnabledPicture.Assign(ImagenPNG);
|
|
ImagenPNG.Free;
|
|
|
|
ImagenPNG := GetResourceAsPNG(CadenaAux + '_HOT');
|
|
Options.HotPicture.Assign(ImagenPNG);
|
|
Options.UpPicture.Assign(ImagenPNG);
|
|
ImagenPNG.Free;
|
|
|
|
ImagenPNG := GetResourceAsPNG(CadenaAux + '_CLICK');
|
|
Options.DownPicture.Assign(ImagenPNG);
|
|
ImagenPNG.Free;
|
|
|
|
ImagenPNG := GetResourceAsPNG(CadenaAux + '_DISABLED');
|
|
Options.DisabledPicture.Assign(ImagenPNG);
|
|
ImagenPNG.Free;
|
|
|
|
if Enabled then
|
|
Picture.Assign(Options.EnabledPicture)
|
|
else
|
|
Picture.Assign(Options.DisabledPicture);
|
|
end;
|
|
|
|
if Objeto.Controls[i].Name = 'imgFondo' then
|
|
begin
|
|
ImagenPNG := GetResourceAsPNG('WP_FONDO');
|
|
try
|
|
(Objeto.Controls[i] as TImage).Picture.Assign(ImagenPNG);
|
|
finally
|
|
ImagenPNG.Free;
|
|
end;
|
|
end;
|
|
|
|
if Objeto.Controls[i].Name = 'pnlBarraSuperior' then
|
|
begin
|
|
with Objeto.Controls[i] as TRdxGradientePanel do
|
|
begin
|
|
BackGroundEffect := bdDown;
|
|
ColorStart := DarColorEntidad('barraprincipal', 'ToolbarColor2');
|
|
ColorEnd := DarColorEntidad('barraprincipal', 'ToolbarColor1');
|
|
end;
|
|
end;
|
|
|
|
if csAcceptsControls in Objeto.Controls[i].ControlStyle then
|
|
ConfigurarVentanaPrincipal(Objeto.Controls[i] as TWinControl)
|
|
end;
|
|
end;
|
|
|
|
function PuedeSincronizar : boolean;
|
|
var
|
|
Outlook: TOutlookApplication;
|
|
DLLHandle: THandle;
|
|
begin
|
|
Result := False;
|
|
try
|
|
Outlook := TOutlookApplication.Create(nil);
|
|
try
|
|
Outlook.Connect;
|
|
Outlook.Disconnect;
|
|
DLLHandle := LoadLibrary('RAPI.DLL');
|
|
if DLLHandle > 32 then
|
|
Result := True;
|
|
finally
|
|
Outlook.Free;
|
|
end;
|
|
except
|
|
// No hay outlook instalado
|
|
Result := False;
|
|
end;
|
|
end;
|
|
|
|
constructor TdmConfiguracion.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
ListaBD := TStringList.Create;
|
|
end;
|
|
|
|
destructor TdmConfiguracion.Destroy;
|
|
begin
|
|
if ListaBD <> NIL then
|
|
ListaBD.Free;
|
|
inherited;
|
|
end;
|
|
|
|
function LeerConfiguracion: boolean;
|
|
var
|
|
Fichero : String;
|
|
i : Integer;
|
|
begin
|
|
Fichero := ExtractFileDir(ParamStr(0))+ '\' + FICHERO_CONFIGURACION;
|
|
if not FileExists(Fichero) then
|
|
begin
|
|
VerMensajeFmt('No se ha encontrado el fichero de configuración' + #10#13 + '%s', [Fichero]);
|
|
Result := False;
|
|
Exit;
|
|
end;
|
|
with TIniFile.Create(Fichero) do
|
|
begin
|
|
ListaBD.Clear;
|
|
ReadSectionValues('BD', ListaBD);
|
|
Result := not (ListaBD.Count = 0);
|
|
Free;
|
|
end;
|
|
|
|
// Leer Colores;
|
|
Fichero := ExtractFileDir(ParamStr(0))+ '\' + FICHERO_COLORES;
|
|
|
|
if not FileExists(Fichero) then
|
|
begin
|
|
VerMensajeFmt('No se ha encontrado el fichero de configuración de colores' + #10#13 + '%s', [Fichero]);
|
|
Result := False;
|
|
exit;
|
|
end;
|
|
|
|
with TIniFile.Create(Fichero) do
|
|
begin
|
|
FColores := TStringList.Create;
|
|
ReadSections(FColores);
|
|
|
|
if FColores.Count = 0 then
|
|
Result := False;
|
|
|
|
for i := 0 to FColores.Count - 1 do
|
|
begin
|
|
FColores.Objects[i] := TStringList.Create;
|
|
ReadSectionValues(FColores.Strings[i], TStringList(FColores.Objects[i]));
|
|
end;
|
|
|
|
with dmConfiguracion.amSkinPrincipal.Colors do
|
|
begin
|
|
Menu := DarColorEntidad('barraprincipal', 'ToolbarColor2');
|
|
end;
|
|
|
|
Free;
|
|
end;
|
|
end;
|
|
|
|
end.
|
|
|