亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? aled.pas

?? 動態紅綠燈控件
?? PAS
字號:
unit ALed;

{ Original by Chang-Ting SU.  E-mail:ctsu@ms12.hinet.net }

{ Modified by H.J. Harvey     E-mail:hharvey@dove.net.au }
{ Version 1.10c  24/MAY/99 }

{ Now provides 6 different LED styles:
      Large Round (the original)
      Small Round
      Large Square
      Small Square
      Vertical Rect
      Horizontal Rect }

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls;

type
  TLEDStyle = (LEDSmall,LEDLarge,LEDSqSmall,LEDSqLarge,LEDVertical,LEDHorizontal) ;
  ThhALed = class(TGraphicControl)
  private
    { Private declarations }
  protected
    { Protected declarations }
    fLedBitmap    : Array[0..1] of TBITMAP;
    fLedTimer     : TTimer;
    fTrueColor    : TColor;
    fFalseColor   : TColor;
    fBordColor    : TColor;
    fBordered     : Boolean;
    fBlink        : Boolean;
    fLEDStyle     : TLEDStyle;
    fInterval     : longint;
    fValue        : Boolean;
    ColorTemp     : Boolean;
    fOnTimer      : TNotifyEvent;
    fOnMouseEnter : TNotifyEvent;
    fOnMouseLeave : TNotifyEvent;
    procedure Paint;override;
    procedure OnLedTimer(Sender : TObject);
    procedure CMMouseEnter(var Message:TMessage);message CM_MOUSEENTER;
    procedure CMMouseLeave(var Message:TMessage);message CM_MOUSELEAVE;
  public
    { Public declarations }
    constructor Create(AOwner:TComponent);override;
    destructor  Destroy;override;
    procedure CreateLedBitmap;
    procedure FreeLedBitmap;
    procedure ChangeValue(V : Boolean);
    procedure ChangeBlink(V : Boolean);
    procedure ChangeBorder(V : Boolean);
    procedure ChangeStyle(V : TLEDStyle);
    procedure SetTrueColor(V : TColor);
    procedure SetFalseColor(V : TColor);
    procedure SetBordColor(V : TColor);
    procedure SetInterval(V : longint);
    procedure SetToTrueColor;
    procedure SetToFalseColor;
    procedure SetLedTimer;
    procedure ResetLedTimer;
  published
    { Published declarations }
    property TrueColor  : TColor  read fTrueColor write SetTrueColor default clLime;
    property FalseColor : TColor  read fFalseColor write SetFalseColor default clSilver;
    property BorderColor: TColor  read fBordColor write SetBordColor default clBtnFace;
    property Blink      : Boolean read fBlink write ChangeBlink default true;
    property Bordered   : Boolean read fBordered write ChangeBorder default true;
    property Value      : Boolean read fValue write ChangeValue default false;
    property Interval   : longint read fInterval write SetInterval default 1000;
    property LEDStyle   : TLEDStyle read fLEDStyle write ChangeStyle default LEDSmall;
    property OnTimer    : TNotifyEvent read fOnTimer write fOnTimer;
    property OnMouseEnter : TNotifyEvent read fOnMouseEnter write fOnMouseEnter;
    property OnMouseLeave : TNotifyEvent read fOnMouseLeave write fOnMouseLeave;
    property OnClick;
    property ShowHint;
  end;

procedure Register;

implementation
{$R ALed.res}

constructor ThhALed.Create(AOwner:TComponent);
begin
  inherited Create(AOwner);
  Height      := 16;
  Width       := 16;
  fTrueColor  := clLime;
  fFalseColor := clSilver;
  fBordColor  := clBtnFace;
  fBlink      := true;
  fBordered   := true;
  fValue      := false;
  fLEDStyle   := LEDSmall ;
  fInterval   := 1000;
  fLedTimer   := nil;
  fLedBitmap[0] := nil;
  fLedBitmap[1] := nil;
  ColorTemp   := true;
  CreateLedBitmap;
end;

destructor ThhALed.Destroy;
begin
  ResetLedTimer;
  FreeLedBitmap;
  inherited;
end;

procedure ThhALed.CreateLedBitmap;
var
  BitmapName : Pchar ;
  Xloc : integer ;
