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

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

View File

@@ -0,0 +1,155 @@
object Form1: TForm1
Left = 676
Height = 330
Top = 298
Width = 632
Caption = 'RxIniPropStorage DEMO'
ClientHeight = 330
ClientWidth = 632
Position = poScreenCenter
SessionProperties = 'Edit1.Text;Edit2.Text'
LCLVersion = '1.7'
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrBottom
Left = 6
Height = 20
Top = 32
Width = 48
BorderSpacing.Around = 6
Caption = 'Value 1'
ParentColor = False
end
object Edit1: TEdit
AnchorSideLeft.Control = Label1
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Label5
Left = 12
Height = 37
Top = 58
Width = 267
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabOrder = 0
end
object Label2: TLabel
AnchorSideLeft.Control = Label5
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrBottom
Left = 354
Height = 20
Top = 32
Width = 48
BorderSpacing.Around = 6
Caption = 'Value 2'
ParentColor = False
end
object Edit2: TEdit
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 360
Height = 37
Top = 58
Width = 266
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabOrder = 1
end
object Edit3: TEdit
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Label3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Label6
Left = 12
Height = 37
Top = 207
Width = 259
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabOrder = 2
end
object SpinEdit1: TSpinEdit
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = Label4
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 368
Height = 37
Top = 207
Width = 258
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabOrder = 3
Value = 1
end
object Label3: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label6
AnchorSideTop.Side = asrBottom
Left = 6
Height = 20
Top = 181
Width = 96
BorderSpacing.Around = 6
Caption = 'Manual value 1'
ParentColor = False
end
object Label4: TLabel
AnchorSideLeft.Control = Label6
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label6
AnchorSideTop.Side = asrBottom
Left = 362
Height = 20
Top = 181
Width = 96
BorderSpacing.Around = 6
Caption = 'Manual value 2'
ParentColor = False
end
object Label5: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 285
Height = 20
Top = 6
Width = 63
BorderSpacing.Around = 6
Caption = 'Auto save'
ParentColor = False
end
object Label6: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
AnchorSideTop.Side = asrCenter
Left = 277
Height = 20
Top = 155
Width = 79
Caption = 'Manual save'
ParentColor = False
end
object RxIniPropStorage1: TRxIniPropStorage
StoredValues = <
item
Name = 'STRING_VALUE1'
end
item
Name = 'INT_VALUE2'
end>
OnSavingProperties = RxIniPropStorage1SavingProperties
OnRestoreProperties = RxIniPropStorage1RestoreProperties
SeparateFiles = True
left = 304
top = 96
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'
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B