Tarea #569 -> Revisar la aplicación para que no de problemas con Windows 7
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1046 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
b6f0b894c3
commit
0c20497abc
@ -24,13 +24,13 @@ type
|
|||||||
private
|
private
|
||||||
FOnThemeChange: TNotifyEvent;
|
FOnThemeChange: TNotifyEvent;
|
||||||
FEscribirLog : TCriticalSection;
|
FEscribirLog : TCriticalSection;
|
||||||
{procedure IniciarLog;
|
procedure IniciarLog;
|
||||||
procedure DetenerLog;}
|
procedure DetenerLog;
|
||||||
procedure InitStyleManager;
|
procedure InitStyleManager;
|
||||||
procedure OnTBXThemeChange(Sender: TObject);
|
procedure OnTBXThemeChange(Sender: TObject);
|
||||||
procedure LeerConfiguracion;
|
procedure LeerConfiguracion;
|
||||||
public
|
public
|
||||||
{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
|
||||||
FOnThemeChange;
|
FOnThemeChange;
|
||||||
@ -53,7 +53,7 @@ uses
|
|||||||
}
|
}
|
||||||
procedure TdmBase.DAClientDataModuleCreate(Sender: TObject);
|
procedure TdmBase.DAClientDataModuleCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//IniciarLog; <- NO SE USA
|
IniciarLog;
|
||||||
|
|
||||||
TBXSwitcher.OnThemeChange := OnTBXThemeChange;
|
TBXSwitcher.OnThemeChange := OnTBXThemeChange;
|
||||||
TBXSetTheme('Office2003');
|
TBXSetTheme('Office2003');
|
||||||
@ -61,25 +61,25 @@ begin
|
|||||||
LeerConfiguracion;
|
LeerConfiguracion;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{procedure TdmBase.IniciarLog;
|
procedure TdmBase.IniciarLog;
|
||||||
var
|
var
|
||||||
AIniFile : String;
|
ALogFileName : String;
|
||||||
begin
|
begin
|
||||||
inherited;
|
|
||||||
FEscribirLog := TCriticalSection.Create;
|
FEscribirLog := TCriticalSection.Create;
|
||||||
|
|
||||||
AIniFile := GetSpecialFolderPath(CSIDL_LOCAL_APPDATA); //[All Users]\Application Data
|
ALogFileName := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data
|
||||||
AIniFile := AIniFile + PathDelim + GetAppName + PathDelim;
|
ALogFileName := ALogFileName + PathDelim + 'Rodax Software' + PathDelim + 'FactuGES' + PathDelim;
|
||||||
|
if SysUtils.ForceDirectories(ALogFileName) then
|
||||||
if not DirectoryExists(AIniFile) then
|
begin
|
||||||
CreateDir(AIniFile);
|
JvLogFile.Active := False;
|
||||||
|
JvLogFile.FileName := ALogFileName + 'ClientLog.txt';
|
||||||
JvLogFile.Active := False;
|
JvLogFile.AutoSave := True;
|
||||||
JvLogFile.FileName := AIniFile + 'ClientLog.txt';
|
JvLogFile.Active := True;
|
||||||
JvLogFile.AutoSave := True;
|
JvLogFile.Clear;
|
||||||
JvLogFile.Active := True;
|
end
|
||||||
JvLogFile.Clear;
|
else
|
||||||
end;}
|
raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TdmBase.InitStyleManager;
|
procedure TdmBase.InitStyleManager;
|
||||||
@ -128,24 +128,22 @@ end;
|
|||||||
|
|
||||||
procedure TdmBase.DataModuleDestroy(Sender: TObject);
|
procedure TdmBase.DataModuleDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// DetenerLog; <- NO SE USA
|
DetenerLog;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{procedure TdmBase.DetenerLog;
|
procedure TdmBase.DetenerLog;
|
||||||
begin
|
begin
|
||||||
FreeAndNIL(FEscribirLog);
|
FreeAndNIL(FEscribirLog);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TdmBase.EscribirLog(const AMensaje: String);
|
procedure TdmBase.EscribirLog(const AMensaje: String);
|
||||||
begin
|
begin
|
||||||
// dxPrintStyleManager1Style1.PrinterPage.PageFooter.LeftTitle.Add(FEmpresaInformesBase);
|
|
||||||
|
|
||||||
FEscribirLog.Acquire;
|
FEscribirLog.Acquire;
|
||||||
try
|
try
|
||||||
JvLogFile.Add(AMensaje);
|
JvLogFile.Add(AMensaje);
|
||||||
finally
|
finally
|
||||||
FEscribirLog.Release;
|
FEscribirLog.Release;
|
||||||
end;
|
end;
|
||||||
end;}
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -435,7 +435,7 @@ begin
|
|||||||
if Assigned(_FocusedView) then
|
if Assigned(_FocusedView) then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data
|
AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data
|
||||||
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
||||||
|
|
||||||
if not DirectoryExists(AIniFile) then
|
if not DirectoryExists(AIniFile) then
|
||||||
@ -458,7 +458,7 @@ begin
|
|||||||
if Assigned(_FocusedView) then
|
if Assigned(_FocusedView) then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data
|
AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data
|
||||||
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
|
||||||
|
|
||||||
if not DirectoryExists(AIniFile) then
|
if not DirectoryExists(AIniFile) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user