Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="project1"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="FCL"/>
</Item1>
<Item2>
<PackageName Value="rxnew"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="4">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
<Item4>
<Name Value="ETTF"/>
</Item4>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,22 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, rxnew, Unit1,
sysutils;
{$R *.res}
begin
RequireDerivedFormResource:=True;
DefaultFormatSettings.ThousandSeparator:=' ';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,567 @@
object Form1: TForm1
Left = 558
Height = 397
Top = 319
Width = 1043
Caption = 'Form1'
ClientHeight = 397
ClientWidth = 1043
OnClose = FormClose
OnCreate = FormCreate
LCLVersion = '1.9.0.0'
object Panel1: TPanel
Left = 0
Height = 50
Top = 347
Width = 1043
Align = alBottom
AutoSize = True
ClientHeight = 50
ClientWidth = 1043
TabOrder = 0
object Button1: TButton
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Panel1
Left = 477
Height = 36
Top = 7
Width = 88
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Create PDF'
OnClick = Button1Click
TabOrder = 0
end
object CheckBox1: TCheckBox
AnchorSideLeft.Control = Button1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrCenter
Left = 571
Height = 24
Top = 13
Width = 105
Caption = 'Enable tools'
Checked = True
OnChange = CheckBox1Change
State = cbChecked
TabOrder = 1
end
end
object PageControl1: TPageControl
Left = 0
Height = 347
Top = 0
Width = 1043
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
TabOrder = 1
object TabSheet1: TTabSheet
Caption = 'Test data'
ClientHeight = 313
ClientWidth = 1033
object RxDBGrid1: TRxDBGrid
Left = 0
Height = 313
Top = 0
Width = 1033
ColumnDefValues.BlobText = '(данные)'
TitleButtons = True
AutoSort = True
Columns = <
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'ID'
Width = 50
FieldName = 'ID'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Color = clSkyBlue
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Дата поставки'
Width = 120
FieldName = 'PDATE'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Color = clCream
Font.Color = clPurple
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Наименование продукта'
Width = 364
FieldName = 'NAME'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Alignment = taRightJustify
Footer.Value = 'Итого:'
Footer.ValueType = fvtStaticText
Footers = <
item
Alignment = taRightJustify
Value = 'Итого:'
ValueType = fvtStaticText
end
item
Alignment = taRightJustify
Value = 'Минимум:'
ValueType = fvtStaticText
end
item
Alignment = taRightJustify
Value = 'Максимум:'
ValueType = fvtStaticText
end>
WordWrap = True
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Сумма'
Width = 100
FieldName = 'SUM'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Alignment = taRightJustify
Footer.DisplayFormat = '#,##0.00'
Footer.FieldName = 'SUM'
Footer.ValueType = fvtSum
Footers = <
item
Alignment = taRightJustify
DisplayFormat = '#,##0.00'
FieldName = 'SUM'
ValueType = fvtSum
end
item
Alignment = taRightJustify
DisplayFormat = '#,##0.00'
FieldName = 'SUM'
ValueType = fvtMin
end
item
Alignment = taRightJustify
DisplayFormat = '#,##0.00'
FieldName = 'SUM'
ValueType = fvtMax
end>
end
item
Alignment = taCenter
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Статус'
Width = 60
FieldName = 'FLAG'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
ImageList = ImageList1
KeyList.Strings = (
'0=0'
'1=1'
'2=2'
'3=3'
)
end
item
Alignment = taCenter
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Адрес|Страна'
Width = 200
FieldName = 'Country'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Адрес|Город'
Width = 200
FieldName = 'Sity'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.NotEmptyValue = '(Не пусто)'
Filter.AllValue = '(All values)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end>
KeyStrokes = <
item
Command = rxgcShowFindDlg
ShortCut = 16454
Enabled = True
end
item
Command = rxgcShowColumnsDlg
ShortCut = 16471
Enabled = True
end
item
Command = rxgcShowFilterDlg
ShortCut = 16468
Enabled = True
end
item
Command = rxgcShowSortDlg
ShortCut = 16467
Enabled = True
end
item
Command = rxgcShowQuickFilter
ShortCut = 16465
Enabled = True
end
item
Command = rxgcHideQuickFilter
ShortCut = 16456
Enabled = True
end
item
Command = rxgcSelectAll
ShortCut = 16449
Enabled = True
end
item
Command = rxgcDeSelectAll
ShortCut = 16429
Enabled = True
end
item
Command = rxgcInvertSelection
ShortCut = 16426
Enabled = True
end
item
Command = rxgcOptimizeColumnsWidth
ShortCut = 16427
Enabled = True
end
item
Command = rxgcCopyCellValue
ShortCut = 16451
Enabled = True
end>
FooterOptions.Active = True
FooterOptions.Color = clYellow
FooterOptions.RowCount = 3
FooterOptions.DrawFullLine = True
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
SearchOptions.FromStart = False
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter, rdgAllowToolMenu, rdgWordWrap]
FooterColor = clYellow
FooterRowCount = 3
Align = alClient
Color = clWindow
DrawFullLine = True
FocusColor = clRed
SelectedColor = clHighlight
GridLineStyle = psSolid
DataSource = DataSource1
Flat = True
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
TabOrder = 0
TitleStyle = tsNative
end
end
object TabSheet2: TTabSheet
Caption = 'Debug window'
ClientHeight = 313
ClientWidth = 1033
object Memo1: TMemo
Left = 0
Height = 313
Top = 0
Width = 1033
Align = alClient
Lines.Strings = (
'Memo1'
)
TabOrder = 0
end
end
end
object RxMemoryData1: TRxMemoryData
FieldDefs = <
item
Name = 'ID'
DataType = ftAutoInc
Precision = -1
end
item
Name = 'NAME'
DataType = ftString
Precision = -1
Size = 220
end
item
Name = 'PDATE'
DataType = ftDate
Precision = -1
end
item
Name = 'SUM'
DataType = ftCurrency
Precision = 2
end
item
Name = 'Country'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'Sity'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'FLAG'
DataType = ftInteger
end>
PacketRecords = 0
Left = 136
Top = 88
object RxMemoryData1ID: TAutoIncField
FieldKind = fkData
FieldName = 'ID'
Index = 0
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object RxMemoryData1NAME: TStringField
FieldKind = fkData
FieldName = 'NAME'
Index = 1
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 220
end
object RxMemoryData1PDATE: TDateField
FieldKind = fkData
FieldName = 'PDATE'
Index = 2
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
DisplayFormat = 'dd.mm.yyyy'
end
object RxMemoryData1SUM: TCurrencyField
FieldKind = fkData
FieldName = 'SUM'
Index = 3
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Precision = 2
end
object RxMemoryData1Country: TStringField
FieldKind = fkData
FieldName = 'Country'
Index = 4
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 100
end
object RxMemoryData1Sity: TStringField
FieldKind = fkData
FieldName = 'Sity'
Index = 5
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 100
end
object RxMemoryData1FLAG: TLongintField
FieldKind = fkData
FieldName = 'FLAG'
Index = 6
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
end
object DataSource1: TDataSource
DataSet = RxMemoryData1
Left = 104
Top = 88
end
object RxDBGridExportPDF1: TRxDBGridExportPDF
RxDBGrid = RxDBGrid1
Caption = 'Export to PDF file'
Enabled = True
FileName = 'test111.pdf'
Options = [repExportTitle, repExportColors, repExportFooter, repOverwriteExisting, repExportImages]
PdfOptions.PaperOrientation = ppoLandscape
PdfOptions.Options = [poCompressText, poCompressFonts, poCompressImages, poUseRawJPEG]
OpenAfterExport = True
AuthorPdf = 'Lagunov A.A.'
ProducerPdf = 'Test project'
PageMargin.Left = 40
PageMargin.Top = 40
PageMargin.Right = 40
PageMargin.Bottom = 40
Left = 112
Top = 160
end
object ImageList1: TImageList
Left = 112
Top = 224
Bitmap = {
4C6903000000100000001000000000000000000000FF000000FF000000000000
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
000000000000000000000000000000000000000000FFFF0000FF000000FF0000
00FF800000FFFF0000FF000000FF000000FF800000FFFF0000FF000000FF0000
00FF000000FF000000FF000000000000000000000000000000FFFF0000FF8000
00FF800000FFFF0000FFFF0000FF800000FF800000FFFF0000FFFF0000FF8000
00FF000000FF00000000000000000000000000000000000000FFFF0000FF8000
00FF800000FFFF0000FFFF0000FF800000FF800000FFFF0000FFFF0000FF0000
00FF000000000000000000000000000000000000000000000000000000FFFF00
00FF800000FF800000FFFF0000FFFF0000FF800000FF800000FF000000FF0000
0000000000000000000000000000000000000000000000000000000000FFFF00
00FF800000FF800000FFFF0000FFFF0000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FFFF0000FF800000FF000000FF000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FFFF0000FF000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
000000000000000000000000000000000000000000FF000000FF000000000000
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
000000000000000000000000000000000000000000FF0000FFFF000000FF0000
00FF000080FF0000FFFF000000FF000000FF000080FF0000FFFF000000FF0000
00FF000000FF000000FF000000000000000000000000000000FF0000FFFF0000
80FF000080FF0000FFFF0000FFFF000080FF000080FF0000FFFF0000FFFF0000
80FF000000FF00000000000000000000000000000000000000FF0000FFFF0000
80FF000080FF0000FFFF0000FFFF000080FF000080FF0000FFFF0000FFFF0000
00FF000000000000000000000000000000000000000000000000000000FF0000
FFFF000080FF000080FF0000FFFF0000FFFF000080FF000080FF000000FF0000
0000000000000000000000000000000000000000000000000000000000FF0000
FFFF000080FF000080FF0000FFFF0000FFFF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000FFFF000080FF000000FF000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF0000FFFF000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
000000000000000000000000000000000000000000FF000000FF000000000000
0000000000FF000000FF0000000000000000000000FF000000FF000000000000
000000000000000000000000000000000000000000FF00FFFFFF000000FF0000
00FF008080FF00FFFFFF000000FF000000FF008080FF00FFFFFF000000FF0000
00FF000000FF000000FF000000000000000000000000000000FF00FFFFFF0080
80FF008080FF00FFFFFF00FFFFFF008080FF008080FF00FFFFFF00FFFFFF0080
80FF000000FF00000000000000000000000000000000000000FF00FFFFFF0080
80FF008080FF00FFFFFF00FFFFFF008080FF008080FF00FFFFFF00FFFFFF0000
00FF000000000000000000000000000000000000000000000000000000FF00FF
FFFF008080FF008080FF00FFFFFF00FFFFFF008080FF008080FF000000FF0000
0000000000000000000000000000000000000000000000000000000000FF00FF
FFFF008080FF008080FF00FFFFFF00FFFFFF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF00FFFFFF008080FF000000FF000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00FF00FFFFFF000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000FF000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000FF0000000000000000000000000000
0000000000000000000000000000
}
BitmapAdv = {
4C6900000000
}
end
end