begin
  FreeLedBitmap;
  fLedBitmap[0] := TBitmap.Create;
  fLedBitmap[1] := TBitmap.Create;
  case fLEDStyle of
  LEDLarge:
    begin
      Width := 22 ;
      Height := 22 ;
      if fBordered then BitmapName := 'BLG' else BitmapName := 'NLG' ;
    end;
  LEDSmall:
    begin
      Width := 16 ;
      Height := 16 ;
      if fBordered then BitmapName := 'BSM' else BitmapName := 'NSM' ;
    end ;
  LEDSqLarge:
    begin
      Width := 22 ;
      Height := 22 ;
      if fBordered then BitmapName := 'BSQLG' else BitmapName := 'NSQLG' ;
    end;
  LEDSqSmall:
    begin
      Width := 16 ;
      Height := 16 ;
      if fBordered then BitmapName := 'BSQSM' else BitmapName := 'NSQSM' ;
    end;
  LEDHorizontal:
    begin
      Width := 22 ;
      Height := 16 ;
      if fBordered then BitmapName := 'BHZ' else BitmapName := 'NHZ' ;
    end;
  LEDVertical:
    begin
      Width := 16 ;
      Height := 22 ;
      if fBordered then BitmapName := 'BVT' else BitmapName := 'NVT' ;
    end;
  end ;
  fLedBitmap[0].Handle := LoadImage(HINSTANCE,BitmapName,IMAGE_BITMAP,0,0,0);
  fLedBitmap[1].Handle := LoadImage(HINSTANCE,BitmapName,IMAGE_BITMAP,0,0,0);
  fLedBitmap[0].Canvas.Brush.Color := fTrueColor;
  fLedBitmap[0].Canvas.FloodFill(Width DIV 2,Height DIV 2, clLime, fsSurface);
  fLedBitmap[1].Canvas.Brush.Color := fFalseColor;
  fLedBitmap[1].Canvas.FloodFill(Width DIV 2, Height DIV 2, clLime, fsSurface);
  if (not fBordered)
  then begin
    Xloc := 0 ;
    fLedBitmap[0].Canvas.Brush.Color := fBordColor;
    fLedBitmap[0].Canvas.FloodFill(Xloc, Xloc, clSilver, fsSurface);
    fLedBitmap[1].Canvas.Brush.Color := fBordColor;
    fLedBitmap[1].Canvas.FloodFill(Xloc, Xloc, clSilver, fsSurface);
  end ;
end;

procedure ThhALed.FreeLedBitmap;
begin
  if (Assigned(fLedBitmap[0])) then fLedBitmap[0].Destroy;
  if (Assigned(fLedBitmap[1])) then fLedBitmap[1].Destroy;
  fLedBitmap[0] := nil;
  fLedBitmap[1] := nil;
end;

procedure ThhALed.Paint;
begin
  Canvas.StretchDraw(Rect(0,0,Width,Height),fLedBitmap[integer(ColorTemp)]);
end;

procedure ThhALed.OnLedTimer(Sender: TObject);
begin
  ColorTemp := not ColorTemp;
  Canvas.StretchDraw(Rect(0,0,Width,Height),fLedBitmap[integer(ColorTemp)]);
  if (Assigned(OnTimer)) then fOnTimer(Self);
end;

procedure ThhALed.SetToTrueColor;
begin
  Canvas.StretchDraw(Rect(0,0,Width,Height),fLedBitmap[0]);
  ColorTemp := false;
end;

procedure ThhALed.SetToFalseColor;
begin
  Canvas.StretchDraw(Rect(0,0,Width,Height),fLedBitmap[1]);
  ColorTemp := true;
end;

procedure ThhALed.SetLedTimer;
begin
  if (Assigned(fLedTimer)) then Exit;
  if (csDesigning in ComponentState) then Exit;
  ColorTemp := false;
  fLedTimer := TTimer.Create(Self);
  fLedTimer.Interval := fInterval;
  fLedTimer.OnTimer  := OnLedTimer;
end;

procedure ThhALed.ResetLedTimer;
begin
  if (Assigned(fLedTimer)) then begin
    fLedTimer.Destroy;
    fLedTimer := nil;
  end;
end;

procedure ThhALed.ChangeStyle(V : TLEDStyle);
begin
  if (fLEDStyle <> V) then begin
    fLEDStyle := V ;
    CreateLedBitmap;
    Repaint;
  end;
end;

procedure ThhALed.ChangeBorder(V : Boolean);
begin
  if (fBordered <> V) then begin
    fBordered := V ;
    CreateLedBitmap;
    Repaint;
  end;
end;

