Browse Source

BGRAControlsVersionStr

lainz 6 years ago
parent
commit
b50a7a9511
2 changed files with 21 additions and 1 deletions
  1. 1 1
      bgracontrols.pas
  2. 20 0
      bgracontrolsinfo.pas

+ 1 - 1
bgracontrols.pas

@@ -17,7 +17,7 @@ uses
   BGRASpeedButton, BGRASpriteAnimation, BGRAVirtualScreen, ColorSpeedButton, 
   DTAnalogClock, DTAnalogCommon, DTAnalogGauge, dtthemedclock, dtthemedgauge, 
   MaterialColors, BGRAImageTheme, BGRAThemeButton, BGRATheme, BGRAColorTheme, 
-  BGRAThemeRadioButton, LazarusPackageIntf;
+  BGRAThemeRadioButton, bgracontrolsinfo, LazarusPackageIntf;
 
 implementation
 

+ 20 - 0
bgracontrolsinfo.pas

@@ -10,7 +10,27 @@ uses
 const
   BGRAControlsVersion = 6010000;
 
+  function BGRAControlsVersionStr: string;
+
 implementation
 
+function BGRAControlsVersionStr: string;
+var numbers: TStringList;
+  i,remaining: cardinal;
+begin
+  numbers := TStringList.Create;
+  remaining := BGRAControlsVersion;
+  for i := 1 to 4 do
+  begin
+    numbers.Insert(0, IntToStr(remaining mod 100));
+    remaining := remaining div 100;
+  end;
+  while (numbers.Count > 1) and (numbers[numbers.Count-1]='0') do
+    numbers.Delete(numbers.Count-1);
+  numbers.Delimiter:= '.';
+  result := numbers.DelimitedText;
+  numbers.Free;
+end;
+
 end.