Cambios necesarios para que no haya problemas con windows 7
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@52 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
parent
38e48889ef
commit
a9204dcafa
@ -4,10 +4,10 @@ interface
|
||||
|
||||
uses
|
||||
Controls, SyncObjs, PngImageList, JvComponent, JvNavigationPane, TBXSwitcher,
|
||||
TBXOffice2003Theme, Classes, ImgList,
|
||||
TBXOffice2003Theme, Classes, ImgList, SysUtils,
|
||||
DataAbstract4_Intf, uDADataTable, JvAppStorage, JvAppRegistryStorage,
|
||||
JvComponentBase, JvLogFile, dxPSGlbl, dxPSUtl, dxPrnPg,
|
||||
dxBkgnd, dxWrap, dxPrnDev, dxPgsDlg, dxPSCore, cxLookAndFeels;
|
||||
dxBkgnd, dxWrap, dxPrnDev, dxPgsDlg, dxPSCore;
|
||||
|
||||
type
|
||||
TdmBase = class(TDataModule)
|
||||
@ -24,10 +24,10 @@ type
|
||||
FEscribirLog : TCriticalSection;
|
||||
procedure IniciarLog;
|
||||
procedure DetenerLog;
|
||||
procedure InitStyleManager;
|
||||
procedure OnTBXThemeChange(Sender: TObject);
|
||||
procedure LeerConfiguracion;
|
||||
public
|
||||
procedure InitStyleManager (ThemeID : integer = 0);
|
||||
procedure EscribirLog(const AMensaje : String);
|
||||
procedure SalvarConfiguracion;
|
||||
property OnThemeChange: TNotifyEvent read FOnThemeChange write
|
||||
@ -43,14 +43,15 @@ implementation
|
||||
|
||||
uses
|
||||
uDataModuleConexion, Dialogs, TBX, TBXThemes, Forms, Windows,
|
||||
JclFileUtils, cxControls, SysUtils, uDataModuleConfiguracion;
|
||||
JclFileUtils, cxControls, uDataModuleConfiguracion,
|
||||
SHFolder, uSistemaFunc, uAppInfoUtils;
|
||||
|
||||
{
|
||||
*********************************** TdmBase ************************************
|
||||
}
|
||||
procedure TdmBase.DAClientDataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
IniciarLog;
|
||||
IniciarLog; //<- NO SE USA
|
||||
|
||||
TBXSwitcher.OnThemeChange := OnTBXThemeChange;
|
||||
TBXSetTheme('Office2003');
|
||||
@ -59,19 +60,28 @@ begin
|
||||
end;
|
||||
|
||||
procedure TdmBase.IniciarLog;
|
||||
var
|
||||
ALogFileName : String;
|
||||
begin
|
||||
inherited;
|
||||
FEscribirLog := TCriticalSection.Create;
|
||||
|
||||
ALogFileName := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data
|
||||
ALogFileName := ALogFileName + PathDelim + 'Rodax Software' + PathDelim + 'FactuGES' + PathDelim;
|
||||
|
||||
if SysUtils.ForceDirectories(ALogFileName) then
|
||||
begin
|
||||
JvLogFile.Active := False;
|
||||
JvLogFile.FileName := ExtractFilePath(Application.ExeName) + 'ClientLog.txt';
|
||||
JvLogFile.FileName := ALogFileName + 'ClientLog.txt';
|
||||
JvLogFile.AutoSave := True;
|
||||
JvLogFile.Active := True;
|
||||
JvLogFile.Clear;
|
||||
end
|
||||
else
|
||||
raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError));
|
||||
end;
|
||||
|
||||
procedure TdmBase.InitStyleManager(ThemeID : integer = 0);
|
||||
begin
|
||||
if ThemeID < 2 then
|
||||
procedure TdmBase.InitStyleManager;
|
||||
begin
|
||||
if not USE_THEMES then
|
||||
begin
|
||||
@ -94,10 +104,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
StyleManager.Theme := nptStandard;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -121,7 +127,7 @@ end;
|
||||
|
||||
procedure TdmBase.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
DetenerLog;
|
||||
DetenerLog; //<- NO SE USA
|
||||
end;
|
||||
|
||||
procedure TdmBase.DetenerLog;
|
||||
|
||||
@ -558,16 +558,8 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
||||
Left = 160
|
||||
Top = 182
|
||||
end
|
||||
object HostMenu: TJvMainMenu
|
||||
object HostMenu: TMainMenu
|
||||
Images = ModulesSmallImageList
|
||||
Style = msItemPainter
|
||||
ImageMargin.Left = 0
|
||||
ImageMargin.Top = 0
|
||||
ImageMargin.Right = 0
|
||||
ImageMargin.Bottom = 0
|
||||
ImageSize.Height = 0
|
||||
ImageSize.Width = 0
|
||||
ItemPainter = JvXPMenuItemPainter1
|
||||
Left = 248
|
||||
Top = 168
|
||||
object Archivo2_OLD: TMenuItem
|
||||
@ -715,12 +707,6 @@ object fPantallaPrincipal: TfPantallaPrincipal
|
||||
Action = actMenuInformes
|
||||
end
|
||||
end
|
||||
object JvXPMenuItemPainter1: TJvXPMenuItemPainter
|
||||
SelectionFrameBrush.Color = 13811126
|
||||
SelectionFramePen.Color = 6956042
|
||||
Left = 288
|
||||
Top = 168
|
||||
end
|
||||
object StatusPanelImageList: TPngImageList
|
||||
PngImages = <
|
||||
item
|
||||
|
||||
@ -39,8 +39,7 @@ type
|
||||
actConexion: TAction;
|
||||
actAcerca: TAction;
|
||||
pnlBorde: TJvXPContainer;
|
||||
HostMenu: TJvMainMenu;
|
||||
JvXPMenuItemPainter1: TJvXPMenuItemPainter;
|
||||
HostMenu: TMainMenu;
|
||||
Archivo2_OLD: TMenuItem;
|
||||
Ayuda2_OLD: TMenuItem;
|
||||
Cambiarmicontrasea2_OLD: TMenuItem;
|
||||
@ -205,8 +204,6 @@ var
|
||||
begin
|
||||
ATitulo := AppFactuGES.GetAppFullName;
|
||||
|
||||
dmBase.InitStyleManager(JvNavigationPane.ActivePage.Tag);
|
||||
|
||||
if Assigned(AppFactuGES.EmpresaActiva) then
|
||||
ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo;
|
||||
|
||||
|
||||
@ -343,7 +343,7 @@ begin
|
||||
if Assigned(_FocusedView) then
|
||||
begin
|
||||
|
||||
AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data
|
||||
AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[All Users]\Application Data
|
||||
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
||||
|
||||
if not DirectoryExists(AIniFile) then
|
||||
@ -441,7 +441,7 @@ begin
|
||||
if Assigned(_FocusedView) then
|
||||
begin
|
||||
|
||||
AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data
|
||||
AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[All Users]\Application Data
|
||||
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
||||
|
||||
if not DirectoryExists(AIniFile) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user