Commit eff65ccb authored by kravtsov's avatar kravtsov

[-] При ошибке загрузчи логотипа будет выдаваться ошибка 'Не удалось загрузить логотип'

[-] Изменено значение по умолчанию свойства PrintRecMessageMode Теперь PrintRecMessageMode = PrintRecMessageModeBefore
parent 7f54f66b
......@@ -4,6 +4,17 @@
Company : SHTRIH-M, Russia, Moscow, Masterkova 4
(495) 787-60-90, www.shtrih-m.ru
*******************************************************************
OposShtrih_1.13_476.exe
19 февраля 2018 14:50
[-] При ошибке загрузчи логотипа будет выдаваться ошибка
'Не удалось загрузить логотип'
[-] Изменено значение по умолчанию свойства PrintRecMessageMode
Теперь PrintRecMessageMode = PrintRecMessageModeBefore
*******************************************************************
OposShtrih_1.13_475.exe
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,475
PRODUCTVERSION 1,13,0,475
FILEVERSION 1,13,0,476
PRODUCTVERSION 1,13,0,476
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS setup utility\0"
VALUE "FileVersion", "1.13.0.475\0"
VALUE "FileVersion", "1.13.0.476\0"
VALUE "InternalName", "OPOS setup \0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposConfig.exe\0"
......
[Closed Files]
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\PrinterTypes.pas',0,1,166,17,190,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\CustomReceipt.pas',0,1,430,2,432,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SharedPrinter.pas',0,1,1,1,1,0,0
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,4563,3,4606,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrReceiptTest.pas',0,1,100,5,112,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\Opos\SMFiscalPrinter.pas',0,1,1636,1,1655,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,1,1,1,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\ReceiptPrinter.pas',0,1,1,47,3,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalReceiptPrinter.pas',0,1,1,40,15,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',0,1,1,1,1,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,4437,105,4468,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,963,37,969,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\PrinterParameters.pas',0,1,1,1,1,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,1,26,6,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\PrinterParameters.pas',0,1,1,23,23,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SharedPrinter.pas',0,1,1072,2,1091,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas',0,1,1,15,30,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',0,1,4175,2,4177,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\DIOHandlers.pas',0,1,69,15,70,0,0
[Modules]
Module0=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SalesReceipt.pas
Count=1
EditWindowCount=1
Count=0
EditWindowCount=0
TypeLibWindowCount=3
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SalesReceipt.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmScaleTest\SmScaleTestLib.dpr]
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Source\OposShtrih.bpg]
FormState=0
FormOnTop=0
......@@ -97,39 +87,9 @@ FormOnTop=0
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=1
CurrentView=0
View0=0
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=2
Left=323
Top=138
Width=1302
Height=682
MaxLeft=-8
MaxTop=106
MaxWidth=1936
MaxHeight=952
ClientWidth=1920
ClientHeight=914
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
RightPanelSize=0
BottomPanelSize=0
BottomPanelClients=MessageView@EditWindow0
BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF
[View0]
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SalesReceipt.pas
CursorX=34
CursorY=672
TopLine=662
LeftCol=1
[C:\projects\OPOSShtrih\Test\SmScaleTest\SmScaleTestLib.dpr]
FormState=0
FormOnTop=0
[TypeLibEditWindow0]
Create=1
......@@ -214,8 +174,8 @@ Left=336
Top=9
Width=1584
Height=122
MaxLeft=-1
MaxTop=-1
MaxLeft=-8
MaxTop=-8
MaxWidth=1936
MaxHeight=122
ClientWidth=1920
......@@ -228,11 +188,11 @@ State=0
Left=8
Top=124
Width=650
Height=514
Height=498
MaxLeft=-1
MaxTop=-1
ClientWidth=634
ClientHeight=480
ClientHeight=464
TBDockHeight=681
LRDockWidth=445
Dockable=0
......@@ -269,7 +229,7 @@ ClientHeight=60
[PropertyInspector]
Create=1
Visible=1
Visible=0
State=0
Left=3
Top=118
......@@ -454,41 +414,9 @@ Column2Width=545
EntryPointPane=225
CompUnitPane=104
[CodeExplorer@EditWindow0]
Create=1
Visible=0
State=0
Left=-127
Top=-6
Width=140
Height=305
MaxLeft=-1
MaxTop=-1
ClientWidth=140
ClientHeight=305
TBDockHeight=305
LRDockWidth=140
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=0
State=0
Left=-133
Top=-705
Width=443
Height=85
MaxLeft=-1
MaxTop=-1
ClientWidth=443
ClientHeight=85
TBDockHeight=85
LRDockWidth=443
Dockable=1
[DockHosts]
DockHostCount=0
[ActiveProject]
ActiveProject=3
ActiveProject=1
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,475
PRODUCTVERSION 1,13,0,475
FILEVERSION 1,13,0,476
PRODUCTVERSION 1,13,0,476
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS test utility\0"
VALUE "FileVersion", "1.13.0.475\0"
VALUE "FileVersion", "1.13.0.476\0"
VALUE "InternalName", "OPOS test\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposTest.exe\0"
......
......@@ -1014,7 +1014,15 @@ end;
procedure TDIOLoadLogo.DirectIO(var pData: Integer;
var pString: WideString);
begin
Printer.LoadLogo(pString);
try
Printer.LoadLogo(pString);
except
on E: Exception do
begin
Logger.Error(E.Message);
raise Exception.Create(' ');
end;
end;
end;
{ TDIOPrintLogo }
......
......@@ -35,17 +35,23 @@ type
function GetEnabled: Boolean;
function GetFilePath: string;
function GetDeviceName: string;
function GetFileName: string;
procedure SetEnabled(Value: Boolean);
procedure SetFilePath(const Value: string);
procedure SetSeparator(const Value: string);
procedure SetMaxCount(const Value: Integer);
procedure SetDeviceName(const Value: string);
function GetTimeStampEnabled: Boolean;
procedure SetTimeStampEnabled(const Value: Boolean);
procedure CloseFile;
property Enabled: Boolean read GetEnabled write SetEnabled;
property FilePath: string read GetFilePath write SetFilePath;
property MaxCount: Integer read GetMaxCount write SetMaxCount;
property Separator: string read GetSeparator write SetSeparator;
property DeviceName: string read GetDeviceName write SetDeviceName;
property TimeStampEnabled: Boolean read GetTimeStampEnabled write SetTimeStampEnabled;
end;
......@@ -61,6 +67,7 @@ type
FMaxCount: Integer;
FLock: TCriticalSection;
FDeviceName: string;
FTimeStampEnabled: Boolean;
procedure OpenFile;
procedure CloseFile;
......@@ -87,6 +94,8 @@ type
procedure SetFilePath(const Value: string);
function GetDeviceName: string;
procedure SetDeviceName(const Value: string);
function GetTimeStampEnabled: Boolean;
procedure SetTimeStampEnabled(const Value: Boolean);
public
constructor Create;
destructor Destroy; override;
......@@ -119,6 +128,7 @@ type
property MaxCount: Integer read GetMaxCount write SetMaxCount;
property Separator: string read GetSeparator write SetSeparator;
property DeviceName: string read GetDeviceName write SetDeviceName;
property TimeStampEnabled: Boolean read GetTimeStampEnabled write SetTimeStampEnabled;
end;
implementation
......@@ -279,6 +289,7 @@ begin
Enabled := False;
FilePath := IncludeTrailingBackSlash(ExtractFilePath(GetModuleFileName)) + 'Logs';
FileName := GetFileName;
FTimeStampEnabled := True;
end;
procedure TLogFile.OpenFile;
......@@ -440,7 +451,10 @@ const
var
Line: string;
begin
Line := Format('[%s] [%.8d] %s', [GetTimeStamp, GetCurrentThreadID, Data]) + CRLF;
Line := Data;
if FTimeStampEnabled then
Line := Format('[%s] [%.8d] %s', [GetTimeStamp, GetCurrentThreadID, Line]);
Line := Line + CRLF;
Write(Line);
end;
......@@ -656,4 +670,14 @@ begin
FDeviceName := Value;
end;
function TLogFile.GetTimeStampEnabled: Boolean;
begin
Result := FTimeStampEnabled;
end;
procedure TLogFile.SetTimeStampEnabled(const Value: Boolean);
begin
FTimeStampEnabled := Value;
end;
end.
......@@ -7,7 +7,7 @@ uses
DeviceService;
const
GenericServiceVersion = deviceVersion113 + 475;
GenericServiceVersion = deviceVersion113 + 476;
implementation
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,475
PRODUCTVERSION 1,13,0,475
FILEVERSION 1,13,0,476
PRODUCTVERSION 1,13,0,476
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Fiscal printer service\0"
VALUE "FileVersion", "1.13.0.475\0"
VALUE "FileVersion", "1.13.0.476\0"
VALUE "InternalName", "Fiscal printer driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmFiscalPrinter.dll\0"
......
......@@ -14,7 +14,7 @@ const
PrintRecMessageModeNormal = 0;
PrintRecMessageModeBefore = 1;
DefPrintRecMessageMode = PrintRecMessageModeNormal;
DefPrintRecMessageMode = PrintRecMessageModeBefore;
/////////////////////////////////////////////////////////////////////////////
// Maximum block size for FF31 command, read FS data block
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,475
PRODUCTVERSION 1,13,0,475
FILEVERSION 1,13,0,476
PRODUCTVERSION 1,13,0,476
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Fiscal printer print server\0"
VALUE "FileVersion", "1.13.0.475\0"
VALUE "FileVersion", "1.13.0.476\0"
VALUE "InternalName", "Fiscal printer driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmFptrSrv.exe\0"
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,475
PRODUCTVERSION 1,13,0,475
FILEVERSION 1,13,0,476
PRODUCTVERSION 1,13,0,476
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Scale service\0"
VALUE "FileVersion", "1.13.0.475\0"
VALUE "FileVersion", "1.13.0.476\0"
VALUE "InternalName", "Scale driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmScale.dll\0"
......
......@@ -4,40 +4,41 @@ SmFiscalPrinterTest.exe=1
TOposStatisticsTest=1
TduSemaphore=1
TduFiscalPrinter=1
TCommandDefsTest=1
TFiscalPrinterTest=1
TDfmFileTest=1
TWideStringTest=1
TFiscalPrinterDeviceTest=1
TPrinterParametersTest=1
TEscPrinterTest=1
TPrinterEncodingTest=1
TIniFileTest=1
TXmlReceiptWriterTest=1
TCommandDefsTest=0
TFiscalPrinterTest=0
TDfmFileTest=0
TWideStringTest=0
TFiscalPrinterDeviceTest=0
TPrinterParametersTest=0
TEscPrinterTest=0
TPrinterEncodingTest=0
TIniFileTest=0
TXmlReceiptWriterTest=0
TZIntTest=1
TSharedPrinterTest=0
TTlvSenderTest=0
TOFDWriterTest=1
TSysUtilsTest=1
TSysUtilsTest=0
TOFDTest=0
TRosneftSalesReceiptTest=1
TElectronicJournalTest=1
TMalinaCardTest=1
TMalinaFilterTest=1
TTankFilterTest=1
TTankReaderTest=1
TUniposReaderTest=1
TFSSalesReceiptTest=1
TduSerialPort=1
TStringUtilsTest=1
TElectronicJournalTest=0
TMalinaCardTest=0
TMalinaFilterTest=0
TTankFilterTest=0
TTankReaderTest=0
TUniposReaderTest=0
TFSSalesReceiptTest=0
TduSerialPort=0
TStringUtilsTest=0
TRetalixTest=0
TDateTimeTest=1
TDateTimeTest=0
TTemplateItemTest=1
TReceiptTemplateTest=1
TReceiptTemplateTest=0
TResourceStringTest=1
TBitTest=1
TBitTest=0
TICMPClientTest=1
TSocketPortTest=1
TSocketPortTest=0
TLogFileTest=1
[Tests.SmFiscalPrinterTest.exe.TOposStatisticsTest]
CheckReset=1
CheckUpdate=1
......@@ -241,12 +242,12 @@ CheckGetOpenResult=1
CheckPrintRecItemAdjustmentVoid=1
CheckPrintRecItemVoid=1
[Tests.SmFiscalPrinterTest.exe.TCommandDefsTest]
CheckSaveToXml=1
CheckSaveToXml=0
[GUITestRunner Config]
AutoSave=1
Left=493
Top=205
Width=912
Width=1033
Height=808
Maximized=0
UseRegistry=0
......@@ -256,235 +257,235 @@ ErrorMessage.Visible=1
FailureList.ColumnWidth[0]=241
FailureList.ColumnWidth[1]=200
FailureList.ColumnWidth[2]=800
FailureList.ColumnWidth[3]=-357
FailureList.ColumnWidth[3]=-236
HideTestNodesOnOpen=0
BreakOnFailures=1
SelectTestedNode=1
[Tests.SmFiscalPrinterTest.exe.TFiscalPrinterTest]
CheckCapCompareFirmwareVersion=1
CheckCapPowerReporting=1
CheckCapStatisticsReporting=1
CheckCapUpdateFirmware=1
CheckCapUpdateStatistics=1
CheckCheckHealthText=1
CheckClaimed=1
CheckDataCount=1
CheckDataEventEnabled=1
CheckDeviceEnabled=1
CheckFreezeEvents=1
CheckOutputID=1
CheckPowerNotify=1
CheckPowerState=1
CheckState=1
CheckServiceObjectDescription=1
CheckServiceObjectVersion=1
CheckDeviceDescription=1
CheckDeviceName=1
CheckOpen=1
CheckClose=1
CheckClaim=1
CheckRelease=1
CheckCheckHealth=1
CheckClearInput=1
CheckClearInputProperties=1
CheckClearOutput=1
CheckDirectIO=1
CheckCompareFirmwareVersion=1
CheckResetStatistics=1
CheckRetrieveStatistics=1
CheckUpdateFirmware=1
CheckUpdateStatistics=1
CheckAmountDecimalPlaces=1
CheckAsyncMode=1
CheckCheckTotal=1
CheckCountryCode=1
CheckCoverOpen=1
CheckDayOpened=1
CheckDescriptionLength=1
CheckDuplicateReceipt=1
CheckErrorLevel=1
CheckErrorOutID=1
CheckErrorState=1
CheckErrorStation=1
CheckFlagWhenIdle=1
CheckJrnEmpty=1
CheckJrnNearEnd=1
CheckMessageLength=1
CheckNumHeaderLines=1
CheckNumTrailerLines=1
CheckNumVatRates=1
CheckPrinterState=1
CheckQuantityDecimalPlaces=1
CheckQuantityLength=1
CheckRecEmpty=1
CheckRecNearEnd=1
CheckRemainingFiscalMemory=1
CheckSlpEmpty=1
CheckSlpNearEnd=1
CheckSlipSelection=1
CheckTrainingModeActive=1
CheckActualCurrency=1
CheckContractorId=1
CheckDateType=1
CheckFiscalReceiptStation=1
CheckFiscalReceiptType=1
CheckMessageType=1
CheckTotalizerType=1
CheckCapAdditionalLines=1
CheckCapAmountAdjustment=1
CheckCapAmountNotPaid=1
CheckCapCheckTotal=1
CheckCapCoverSensor=1
CheckCapDoubleWidth=1
CheckCapDuplicateReceipt=1
CheckCapFixedOutput=1
CheckCapHasVatTable=1
CheckCapIndependentHeader=1
CheckCapItemList=1
CheckCapCompareFirmwareVersion=0
CheckCapPowerReporting=0
CheckCapStatisticsReporting=0
CheckCapUpdateFirmware=0
CheckCapUpdateStatistics=0
CheckCheckHealthText=0
CheckClaimed=0
CheckDataCount=0
CheckDataEventEnabled=0
CheckDeviceEnabled=0
CheckFreezeEvents=0
CheckOutputID=0
CheckPowerNotify=0
CheckPowerState=0
CheckState=0
CheckServiceObjectDescription=0
CheckServiceObjectVersion=0
CheckDeviceDescription=0
CheckDeviceName=0
CheckOpen=0
CheckClose=0
CheckClaim=0
CheckRelease=0
CheckCheckHealth=0
CheckClearInput=0
CheckClearInputProperties=0
CheckClearOutput=0
CheckDirectIO=0
CheckCompareFirmwareVersion=0
CheckResetStatistics=0
CheckRetrieveStatistics=0
CheckUpdateFirmware=0
CheckUpdateStatistics=0
CheckAmountDecimalPlaces=0
CheckAsyncMode=0
CheckCheckTotal=0
CheckCountryCode=0
CheckCoverOpen=0
CheckDayOpened=0
CheckDescriptionLength=0
CheckDuplicateReceipt=0
CheckErrorLevel=0
CheckErrorOutID=0
CheckErrorState=0
CheckErrorStation=0
CheckFlagWhenIdle=0
CheckJrnEmpty=0
CheckJrnNearEnd=0
CheckMessageLength=0
CheckNumHeaderLines=0
CheckNumTrailerLines=0
CheckNumVatRates=0
CheckPrinterState=0
CheckQuantityDecimalPlaces=0
CheckQuantityLength=0
CheckRecEmpty=0
CheckRecNearEnd=0
CheckRemainingFiscalMemory=0
CheckSlpEmpty=0
CheckSlpNearEnd=0
CheckSlipSelection=0
CheckTrainingModeActive=0
CheckActualCurrency=0
CheckContractorId=0