View File

@@ -0,0 +1,170 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid, RxDBGridExportPdf,
Forms, Controls,
Graphics, Dialogs, ExtCtrls, StdCtrls, ComCtrls, Spin, db;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
CheckBox1: TCheckBox;
DataSource1: TDataSource;
ImageList1: TImageList;
Memo1: TMemo;
PageControl1: TPageControl;
Panel1: TPanel;
RxDBGrid1: TRxDBGrid;
RxDBGridExportPDF1: TRxDBGridExportPDF;
RxMemoryData1: TRxMemoryData;
RxMemoryData1Country: TStringField;
RxMemoryData1FLAG: TLongintField;
RxMemoryData1ID: TAutoIncField;
RxMemoryData1NAME: TStringField;
RxMemoryData1PDATE: TDateField;
RxMemoryData1Sity: TStringField;
RxMemoryData1SUM: TCurrencyField;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure Button1Click(Sender: TObject);
procedure CheckBox1Change(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
private
FontDirList: TStrings;
procedure InitFonts;
procedure ShowInfo(AText:string; AParams : array of const);
procedure DebugFonts;
procedure CreateFontDirList;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
uses fpTTF, LazFileUtils;
{$R *.lfm}
const
TestText = 'Образец текста';
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
RxDBGridExportPDF1.ShowSetupForm:=true;
PageControl1.ActivePageIndex:=0;
RxMemoryData1.Open;
RxMemoryData1.AppendRecord([1, 'Строка с длинным текстом 1', now, 100, 'Россия', 'Москва', 0]);
RxMemoryData1.AppendRecord([2, 'Строка с длинным текстом 2', now - 1, 100, 'Россия', 'Ставрополь', 1]);
RxMemoryData1.AppendRecord([3, 'Строка с длинным текстом 3', now - 2, 110, 'Россия', 'Калининград', 2]);
RxMemoryData1.AppendRecord([4, 'Строка с длинным текстом 4', now - 3, 5000, 'Россия', 'Владивасток', 0]);
RxMemoryData1.AppendRecord([5, 'Строка с длинным текстом 5', now - 4, 123.31, 'USA', 'New-York', 0]);
RxMemoryData1.AppendRecord([6, 'Строка с длинным текстом 6', now, 100, 'Россия', 'Москва', 0]);
RxMemoryData1.AppendRecord([7, 'Строка с длинным текстом 7', now - 1, 100, 'Россия', 'Ставрополь', 2]);
RxMemoryData1.AppendRecord([8, 'Строка с длинным текстом 8', now - 2, 110, 'Россия', 'Калининград', 1]);
RxMemoryData1.AppendRecord([9, 'Строка с длинным текстом 9', now - 3, 5000, 'Россия', 'Владивасток', 0]);
RxMemoryData1.AppendRecord([10,'Строка с длинным текстом 10', now - 4, 123.31, 'USA', 'New-York', 3]);
RxMemoryData1.AppendRecord([11,'Строка с длинным текстом 11', now, 100, 'Россия', 'Москва', 2]);
RxMemoryData1.AppendRecord([12,'Строка с длинным текстом 12', now - 1, 100, 'Россия', 'Ставрополь', 1]);
RxMemoryData1.AppendRecord([13,'Строка с длинным текстом 13', now - 2, 110, 'Россия', 'Калининград', 0]);
RxMemoryData1.AppendRecord([14,'Строка с длинным текстом 14', now - 3, 5000, 'Россия', 'Владивасток', 3]);
RxMemoryData1.AppendRecord([15,'Строка с длинным текстом 15', now - 4, 123.31, 'USA', 'New-York', 2]);
RxMemoryData1.AppendRecord([16,'Строка с длинным текстом 16', now, 100, 'Россия', 'Москва', 1]);
RxMemoryData1.AppendRecord([17,'Строка с длинным текстом 17', now - 1, 100, 'Россия', 'Ставрополь', 0]);
RxMemoryData1.AppendRecord([18,'Строка с длинным текстом 18', now - 2, 110, 'Россия', 'Калининград', 3]);
RxMemoryData1.AppendRecord([19,'Строка с длинным текстом 19', now - 3, 5000, 'Россия', 'Владивасток', 2]);
RxMemoryData1.AppendRecord([20,'Строка с длинным текстом 20', now - 4, 123.31, 'USA', 'New-York', 1]);
RxMemoryData1.First;
CreateFontDirList;
DebugFonts;
end;
procedure TForm1.CreateFontDirList;
var
s: String;
begin
FontDirList := TStringList.Create;
{$IFDEF WINDOWS}
s := SHGetFolderPathUTF8(20); // CSIDL_FONTS = 20
if s <> '' then
FontDirList.Add(s);
{$ENDIF}
{$IFDEF linux}
FontDirList.Add('/usr/share/cups/fonts/');
FontDirList.Add('/usr/share/fonts/');
FontDirList.Add('/usr/local/lib/X11/fonts/');
FontDirList.Add(GetUserDir + '.fonts/');
{$ENDIF}
end;
procedure TForm1.InitFonts;
begin
if FontDirList = nil then
CreateFontDirList;
end;
procedure TForm1.ShowInfo(AText: string; AParams: array of const);
begin
Memo1.Lines.Add(Format(AText, AParams));
end;
procedure TForm1.DebugFonts;
var
i: Integer;
begin
Memo1.Lines.Clear;
gTTFontCache.BuildFontCacheIgnoresErrors:=true;
gTTFontCache.SearchPath.Assign(FontDirList);
gTTFontCache.BuildFontCache;
for i:=0 to gTTFontCache.Count-1 do
begin
ShowInfo('%s - %s - %s', [gTTFontCache.Items[i].FileName, gTTFontCache.Items[i].FamilyName, gTTFontCache.Items[i].PostScriptName]);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
RxDBGridExportPDF1.ShowSetupForm:=false;
RxDBGridExportPDF1.Execute;
RxDBGridExportPDF1.ShowSetupForm:=true;
end;
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
RxDBGridExportPDF1.Enabled:=CheckBox1.Checked;
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
FreeAndNil(FontDirList);
end;
end.
{
'Conakry'
'DejaVu Sans'
'DejaVu Sans Condensed'
'DejaVu Sans Light'
'DejaVu Sans Mono'
'DejaVu Serif'
'DejaVu Serif Condensed'
'Denemo'
'FreeSans'
'Caladea'
'Carlito'
}