Tarea #82 -> Cambiar colores de la interfaz cuando se cambia la empresa

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@526 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2010-06-22 19:31:10 +00:00
parent aab8f5c546
commit a452881982
2 changed files with 25 additions and 17 deletions

View File

@ -24,10 +24,10 @@ type
FEscribirLog : TCriticalSection; FEscribirLog : TCriticalSection;
procedure IniciarLog; procedure IniciarLog;
procedure DetenerLog; procedure DetenerLog;
procedure InitStyleManager;
procedure OnTBXThemeChange(Sender: TObject); procedure OnTBXThemeChange(Sender: TObject);
procedure LeerConfiguracion; procedure LeerConfiguracion;
public public
procedure InitStyleManager (ThemeID : integer = 0);
procedure EscribirLog(const AMensaje : String); procedure EscribirLog(const AMensaje : String);
procedure SalvarConfiguracion; procedure SalvarConfiguracion;
property OnThemeChange: TNotifyEvent read FOnThemeChange write property OnThemeChange: TNotifyEvent read FOnThemeChange write
@ -69,7 +69,9 @@ begin
JvLogFile.Clear; JvLogFile.Clear;
end; end;
procedure TdmBase.InitStyleManager; procedure TdmBase.InitStyleManager(ThemeID : integer = 0);
begin
if ThemeID < 2 then
begin begin
if not USE_THEMES then if not USE_THEMES then
begin begin
@ -92,6 +94,10 @@ begin
end; end;
end; end;
end; end;
end
else begin
StyleManager.Theme := nptStandard;
end;
end; end;

View File

@ -205,6 +205,8 @@ var
begin begin
ATitulo := AppFactuGES.GetAppFullName; ATitulo := AppFactuGES.GetAppFullName;
dmBase.InitStyleManager(JvNavigationPane.ActivePage.Tag);
if Assigned(AppFactuGES.EmpresaActiva) then if Assigned(AppFactuGES.EmpresaActiva) then
ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo; ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo;