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

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,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="BC Numeric Keyboard"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcnumerickeyboard.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,22 @@
program test_bcnumerickeyboard;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
Application.Title:='BC Numeric Keyboard';
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,439 @@
object Form1: TForm1
Left = 442
Height = 240
Top = 143
Width = 516
Caption = 'BC Numeric Keyboard'
ClientHeight = 240
ClientWidth = 516
OnCreate = FormCreate
LCLVersion = '1.7'
object BCPanel1: TBCPanel
Left = 0
Height = 240
Top = 0
Width = 516
Align = alClient
Background.Color = clBtnFace
Background.ColorOpacity = 255
Background.Gradient1.StartColor = clWhite
Background.Gradient1.StartColorOpacity = 255
Background.Gradient1.DrawMode = dmSet
Background.Gradient1.EndColor = 16119285
Background.Gradient1.EndColorOpacity = 255
Background.Gradient1.ColorCorrection = True
Background.Gradient1.GradientType = gtLinear
Background.Gradient1.Point1XPercent = 0
Background.Gradient1.Point1YPercent = 0
Background.Gradient1.Point2XPercent = 0
Background.Gradient1.Point2YPercent = 100
Background.Gradient1.Sinus = False
Background.Gradient2.StartColor = 15722194
Background.Gradient2.StartColorOpacity = 255
Background.Gradient2.DrawMode = dmSet
Background.Gradient2.EndColor = 13137169
Background.Gradient2.EndColorOpacity = 255
Background.Gradient2.ColorCorrection = True
Background.Gradient2.GradientType = gtLinear
Background.Gradient2.Point1XPercent = 0
Background.Gradient2.Point1YPercent = 0
Background.Gradient2.Point2XPercent = 0
Background.Gradient2.Point2YPercent = 100
Background.Gradient2.Sinus = False
Background.Gradient1EndPercent = 100
Background.Style = bbsGradient
BevelInner = bvNone
BevelOuter = bvNone
BevelWidth = 1
Border.Color = clBlack
Border.ColorOpacity = 255
Border.LightColor = clWhite
Border.LightOpacity = 255
Border.LightWidth = 0
Border.Style = bboNone
Border.Width = 1
BorderBCStyle = bpsBorder
FontEx.Color = clDefault
FontEx.EndEllipsis = False
FontEx.FontQuality = fqSystemClearType
FontEx.Height = 0
FontEx.SingleLine = True
FontEx.Shadow = False
FontEx.ShadowColor = clBlack
FontEx.ShadowColorOpacity = 255
FontEx.ShadowRadius = 5
FontEx.ShadowOffsetX = 5
FontEx.ShadowOffsetY = 5
FontEx.Style = []
FontEx.TextAlignment = bcaCenter
FontEx.WordBreak = False
Rounding.RoundX = 1
Rounding.RoundY = 1
Rounding.RoundOptions = []
TabOrder = 0
OnClick = FormClick
object Button1: TBCButton
Left = 8
Height = 28
Top = 8
Width = 63
StateClicked.Background.Color = clBlack
StateClicked.Background.ColorOpacity = 255
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.StartColorOpacity = 255
StateClicked.Background.Gradient1.DrawMode = dmSet
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.EndColorOpacity = 255
StateClicked.Background.Gradient1.ColorCorrection = True
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 0
StateClicked.Background.Gradient1.Point1YPercent = 0
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient1.Sinus = False
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.StartColorOpacity = 255
StateClicked.Background.Gradient2.DrawMode = dmSet
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.EndColorOpacity = 255
StateClicked.Background.Gradient2.ColorCorrection = True
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient2.Sinus = False
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.ColorOpacity = 255
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.Border.Width = 1
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.EndEllipsis = False
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Height = 0
StateClicked.FontEx.SingleLine = True
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowColor = clBlack
StateClicked.FontEx.ShadowColorOpacity = 255
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.TextAlignment = bcaCenter
StateClicked.FontEx.WordBreak = False
StateHover.Background.Color = clBlack
StateHover.Background.ColorOpacity = 255
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.StartColorOpacity = 255
StateHover.Background.Gradient1.DrawMode = dmSet
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.EndColorOpacity = 255
StateHover.Background.Gradient1.ColorCorrection = True
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 0
StateHover.Background.Gradient1.Point1YPercent = 0
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient1.Sinus = False
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.StartColorOpacity = 255
StateHover.Background.Gradient2.DrawMode = dmSet
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.EndColorOpacity = 255
StateHover.Background.Gradient2.ColorCorrection = True
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient2.Sinus = False
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.ColorOpacity = 255
StateHover.Border.LightColor = clWhite
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.Border.Width = 1
StateHover.FontEx.Color = clBlack
StateHover.FontEx.EndEllipsis = False
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Height = 0
StateHover.FontEx.SingleLine = True
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowColor = clBlack
StateHover.FontEx.ShadowColorOpacity = 255
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.TextAlignment = bcaCenter
StateHover.FontEx.WordBreak = False
StateNormal.Background.Color = clBlack
StateNormal.Background.ColorOpacity = 255
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.StartColorOpacity = 255
StateNormal.Background.Gradient1.DrawMode = dmSet
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.EndColorOpacity = 255
StateNormal.Background.Gradient1.ColorCorrection = True
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient1.Sinus = False
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.StartColorOpacity = 255
StateNormal.Background.Gradient2.DrawMode = dmSet
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.EndColorOpacity = 255
StateNormal.Background.Gradient2.ColorCorrection = True
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 0
StateNormal.Background.Gradient2.Point1YPercent = 0
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient2.Sinus = False
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.ColorOpacity = 255
StateNormal.Border.LightColor = clWhite
StateNormal.Border.LightOpacity = 255
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.Border.Width = 1
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.EndEllipsis = False
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Height = 0
StateNormal.FontEx.SingleLine = True
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowColor = clBlack
StateNormal.FontEx.ShadowColorOpacity = 255
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.TextAlignment = bcaCenter
StateNormal.FontEx.WordBreak = False
Caption = '$ 0,00'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
InnerMargin = 0
OnClick = Button1Click
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
Rounding.RoundOptions = []
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
RoundingDropDown.RoundOptions = []
TextApplyGlobalOpacity = False
MemoryUsage = bmuHigh
end
object Button2: TBCButton
Left = 80
Height = 28
Top = 8
Width = 63
StateClicked.Background.Color = clBlack
StateClicked.Background.ColorOpacity = 255
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.StartColorOpacity = 255
StateClicked.Background.Gradient1.DrawMode = dmSet
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.EndColorOpacity = 255
StateClicked.Background.Gradient1.ColorCorrection = True
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 0
StateClicked.Background.Gradient1.Point1YPercent = 0
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient1.Sinus = False
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.StartColorOpacity = 255
StateClicked.Background.Gradient2.DrawMode = dmSet
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.EndColorOpacity = 255
StateClicked.Background.Gradient2.ColorCorrection = True
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient2.Sinus = False
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.ColorOpacity = 255
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.Border.Width = 1
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.EndEllipsis = False
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Height = 0
StateClicked.FontEx.SingleLine = True
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowColor = clBlack
StateClicked.FontEx.ShadowColorOpacity = 255
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.TextAlignment = bcaCenter
StateClicked.FontEx.WordBreak = False
StateHover.Background.Color = clBlack
StateHover.Background.ColorOpacity = 255
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.StartColorOpacity = 255
StateHover.Background.Gradient1.DrawMode = dmSet
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.EndColorOpacity = 255
StateHover.Background.Gradient1.ColorCorrection = True
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 0
StateHover.Background.Gradient1.Point1YPercent = 0
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient1.Sinus = False
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.StartColorOpacity = 255
StateHover.Background.Gradient2.DrawMode = dmSet
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.EndColorOpacity = 255
StateHover.Background.Gradient2.ColorCorrection = True
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient2.Sinus = False
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.ColorOpacity = 255
StateHover.Border.LightColor = clWhite
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.Border.Width = 1
StateHover.FontEx.Color = clBlack
StateHover.FontEx.EndEllipsis = False
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Height = 0
StateHover.FontEx.SingleLine = True
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowColor = clBlack
StateHover.FontEx.ShadowColorOpacity = 255
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.TextAlignment = bcaCenter
StateHover.FontEx.WordBreak = False
StateNormal.Background.Color = clBlack
StateNormal.Background.ColorOpacity = 255
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.StartColorOpacity = 255
StateNormal.Background.Gradient1.DrawMode = dmSet
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.EndColorOpacity = 255
StateNormal.Background.Gradient1.ColorCorrection = True
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient1.Sinus = False
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.StartColorOpacity = 255
StateNormal.Background.Gradient2.DrawMode = dmSet
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.EndColorOpacity = 255
StateNormal.Background.Gradient2.ColorCorrection = True
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 0
StateNormal.Background.Gradient2.Point1YPercent = 0
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient2.Sinus = False
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.ColorOpacity = 255
StateNormal.Border.LightColor = clWhite
StateNormal.Border.LightOpacity = 255
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.Border.Width = 1
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.EndEllipsis = False
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Height = 0
StateNormal.FontEx.SingleLine = True
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowColor = clBlack
StateNormal.FontEx.ShadowColorOpacity = 255
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.TextAlignment = bcaCenter
StateNormal.FontEx.WordBreak = False
Caption = '$ 0,00'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
InnerMargin = 0
OnClick = Button1Click
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
Rounding.RoundOptions = []
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
RoundingDropDown.RoundOptions = []
TextApplyGlobalOpacity = False
MemoryUsage = bmuHigh
end
object FloatSpinEdit1: TFloatSpinEdit
Left = 152
Height = 28
Top = 8
Width = 76
Increment = 1
MaxValue = 100000
MinValue = 0
OnClick = Button1Click
TabOrder = 0
Value = 0
end
object Edit1: TEdit
Left = 232
Height = 28
Top = 8
Width = 80
OnClick = Button1Click
TabOrder = 1
end
end
object BCNumericKeyboard1: TBCNumericKeyboard
OnUserChange = BCNumericKeyboard1Change
left = 96
top = 136
end
end

