Ignore:
Timestamp:
Jan 7, 2017, 8:54:23 PM (7 years ago)
Author:
chronos
Message:
  • Removed: Do not create file association at runtime as it is done by installer program.
  • Modified: Additional source formating using Delphi formatter.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/ButtonC.pas

    r10 r14  
    2727procedure Register;
    2828begin
    29 RegisterComponents('Samples', [TButtonC]);
     29  RegisterComponents('Samples', [TButtonC]);
    3030end;
    3131
    3232constructor TButtonC.Create(aOwner: TComponent);
    3333begin
    34 inherited Create(aOwner);
    35 ShowHint:=true;
    36 SetBounds(0,0,12,12);
     34  inherited Create(aOwner);
     35  ShowHint := true;
     36  SetBounds(0, 0, 12, 12);
    3737end;
    3838
    3939procedure TButtonC.Paint;
    4040begin
    41 with Canvas do
    42   if FGraphic<>nil then
    43     BitBlt(Canvas.Handle,0,0,12,12,FGraphic.Canvas.Handle,
    44       169+13*Byte(FDown),159+13*FIndex,SRCCOPY)
    45   else begin Brush.Color:=$0000FF; FrameRect(Rect(0,0,12,12)) end
     41  with Canvas do
     42    if FGraphic <> nil then
     43      BitBlt(Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,
     44        169 + 13 * Byte(FDown), 159 + 13 * FIndex, SRCCOPY)
     45    else
     46    begin
     47      Brush.Color := $0000FF;
     48      FrameRect(Rect(0, 0, 12, 12))
     49    end
    4650end;
    4751
    4852procedure TButtonC.SetIndex(x: integer);
    4953begin
    50 if x<>FIndex then
     54  if x <> FIndex then
    5155  begin
    52   FIndex:=x;
    53   Invalidate
     56    FIndex := x;
     57    Invalidate
    5458  end
    5559end;
    5660
    5761end.
    58 
Note: See TracChangeset for help on using the changeset viewer.