Skip to content

Commit

Permalink
Updated to current RAD 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberneda committed Nov 10, 2023
1 parent eee9b7b commit 4b6983f
Show file tree
Hide file tree
Showing 28 changed files with 5,737 additions and 2,943 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
object SampleData: TSampleData
OldCreateOrder = False
Height = 337
Width = 267
object Sqlite_demoConnection: TFDConnection
Params.Strings = (
'ConnectionDef=SQLite_Demo')
Connected = True
LoginPrompt = False
Left = 47
Top = 22
end
object CustomersTable: TFDQuery
Active = True
Connection = Sqlite_demoConnection
FetchOptions.AssignedValues = [evRecordCountMode]
FetchOptions.RecordCountMode = cmTotal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ interface
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.SQLite,
FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, FireDAC.FMXUI.Wait,
FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client;
FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client,
FireDAC.Phys.SQLiteWrapper.Stat;

type
TSampleData = class(TDataModule)
Expand Down
5 changes: 4 additions & 1 deletion demos/FireMonkey/Sheet/TeeGrid_Sheet.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ uses
FMXTee.Sheet.Editor.Font in 'FMXTee.Sheet.Editor.Font.pas' {SheetFontEditor},
FMXTee.Font.Family in 'FMXTee.Font.Family.pas',
Tee.Cell.Expression in 'Tee.Cell.Expression.pas',
Tee.Sheet.Data in 'Tee.Sheet.Data.pas';
Tee.Sheet.Data in 'Tee.Sheet.Data.pas',
BI.Arrays.Strings in 'TeeBI\BI.Arrays.Strings.pas',
BI.Expression.DateTime in 'TeeBI\BI.Expression.DateTime.pas',
BI.Expression in 'TeeBI\BI.Expression.pas';

{$R *.res}

Expand Down
1,164 changes: 815 additions & 349 deletions demos/FireMonkey/Sheet/TeeGrid_Sheet.dproj

Large diffs are not rendered by default.

Binary file modified demos/FireMonkey/Sheet/TeeGrid_Sheet.res
Binary file not shown.
2,010 changes: 894 additions & 1,116 deletions demos/FireMonkey/Themes/TeeGrid_Themes_FMX.dproj

Large diffs are not rendered by default.

Binary file modified demos/FireMonkey/Themes/TeeGrid_Themes_FMX.res
Binary file not shown.
1,422 changes: 817 additions & 605 deletions demos/FireMonkey/Ticker/TeeGrid_FMX_Ticker.dproj

Large diffs are not rendered by default.

Binary file modified demos/FireMonkey/Ticker/TeeGrid_FMX_Ticker.res
Binary file not shown.
3 changes: 0 additions & 3 deletions demos/VCL/Database/ClientDataSet/Unit_Dataset.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ object FormGridDataset: TFormGridDataset
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object TeeGrid1: TTeeGrid
Left = 0
Expand Down Expand Up @@ -74,7 +72,6 @@ object FormGridDataset: TFormGridDataset
Link = 'LastInvoiceDate'
end>
DataSource = ClientDataSet1
ReadOnly = False
Align = alClient
UseDockManager = False
ParentBackground = False
Expand Down
2 changes: 1 addition & 1 deletion demos/VCL/Database/ClientDataSet/Unit_Dataset.pas
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VCLTee.Control, VCLTee.Grid, Data.DB,
Datasnap.DBClient, Vcl.StdCtrls, Vcl.DBCtrls, Vcl.ExtCtrls, Vcl.Menus,
Tee.Grid.Columns, Tee.Renders;
Tee.Grid.Columns, Tee.Renders, Vcl.Buttons;

type
TFormGridDataset = class(TForm)
Expand Down
939 changes: 733 additions & 206 deletions demos/VCL/Database/ClientDataSet/VCL_TeeGrid_DataSet.dproj

Large diffs are not rendered by default.