View File

@@ -0,0 +1,165 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Spin, BCNumericKeyboard, BCButton, BCTypes, BCPanel, BGRABitmapTypes;
type
{ TForm1 }
TForm1 = class(TForm)
BCNumericKeyboard1: TBCNumericKeyboard;
BCPanel1: TBCPanel;
Button1: TBCButton;
Button2: TBCButton;
Edit1: TEdit;
FloatSpinEdit1: TFloatSpinEdit;
procedure BCNumericKeyboard1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
NumericSender: TControl;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
{ Button style }
procedure BCButtonWindows8(AButton: TBCButton; cl1, cl2: TColor);
begin
AButton.Rounding.RoundX := 1;
AButton.Rounding.RoundY := 1;
AButton.RoundingDropDown.Assign(AButton.Rounding);
with AButton.StateNormal do
begin
Background.Style := bbsColor;
Background.Color := cl1;
Border.Style := bboSolid;
Border.Width := 1;
Border.Color := cl1;
Border.LightWidth := 0;
Border.LightOpacity := 255;
Border.Style := bboSolid;
FontEx.Color := clWhite;
FontEx.Shadow := False;
FontEx.Style := [];
end;
AButton.StateHover.Assign(AButton.StateNormal);
AButton.StateClicked.Assign(AButton.StateNormal);
with AButton.StateHover do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
with AButton.StateClicked do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if (NumericSender <> nil) and (NumericSender.Name = TControl(Sender).Name) and
(BCNumericKeyboard1.Visible) then
begin
BCNumericKeyboard1.Hide();
// Remove unnecessary comma for button caption
if Sender is TBCButton or Sender is TEdit then
if Pos(DefaultFormatSettings.DecimalSeparator, NumericSender.Caption) =
Length(NumericSender.Caption) then
NumericSender.Caption :=
LeftStr(NumericSender.Caption, Length(NumericSender.Caption) - 1);
end
else
begin
NumericSender := Sender as TControl;
BCNumericKeyboard1.Value := '';
BCNumericKeyboard1.Panel.Left := NumericSender.Left;
BCNumericKeyboard1.Panel.Top := NumericSender.Top + NumericSender.Height;
BCNumericKeyboard1.Show();
end;
end;
procedure TForm1.FormClick(Sender: TObject);
begin
if NumericSender <> nil then
Button1Click(NumericSender);
end;
procedure TForm1.BCNumericKeyboard1Change(Sender: TObject);
var
d: double;
begin
// For buttons
if NumericSender is TBCButton or NumericSender is TEdit then
begin
if BCNumericKeyboard1.Value <> '' then
NumericSender.Caption :=
DefaultFormatSettings.CurrencyString + ' ' + BCNumericKeyboard1.Value
else
NumericSender.Caption :=
DefaultFormatSettings.CurrencyString + ' 0' +
DefaultFormatSettings.DecimalSeparator + '00';
end;
// For spin edit
if NumericSender is TFloatSpinEdit then
begin
TryStrToFloat(BCNumericKeyboard1.Value, d);
TFloatSpinEdit(NumericSender).Value := d;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// Assign custom format settings
DefaultFormatSettings.CurrencyString := '$';
// DefaultFormatSettings.DecimalSeparator := '.';
// Assign a style
BCButtonWindows8(BCNumericKeyBoard1.ButtonStyle, clGray, clSkyBlue);
// Custom extra size inside the button
BCNumericKeyBoard1.ButtonStyle.SetSizeVariables(0, 0, 15, 25);
// Apply the style
BCNumericKeyboard1.UpdateButtonStyle;
with BCNumericKeyboard1.Panel do
begin
BevelInner := bvNone;
BevelOuter := bvNone;
Background.Gradient1.StartColor := clNavy;
Background.Gradient1.EndColor := clPurple;
Background.Gradient1.Point1XPercent := 0;
Background.Gradient1.Point1YPercent := 0;
Background.Gradient1.Point2XPercent := 0;
Background.Gradient1.Point2YPercent := 100;
Background.Gradient1EndPercent := 100;
Background.Style := bbsGradient;
// Spacing around
ChildSizing.TopBottomSpacing := 5;
ChildSizing.LeftRightSpacing := 5;
// Spacing between buttons
ChildSizing.VerticalSpacing := 10;
ChildSizing.HorizontalSpacing := 10;
end;
end;
end.