procedure ThhALed.ChangeValue(V : Boolean);
begin
  if (fValue <> V)
  then begin
    fValue := V;
    if (fValue)
    then begin
      SetToTrueColor;
      if (fBlink)
      then
        SetLedTimer;
    end
    else begin
      ResetLedTimer;
      SetToFalseColor;
    end
       (* fValue == true or false *)
  end; (*(fValue <> V)*)
end;

procedure ThhALed.ChangeBlink(V : Boolean);
begin
  if (fBlink <> V)
  then begin
    if (fValue)
    then
      SetToTrueColor
    else
      SetToFalseColor;
      fBlink := V;
      if (V and fValue)
      then
        SetLedTimer
      else
        ResetLedTimer
  end;
end;

procedure ThhALed.SetTrueColor(V : TColor);
var
  Temp : Boolean;
begin
  if (fTrueColor <> V)
  then begin
    Temp := fBlink;
    if (fBlink) then Blink := false;
    fTrueColor := V;
    CreateLedBitmap;
    Blink := Temp;
    Repaint;
  end
end;

procedure ThhALed.SetFalseColor(V : TColor);
var
  Temp : Boolean;
begin
  if (fFalseColor <> V)
  then begin
    Temp := fBlink;
    if (fBlink) then Blink := false;
    fFalseColor := V;
    CreateLedBitmap;
    Blink := Temp;
    Repaint;
  end
end;

procedure ThhALed.SetBordColor(V : TColor);
var
  Temp : Boolean;
begin
  if (fBordColor <> V)
  then begin
    Temp := fBlink;
    if (fBlink) then Blink := false;
    fBordColor := V;
    CreateLedBitmap;
    Blink := Temp;
    Repaint;
  end
end;

procedure ThhALed.SetInterval(V : longint);
begin
  fInterval := V;
  if (Assigned(fLedTimer)) then
    fLedTimer.Interval := V;
end;

procedure ThhALed.CmMouseEnter(var Message:TMessage);
begin
  inherited;
  if (Assigned(fOnMouseEnter)) then fOnMouseEnter(Self);
end;

procedure ThhALed.CmMouseLeave(var Message:TMessage);
begin
  inherited;
  if (Assigned(fOnMouseLeave)) then fOnMouseLeave(Self);
end;

