You've already forked lazarus-ccr
industrial: v0.3. Improoved TmKnow icons
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6771 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -66,6 +66,12 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-dTICKER"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="TICKER"/>
|
||||
</OtherDefines>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
|
||||
@@ -10,7 +10,7 @@ object MainForm: TMainForm
|
||||
Font.Color = clWindowText
|
||||
OnCreate = FormCreate
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '1.9.0.0'
|
||||
LCLVersion = '2.1.0.0'
|
||||
Scaled = False
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
@@ -543,10 +543,10 @@ object MainForm: TMainForm
|
||||
TabOrder = 0
|
||||
end
|
||||
object AboutLabel: TLabel
|
||||
Left = 96
|
||||
Left = 199
|
||||
Height = 40
|
||||
Top = 0
|
||||
Width = 682
|
||||
Width = 579
|
||||
Alignment = taCenter
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = False
|
||||
@@ -556,6 +556,15 @@ object MainForm: TMainForm
|
||||
OnClick = AboutLabelClick
|
||||
OnMouseMove = AboutLabelMouseMove
|
||||
end
|
||||
object StartStopButton: TButton
|
||||
Left = 104
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 75
|
||||
Caption = 'Stop'
|
||||
OnClick = StartStopButtonClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
unit main;
|
||||
|
||||
{$DEFINE TICKER}
|
||||
//{$DEFINE TICKER}
|
||||
|
||||
{$IFDEF LCL}
|
||||
{$MODE DELPHI}
|
||||
@@ -10,7 +10,12 @@ unit main;
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, ShellApi, SysUtils, Classes, Graphics, Controls,
|
||||
{$IFDEF LCL}
|
||||
LCLIntf,
|
||||
{$ELSE}
|
||||
Windows, Messages, ShellApi,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls,
|
||||
Forms, Dialogs, ExtCtrls, StdCtrls, Spin, A3nalogGauge;
|
||||
|
||||
type
|
||||
@@ -18,6 +23,7 @@ type
|
||||
{ TMainForm }
|
||||
|
||||
TMainForm = class(TForm)
|
||||
StartStopButton: TButton;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
@@ -81,6 +87,7 @@ type
|
||||
AAModeBox: TComboBox;
|
||||
AAModeLabel: TLabel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure StartStopButtonClick(Sender: TObject);
|
||||
procedure StyleBoxChange(Sender: TObject);
|
||||
procedure TimerTimer(Sender: TObject);
|
||||
{$IFDEF TICKER}
|
||||
@@ -133,6 +140,7 @@ type
|
||||
AnalogGauge2: TA3nalogGauge;
|
||||
AnalogGauge3: TA3nalogGauge;
|
||||
FDelta: Double;
|
||||
FStartTime: TDateTime;
|
||||
end;
|
||||
|
||||
var
|
||||
@@ -147,6 +155,9 @@ implementation
|
||||
{$DEFINE TICKER}
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
BASE_CAPTION = 'AntiAliased Analog Gauge demo';
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
AnalogGauge1 := TA3nalogGauge.Create(self);
|
||||
@@ -217,6 +228,21 @@ begin
|
||||
{$IFDEF TICKER}
|
||||
AnalogGauge1.OnFrames := FramesChanged;
|
||||
{$ENDIF}
|
||||
|
||||
FStartTime := Now;
|
||||
end;
|
||||
|
||||
procedure TMainForm.StartStopButtonClick(Sender: TObject);
|
||||
begin
|
||||
Timer.Enabled := not Timer.Enabled;
|
||||
if Timer.Enabled then begin
|
||||
FStartTime := now;
|
||||
StartStopButton.Caption := 'Stop';
|
||||
AnalogGauge1.Position := 0;
|
||||
end else begin
|
||||
Caption := BASE_CAPTION + ' (' + FormatDateTime('n:ss.zzz', Now - FStartTime) + ')';
|
||||
StartStopButton.Caption := 'Start';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.StyleBoxChange(Sender: TObject);
|
||||
@@ -658,14 +684,22 @@ begin
|
||||
Control := Sender as TLabel;
|
||||
if (X > 0) and (X < Control.Width) and
|
||||
(Y > 0) and (Y < Control.Height) then begin
|
||||
{$IFDEF LCL}
|
||||
Screen.Cursor := crHandPoint
|
||||
{$ELSE}
|
||||
Control.Font.Style := Control.Font.Style + [fsUnderLine];
|
||||
Control.Cursor := crHandPoint;
|
||||
Windows.SetCursor(Screen.Cursors[Control.Cursor]);
|
||||
SetCaptureControl(Control);
|
||||
{$ENDIF}
|
||||
end else begin
|
||||
{$IFDEF LCL}
|
||||
Screen.Cursor := crDefault;
|
||||
{$ELSE}
|
||||
Control.Font.Style := Control.Font.Style - [fsUnderLine];
|
||||
Control.Cursor := crDefault;
|
||||
SetCaptureControl(nil);
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -677,7 +711,11 @@ begin
|
||||
Control := Sender as TLabel;
|
||||
Control.Font.Style := Control.Font.Style - [fsUnderLine];
|
||||
Control.Cursor := crDefault; SetCaptureControl(nil);
|
||||
{$IFDEF LCL}
|
||||
OpenURL('http://irnis.net/');
|
||||
{$ELSE}
|
||||
ShellExecute(0, nil, PChar('http://www.irnis.net/'), nil, nil, SW_SHOWDEFAULT);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@@ -13,6 +13,7 @@ object MainForm: TMainForm
|
||||
Height = 96
|
||||
Top = 200
|
||||
Width = 88
|
||||
TickColor = clCream
|
||||
Position = 0
|
||||
MarkStyle = msCircle
|
||||
OnChange = KnobChange
|
||||
|
||||
Reference in New Issue
Block a user