Binary file modified demos/VCL/Database/ClientDataSet/VCL_TeeGrid_DataSet.res
Binary file not shown.
34 changes: 21 additions & 13 deletions demos/VCL/Speed/Unit_Test_Speed.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ object FormSpeed: TFormSpeed
Height = 41
Align = alTop
TabOrder = 0
ExplicitWidth = 1013
object LabelResult: TLabel
Left = 112
Top = 13
Expand All @@ -38,7 +37,7 @@ object FormSpeed: TFormSpeed
OnClick = Button1Click
end
object ComboGraphics: TComboBox
Left = 432
Left = 236
Top = 10
Width = 65
Height = 23
Expand All @@ -52,26 +51,37 @@ object FormSpeed: TFormSpeed
'GDI'
'Skia')
end
object CBRepaint: TCheckBox
Left = 280
object CBAntiAlias: TCheckBox
Left = 505
Top = 13
Width = 97
Height = 17
Caption = '&Force Repaint'
Caption = '&Antialias'
Checked = True
State = cbChecked
TabOrder = 2
OnClick = CBAntiAliasClick
end
object CBAntiAlias: TCheckBox
Left = 536
object TrackBar1: TTrackBar
Left = 608
Top = 9
Width = 150
Height = 26
Max = 30
Min = -5
TabOrder = 3
OnChange = TrackBar1Change
end
object CBFormatting: TCheckBox
Left = 352
Top = 13
Width = 97
Width = 129
Height = 17
Caption = '&Antialias'
Caption = 'Custom Formats'
Checked = True
State = cbChecked
TabOrder = 3
OnClick = CBAntiAliasClick
TabOrder = 4
OnClick = CBFormattingClick
end
end
object TeeGrid1: TTeeGrid
Expand All @@ -85,8 +95,6 @@ object FormSpeed: TFormSpeed
ParentBackground = False
ParentColor = False
TabOrder = 1
ExplicitWidth = 1013
ExplicitHeight = 641
_Headers = (
1
'TColumnHeaderBand'
Expand Down
55 changes: 43 additions & 12 deletions demos/VCL/Speed/Unit_Test_Speed.pas
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
Vcl.ExtCtrls,

VCLTee.Control, VCLTee.Grid;
VCLTee.Control, VCLTee.Grid, Vcl.ComCtrls;

type
TFormSpeed = class(TForm)
Expand All @@ -22,17 +22,21 @@ TFormSpeed = class(TForm)
LabelResult: TLabel;
TeeGrid1: TTeeGrid;
ComboGraphics: TComboBox;
CBRepaint: TCheckBox;
CBAntiAlias: TCheckBox;
TrackBar1: TTrackBar;
CBFormatting: TCheckBox;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ComboGraphicsChange(Sender: TObject);
procedure CBAntiAliasClick(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure CBFormattingClick(Sender: TObject);
private
{ Private declarations }

procedure Cosmetics;
procedure ClearCosmetics;
procedure RunBenchmark;
procedure SetCosmetics;
public
{ Public declarations }
end;
Expand Down Expand Up @@ -99,6 +103,14 @@ procedure TFormSpeed.CBAntiAliasClick(Sender: TObject);
{$ENDIF}
end;

procedure TFormSpeed.CBFormattingClick(Sender: TObject);
begin
if CBFormatting.Checked then
SetCosmetics
else
ClearCosmetics;
end;

procedure TFormSpeed.ComboGraphicsChange(Sender: TObject);
begin
case ComboGraphics.ItemIndex of
Expand All @@ -122,11 +134,24 @@ procedure TFormSpeed.FormCreate(Sender: TObject);
ComboGraphics.Items.Delete(2);
{$IFEND}

Cosmetics;
SetCosmetics;
end;

// Remove custom column formatting settings
procedure TFormSpeed.ClearCosmetics;
var Column : TColumn;
begin
for Column in TeeGrid1.Columns do
begin
Column.ParentFormat:=True;
Column.TextAlignment:=TColumnTextAlign.Automatic;
end;

TeeGrid1.Rows.ResetHeights;
end;

// Set some grid settings, just to test
procedure TFormSpeed.Cosmetics;
procedure TFormSpeed.SetCosmetics;

procedure SetTextAlign(const AColumn:Integer; const AAlign:THorizontalAlign); overload;
var Column : TColumn;
Expand Down Expand Up @@ -180,25 +205,31 @@ procedure TFormSpeed.Cosmetics;

TeeGrid1.Columns[12].ParentFormat:=False;
TeeGrid1.Columns[12].Format.Font.Name:='Courier New';

TeeGrid1.Columns[13].ParentFormat:=False;
TeeGrid1.Columns[13].Format.Stroke.Show;
TeeGrid1.Columns[13].Format.Stroke.Color:=clGreen;
end;

// Scroll through all grid cells, all rows and all columns
procedure TFormSpeed.RunBenchmark;
var Row,
Column :Integer;
var Row : Integer;
Column : TColumn;
begin
for Row:=0 to TeeGrid1.Data.Count-1 do
for Column:=0 to TeeGrid1.Columns.Count-1 do
for Column in TeeGrid1.Columns do
begin
// Select one cell
TeeGrid1.Selected.Column:=TeeGrid1.Columns[Column];
TeeGrid1.Selected.Column:=Column;
TeeGrid1.Selected.Row:=Row;

if CBRepaint.Checked then
TeeGrid1.Repaint; // Force repaint at every cell
end;
end;

procedure TFormSpeed.TrackBar1Change(Sender: TObject);
begin
TeeGrid1.Rows.Spacing.Value:=TrackBar1.Position
end;

// Do the speed test and measure it
procedure TFormSpeed.Button1Click(Sender: TObject);
var t1 : TStopwatch;
Expand Down
10 changes: 9 additions & 1 deletion demos/VCL/Speed/VCL_TeeGrid_Benchmark.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectVersion>20.1</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
Expand Down Expand Up @@ -114,6 +114,8 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
Expand Down Expand Up @@ -146,6 +148,12 @@
<Source>
<Source Name="MainSource">VCL_TeeGrid_Benchmark.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k290.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp290.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
<DeployFile LocalName="Win32\Debug\VCL_TeeGrid_Benchmark.exe" Configuration="Debug" Class="ProjectOutput">
Expand Down
Binary file added demos/VCL/Speed/Win32/Debug/.MSR
Binary file not shown.
Loading

0 comments on commit 4b6983f

Please sign in to comment.