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
|
||||
FOnThemeChange: TNotifyEvent;
|
||||
FEscribirLog : TCriticalSection;
|
||||
{procedure IniciarLog;
|
||||
procedure DetenerLog;}
|
||||
procedure IniciarLog;
|
||||
procedure DetenerLog;
|
||||
procedure InitStyleManager;
|
||||
procedure OnTBXThemeChange(Sender: TObject);
|
||||
procedure LeerConfiguracion;
|
||||
public
|
||||
{procedure EscribirLog(const AMensaje : String);}
|
||||
procedure EscribirLog(const AMensaje : String);
|
||||
procedure SalvarConfiguracion;
|
||||
property OnThemeChange: TNotifyEvent read FOnThemeChange write
|
||||
FOnThemeChange;
|
||||
@ -53,7 +53,7 @@ uses
|
||||
}
|
||||
procedure TdmBase.DAClientDataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
//IniciarLog; <- NO SE USA
|
||||
IniciarLog;
|
||||
|
||||
TBXSwitcher.OnThemeChange := OnTBXThemeChange;
|
||||
TBXSetTheme('Office2003');
|
||||
@ -61,25 +61,25 @@ begin
|
||||
LeerConfiguracion;
|
||||
end;
|
||||
|
||||
{procedure TdmBase.IniciarLog;
|
||||
procedure TdmBase.IniciarLog;
|
||||
var
|
||||
AIniFile : String;
|
||||
ALogFileName : String;
|
||||
begin
|
||||
inherited;
|
||||
FEscribirLog := TCriticalSection.Create;
|
||||
|
||||
AIniFile := GetSpecialFolderPath(CSIDL_LOCAL_APPDATA); //[All Users]\Application Data
|
||||
AIniFile := AIniFile + PathDelim + GetAppName + PathDelim;
|
||||
|
||||
if not DirectoryExists(AIniFile) then
|
||||
CreateDir(AIniFile);
|
||||
|
||||
JvLogFile.Active := False;
|
||||
JvLogFile.FileName := AIniFile + 'ClientLog.txt';
|
||||
JvLogFile.AutoSave := True;
|
||||
JvLogFile.Active := True;
|
||||
JvLogFile.Clear;
|
||||
end;}
|
||||
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 := 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;
|
||||
@ -128,24 +128,22 @@ end;
|
||||
|
||||
procedure TdmBase.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
// DetenerLog; <- NO SE USA
|
||||
DetenerLog;
|
||||
end;
|
||||
|
||||
{procedure TdmBase.DetenerLog;
|
||||
procedure TdmBase.DetenerLog;
|
||||
begin
|
||||
FreeAndNIL(FEscribirLog);
|
||||
end;
|
||||
|
||||
procedure TdmBase.EscribirLog(const AMensaje: String);
|
||||
begin
|
||||
// dxPrintStyleManager1Style1.PrinterPage.PageFooter.LeftTitle.Add(FEmpresaInformesBase);
|
||||
|
||||
FEscribirLog.Acquire;
|
||||
try
|
||||
JvLogFile.Add(AMensaje);
|
||||
finally
|
||||
FEscribirLog.Release;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -435,7 +435,7 @@ begin
|
||||
if Assigned(_FocusedView) then
|
||||
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;
|
||||
|
||||
if not DirectoryExists(AIniFile) then
|
||||
@ -458,7 +458,7 @@ begin
|
||||
if Assigned(_FocusedView) then
|
||||
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;
|
||||
|
||||
if not DirectoryExists(AIniFile) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user