procedure Register;
begin
  RegisterComponents('Howie', [ThhALed]);
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合久久鬼色中文字| 同产精品九九九| 国产精品国产三级国产普通话三级| 国产精品久久久久久福利一牛影视 | 成人免费黄色大片| 欧美性三三影院| 欧美精品成人一区二区三区四区| 一区二区三区丝袜| 欧美日韩亚洲高清一区二区| 色综合av在线| 一区二区三区电影在线播| 欧美在线小视频| 免费成人在线网站| 欧美电视剧免费观看| 国产尤物一区二区在线| 国产精品国产三级国产aⅴ入口| 波多野结衣精品在线| 日韩一区在线看| 欧美性猛片aaaaaaa做受| 天堂蜜桃91精品| 国产视频在线观看一区二区三区 | 制服丝袜在线91| 日韩精品高清不卡| 日韩午夜在线播放| 成人午夜又粗又硬又大| 一区二区三区资源| 欧美一区欧美二区| 成人中文字幕在线| 亚洲一区中文在线| 欧美变态tickling挠脚心| 丁香婷婷综合五月| 性做久久久久久| 久久在线免费观看| 欧美优质美女网站| 久久99精品久久久| 亚洲精品国产a| 欧美精品一区二区三区视频| www.综合网.com| 首页欧美精品中文字幕| 国产精品网曝门| 67194成人在线观看| a美女胸又www黄视频久久| 爽好久久久欧美精品| 国产精品久久久久毛片软件| 欧美在线不卡一区| 国产91高潮流白浆在线麻豆 | 51午夜精品国产| 成人免费毛片app| 丝袜亚洲另类欧美| 亚洲丝袜精品丝袜在线| 欧美一级电影网站| 在线观看免费亚洲| 国产成人在线看| 奇米综合一区二区三区精品视频| 亚洲欧美乱综合| 国产日韩亚洲欧美综合| 欧洲一区在线电影| 国产精品亚洲午夜一区二区三区 | 日韩一区二区三区在线视频| 99精品视频在线免费观看| 国产在线视频不卡二| 日韩精品一级二级| 亚洲国产精品一区二区久久| 亚洲日穴在线视频| 国产亚洲欧美激情| 精品国产91洋老外米糕| 欧美无砖专区一中文字| 色哟哟精品一区| 99视频在线观看一区三区| 国产精品一区二区久激情瑜伽 | 日韩欧美一级在线播放| 欧美日韩免费观看一区二区三区 | 国产一区二区三区免费在线观看| 天堂在线亚洲视频| 亚洲国产综合人成综合网站| ...中文天堂在线一区| 国产精品久久免费看| 国产欧美日韩亚州综合 | 色婷婷激情久久| 99九九99九九九视频精品| 成人18精品视频| 成人午夜视频在线| 成人天堂资源www在线| 成人精品高清在线| 成人黄色在线看| 99精品国产一区二区三区不卡| 国产成人精品免费| 不卡视频在线看| 91小视频免费看| 在线视频亚洲一区| 欧美色手机在线观看| 5月丁香婷婷综合| 日韩网站在线看片你懂的| 亚洲精品一区二区在线观看| 日韩欧美亚洲国产另类| 日韩精品中文字幕一区二区三区| 日韩手机在线导航| 久久久久久夜精品精品免费| 2023国产精品视频| 国产欧美一区二区精品婷婷 | 久久国产精品露脸对白| 亚洲午夜av在线| 奇米精品一区二区三区在线观看| 久久av老司机精品网站导航| 国产精品亚洲一区二区三区妖精 | 日本成人在线一区| 国内不卡的二区三区中文字幕 | 日本不卡中文字幕| 狠狠色丁香九九婷婷综合五月| 成人综合在线视频| 色综合中文字幕国产 | 亚洲一区二区三区四区中文字幕| 亚洲一区二区精品视频| 美女视频免费一区| 国产mv日韩mv欧美| 欧美自拍偷拍一区| 精品久久久久久最新网址| 国产农村妇女毛片精品久久麻豆| 亚洲人成精品久久久久| 日本成人在线网站| 91污片在线观看| 日韩视频免费观看高清完整版在线观看 | 亚洲乱码国产乱码精品精98午夜 | 国产精品成人免费在线| 午夜精品aaa| 国产精品456露脸| 欧美三级中文字| 久久久精品一品道一区| 亚洲成人免费观看| 国产高清久久久| 91麻豆精品91久久久久同性| 中文字幕中文字幕一区| 免费高清在线一区| 日本国产一区二区| 久久品道一品道久久精品| 亚洲综合偷拍欧美一区色| 国产精品一区三区| 欧美美女bb生活片| 综合久久给合久久狠狠狠97色| 久久99国内精品| 欧美日韩二区三区| 国产精品不卡在线| 国产a区久久久| 精品奇米国产一区二区三区| 亚洲成人三级小说| 在线免费亚洲电影| 中文字幕av在线一区二区三区| 免费黄网站欧美| 欧美日韩亚洲综合| 一区二区三区日韩在线观看| eeuss鲁片一区二区三区在线观看| 欧美成人精品3d动漫h| 天堂久久久久va久久久久| 色综合中文字幕国产| 国产精品视频一二三| 精品亚洲免费视频| 欧美一级欧美一级在线播放| 亚洲一二三四久久| 色狠狠av一区二区三区| 国产精品视频线看| 成人综合日日夜夜| 国产精品区一区二区三| 国产成人三级在线观看| 久久久久久久一区| 黄色小说综合网站| 精品99一区二区| 韩国av一区二区三区四区| 欧美一级高清大全免费观看| 日韩一区欧美二区| 日韩一区二区三区电影| 日韩中文字幕区一区有砖一区| 99久久精品国产导航| 国产精品久久久久久久裸模| 成人免费高清在线观看| 国产精品久久久久aaaa| av影院午夜一区| 亚洲欧美日韩国产另类专区| 色琪琪一区二区三区亚洲区| 亚洲三级久久久| 欧美日韩在线直播| 日韩成人伦理电影在线观看| 制服丝袜激情欧洲亚洲| 蜜乳av一区二区| 久久奇米777| aaa亚洲精品一二三区| 亚洲欧美激情小说另类| 欧美特级限制片免费在线观看| 丝瓜av网站精品一区二区| 日韩精品在线网站| 国产精品99久久久久久久女警 | 看电影不卡的网站| 久久伊人中文字幕| 国产剧情一区二区三区| 国产精品久久午夜| 欧美日韩国产一级片| 精品一区二区三区av| 中文字幕中文在线不卡住| 91福利在线免费观看| 五月综合激情婷婷六月色窝| 日韩欧美国产三级|