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

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

?? qiledmatrix.pas

?? Iocomp Ultra Pack v3.0.2 Sources.For.Delphi 數據顯示編程插件,可用于工業控制
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
{*******************************************************}
{                                                       }
{       TiLedMatrix Component                           }
{                                                       }
{       Copyright (c) 1997,2003 Iocomp Software         }
{                                                       }
{*******************************************************}
{$I iInclude.inc}

{$ifdef iVCL}unit  iLedMatrix;{$endif}
{$ifdef iCLX}unit QiLedMatrix;{$endif}

interface

uses
  {$I iIncludeUses.inc}
  {$IFDEF iVCL} iTypes, iGPFunctions,   iCustomComponent, iOPCItem;{$ENDIF}
  {$IFDEF iCLX}QiTypes, QiGPFunctions, QiCustomComponent;          {$ENDIF}

type
  TClickIndicatorEvent = procedure(Row, Col: Integer) of object;
  
  TLedCacheObject = class(TObject)
  public
    ActiveBitmap   : TBitmap;
    InActiveBitmap : TBitmap;
    Color          : TColor;
    destructor Destroy; override;
  end;

  TLedCache = class(TObject)
  private
    FCacheList : TList;
  public
    constructor Create;
    destructor  Destroy; override;
    function  Find(AColor: TColor) : TLedCacheObject;
    procedure Add(LedCacheObject: TLedCacheObject);
    procedure Clear;
  end;

  TIndicatorData = record
    Color     : TColor;
    Caption   : String[50];
    Active    : Boolean;
    Dirty     : Boolean;
    ARect     : TRect;
    MouseDown : Boolean;
  end;

  PIndicatorList = ^TIndicatorList;

  TIndicatorList = array[0..100000] of TIndicatorData;

  TiLedMatrixIndiatorStyle = (ilmisRound, ilmisRectangle);

  TiLedMatrix = class(TiCustomComponent)
  private
    FLedCache                     : TLedCache;
    FFillBackGround               : Boolean;
    FIndicatorList                : PIndicatorList;
    FIndicatorActiveColor         : TColor;
    FColCount                     : Integer;
    FRowCount                     : Integer;
    FIndicatorStyle               : TiLedMatrixIndiatorStyle;
    FIndicatorHeight              : Integer;
    FIndicatorWidth               : Integer;
    FIndicatorBevelStyle          : TiBevelStyle;
    FSpacingHorizontal            : Integer;
    FOuterMargin                  : Integer;
    FSpacingVertical              : Integer;
    FAutoSize                     : Boolean;
    FOnAutoSize                   : TNotifyEvent;
    FIndicatorCaptionInactiveFont : TFont;
    FIndicatorCaptionActiveFont   : TFont;
    FIndicatorShowReflection      : Boolean;
    FDoingAutoSize                : Boolean;
    FOnMouseUpIndicator           : TClickIndicatorEvent;
    FOnMouseMoveIndicator         : TClickIndicatorEvent;
    FOnMouseDownIndicator         : TClickIndicatorEvent;
    FOnClickIndicator             : TClickIndicatorEvent;
    FOnDblClickIndicator          : TClickIndicatorEvent;

    FClickRow                     : Integer;
    FClickCol                     : Integer;

    procedure SetIndicatorActiveColor(const Value: TColor);
    procedure SetColCount            (const Value: Integer);
    procedure SetRowCount            (const Value: Integer);
    procedure SetIndicatorStyle      (const Value: TiLedMatrixIndiatorStyle);
    procedure SetIndicatorBevelStyle (const Value: TiBevelStyle);
    procedure SetIndicatorHeight     (const Value: Integer);
    procedure SetIndicatorWidth      (const Value: Integer);
    procedure SetOuterMargin         (const Value: Integer);
    procedure SetSpacingHorizontal   (const Value: Integer);
    procedure SetSpacingVertical     (const Value: Integer);
    procedure iSetAutoSize           (const Value: Boolean);
    procedure SetIndicatorActive     (Row, Col: Integer; const Value: Boolean);
    procedure SetIndicatorColor      (Row, Col: Integer; const Value: TColor);
    function GetIndicatorActive      (Row, Col: Integer): Boolean;
    function GetIndicatorColor       (Row, Col: Integer): TColor;
    function GetIndicatorCaption     (Row, Col: Integer): String;
    procedure SetIndicatorCaption    (Row, Col: Integer; const Value: String);
    procedure SetIndicatorCaptionActiveFont  (const Value: TFont);
    procedure SetIndicatorCaptionInactiveFont(const Value: TFont);
    procedure SetIndicatorShowReflection     (const Value: Boolean);
  protected
    function  GetAutoSize : TPoint;
    function  GetLedAtXY(X, Y: Integer): Integer;
    procedure SetTransparent    (const Value: Boolean);                           override;
    procedure SetBackGroundColor(const Value: TColor);                            override;
    procedure SetBorderStyle    (const Value: TiBevelStyle);                      override;
    procedure SetCachedDrawing  (const Value: Boolean);                           override;
    procedure DoAutoSize;
    procedure SetCapacity;
    procedure iPaintTo       (Canvas: TCanvas);                                   override;
    procedure iPaintCached   (Canvas: TCanvas);
    procedure iPaintNonCached(Canvas: TCanvas);
    procedure DrawRound    (Canvas: TCanvas; DrawRect: TRect; Active: Boolean; AColor: TColor);
    procedure DrawRectangle(Canvas: TCanvas; DrawRect: TRect; Active: Boolean; AColor: TColor);
    procedure RedoAll;
    procedure ClearMouseDown;
    procedure iDoKillFocus;
                                                                                   override;
    procedure iMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    procedure iMouseMove(                      Shift: TShiftState; X, Y: Integer); override;
    procedure iMouseUp  (Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    procedure DblClick; override;

    {$ifdef iVCL}
    procedure UpdateOPCSpecialList;                            override;
    function  OPCNewDataSpecial(iOPCItem: TiOPCItem): Boolean; override;
    {$endif}
  public
    constructor Create(AOwner: TComponent);                                        override;
    destructor  Destroy;                                                           override;
    procedure   SetBounds(ALeft, ATop, AWidth, AHeight: Integer);                  override;

    property IndicatorActive [Row, Col: Integer] : Boolean      read GetIndicatorActive  write SetIndicatorActive;
    property IndicatorColor  [Row, Col: Integer] : TColor       read GetIndicatorColor   write SetIndicatorColor;
    property IndicatorCaption[Row, Col: Integer] : String       read GetIndicatorCaption write SetIndicatorCaption;
    property OnAutoSize                          : TNotifyEvent read FOnAutoSize         write FOnAutoSize;
  published
    property AutoSize                     : Boolean                  read FAutoSize                     write iSetAutoSize                    default True;
    property IndicatorActiveColor         : TColor                   read FIndicatorActiveColor         write SetIndicatorActiveColor         default clLime;
    property ColCount                     : Integer                  read FColCount                     write SetColCount                     default 5;
    property RowCount                     : Integer                  read FRowCount                     write SetRowCount                     default 5;
    property IndicatorStyle               : TiLedMatrixIndiatorStyle read FIndicatorStyle               write SetIndicatorStyle               default ilmisRectangle;
    property IndicatorWidth               : Integer                  read FIndicatorWidth               write SetIndicatorWidth               default 10;
    property IndicatorHeight              : Integer                  read FIndicatorHeight              write SetIndicatorHeight              default 10;
    property IndicatorBevelStyle          : TiBevelStyle             read FIndicatorBevelStyle          write SetIndicatorBevelStyle          default ibsNone;
    property IndicatorCaptionActiveFont   : TFont                    read FIndicatorCaptionActiveFont   write SetIndicatorCaptionActiveFont;
    property IndicatorCaptionInactiveFont : TFont                    read FIndicatorCaptionInactiveFont write SetIndicatorCaptionInactiveFont;
    property OuterMargin                  : Integer                  read FOuterMargin                  write SetOuterMargin                  default 5;
    property SpacingHorizontal            : Integer                  read FSpacingHorizontal            write SetSpacingHorizontal            default 2;
    property SpacingVertical              : Integer                  read FSpacingVertical              write SetSpacingVertical              default 2;
    property IndicatorShowReflection      : Boolean                  read FIndicatorShowReflection      write SetIndicatorShowReflection      default True;

    property OnMouseDownIndicator         : TClickIndicatorEvent     read FOnMouseDownIndicator         write FOnMouseDownIndicator;
    property OnMouseMoveIndicator         : TClickIndicatorEvent     read FOnMouseMoveIndicator         write FOnMouseMoveIndicator;
    property OnMouseUpIndicator           : TClickIndicatorEvent     read FOnMouseUpIndicator           write FOnMouseUpIndicator;
    property OnClickIndicator             : TClickIndicatorEvent     read FOnClickIndicator             write FOnClickIndicator;
    property OnDblClickIndicator          : TClickIndicatorEvent     read FOnDblClickIndicator          write FOnDblClickIndicator;

    property BackGroundColor;
    property BorderStyle;
    property Transparent;
    property CachedDrawing;
    property Width  default 150;
    property Height default 150;
  end;

implementation
//****************************************************************************************************************************************************
constructor TiLedMatrix.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);

  Width  := 150;
  Height := 150;

  FIndicatorActiveColor    := clLime;
  FIndicatorShowReflection := True;
  FColCount                := 5;
  FRowCount                := 5;
  FAutoSize                := True;

  FOuterMargin             := 5;

  FIndicatorWidth          := 10;
  FIndicatorHeight         := 10;

  FIndicatorStyle          := ilmisRectangle;

  FSpacingHorizontal       := 2;
  FSpacingVertical         := 2;

  SetCapacity;

  FIndicatorCaptionActiveFont            := TFont.Create;
  FIndicatorCaptionActiveFont.OnChange   := BackGroundChangeEvent;

  FIndicatorCaptionInactiveFont          := TFont.Create;
  FIndicatorCaptionInactiveFont.OnChange := BackGroundChangeEvent;
  FIndicatorCaptionInactiveFont.Color    := clWhite;

  FLedCache := TLedCache.Create;
end;
//****************************************************************************************************************************************************
destructor TiLedMatrix.Destroy;
begin
  FIndicatorCaptionActiveFont.Free;
  FIndicatorCaptionInactiveFont.Free;

  FLedCache.Free;
  FreeMem(FIndicatorList);
  inherited;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
begin
  inherited;
  if FAutoSize and not FDoingAutoSize then
    begin
      IndicatorWidth  := Trunc((AWidth  - 2*FOuterMargin)/FColCount) - FSpacingHorizontal;
      IndicatorHeight := Trunc((AHeight - 2*FOuterMargin)/FRowCount) - FSpacingVertical;
    end;
  RedoAll;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.SetIndicatorCaptionActiveFont  (const Value: TFont);begin FIndicatorCaptionActiveFont.Assign(Value);  end;
procedure TiLedMatrix.SetIndicatorCaptionInactiveFont(const Value: TFont);begin FIndicatorCaptionInactiveFont.Assign(Value);end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.SetBackGroundColor(const Value: TColor);
begin
  inherited;
  RedoAll;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.SetBorderStyle(const Value: TiBevelStyle);
begin
  inherited;
  RedoAll;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.RedoAll;
var
  Row, Col : Integer;
begin
  if Assigned(FIndicatorList) then
    begin
      for Row := 0 to FRowCount -1 do
        for Col := 0 to FColCount - 1 do
          FIndicatorList^[Col + Row*ColCount].Dirty  := True;
    end;
  if Assigned(FLedCache) then FLedCache.Clear;
  FFillBackGround := True;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.SetCapacity;
var
  Col, Row : Integer;
begin
  if ((FRowCount * FColCount) > MaxListSize) then Exception.Create('Exceed Maximum Matrix Size');

  ReallocMem(FIndicatorList, FRowCount * FColCount * SizeOf(TIndicatorData));
  for Col := 0 to FColCount -1 do
    for Row := 0 to FRowCount - 1 do
      begin
        FIndicatorList^[Col + Row*ColCount].Active  := False;
        FIndicatorList^[Col + Row*ColCount].Color   := FIndicatorActiveColor;
        FIndicatorList^[Col + Row*ColCount].Dirty   := True;
        FIndicatorList^[Col + Row*ColCount].Caption := '';
      end;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.iDoKillFocus;
begin
  inherited;
  ClearMouseDown;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.ClearMouseDown;
var
  x : Integer;
begin
  for x := 0 to (ColCount*RowCount)-1 do
    FIndicatorList^[x].MouseDown := False;
end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.iMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  Index : Integer;
  Row   : Integer;
  Col   : Integer;
begin
  inherited;
  Index := GetLedAtXY(X, Y);

  if Index <> -1 then
    begin
      FIndicatorList^[Index].MouseDown := True;
      Row := Index div ColCount;
      Col := Index mod ColCount;
      if Assigned(FOnMouseDownIndicator) then FOnMouseDownIndicator(Row, Col);
    end;

end;
//****************************************************************************************************************************************************
procedure TiLedMatrix.iMouseMove(Shift: TShiftState; X, Y: Integer);
var
  Index : Integer;
  Row   : Integer;
  Col   : Integer;
begin
  inherited;
  Index := GetLedAtXY(X, Y);

  if Index <> -1 then
    begin
      Row := Index div ColCount;
      Col := Index mod ColCount;
      if Assigned(FOnMouseMoveIndicator) then FOnMouseMoveIndicator(Row, Col);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品亚洲一区二区三区免费| 中文字幕不卡三区| 色噜噜久久综合| 97久久精品人人做人人爽| 精品影视av免费| 精品无人码麻豆乱码1区2区| 久久99精品国产| 高清久久久久久| 成人精品视频一区二区三区尤物| 国产精品盗摄一区二区三区| 国产精品久久久久久久久动漫 | 成人av片在线观看| 国产成人久久精品77777最新版本| 综合久久综合久久| 亚洲自拍偷拍麻豆| 日本va欧美va精品发布| 久久疯狂做爰流白浆xx| 精品一二三四区| 成人在线综合网站| 日本韩国欧美三级| 欧美一区二区福利视频| 久久色在线观看| 亚洲欧美成aⅴ人在线观看| 亚州成人在线电影| 国产毛片一区二区| 色视频欧美一区二区三区| 欧美日韩国产综合草草| 久久综合久色欧美综合狠狠| 亚洲精品综合在线| 美日韩一区二区| 99综合影院在线| 欧美人成免费网站| 国产精品热久久久久夜色精品三区| 日韩小视频在线观看专区| 久久亚洲影视婷婷| 综合久久给合久久狠狠狠97色 | 99综合电影在线视频| 一本久久精品一区二区| 欧美一区二区三区不卡| 欧美高清在线一区二区| 日本中文字幕一区二区视频| www.亚洲在线| 久久久美女毛片| 亚洲成在人线免费| 国产精品99久| 欧美丰满少妇xxxbbb| 亚洲人成网站色在线观看| 激情综合色播激情啊| 色综合天天综合色综合av| 欧美精品一区二区三| 亚洲一级二级三级| 99精品国产视频| 国产午夜精品一区二区三区嫩草 | 国产专区综合网| 在线免费观看成人短视频| 亚洲国产精品激情在线观看| 免费成人在线观看视频| 欧美视频一区二区三区在线观看| 欧美综合久久久| 中文字幕亚洲不卡| 国产99久久久久久免费看农村| 国产一区二区三区精品视频| 欧美高清www午色夜在线视频| 91美女福利视频| 国产精品女人毛片| 成人在线视频首页| 精品乱人伦小说| 久久国产婷婷国产香蕉| 69成人精品免费视频| 亚洲国产美女搞黄色| 在线日韩一区二区| 亚洲综合久久av| 成人av在线资源网站| 欧美一区欧美二区| 午夜精品久久久久久久99水蜜桃| 日韩av电影天堂| 欧美在线|欧美| 亚洲国产精品综合小说图片区| 亚洲高清视频的网址| 欧美日韩一区三区| 日韩精品免费视频人成| 日韩午夜在线观看视频| 美女国产一区二区三区| 精品91自产拍在线观看一区| 免费成人小视频| 久久一二三国产| 成人免费视频国产在线观看| 国产精品网友自拍| 91啪在线观看| 免费在线看一区| 中文成人综合网| 91黄色在线观看| 全国精品久久少妇| 国产欧美久久久精品影院| eeuss鲁片一区二区三区| 亚洲最大成人网4388xx| 欧美在线不卡一区| 激情文学综合丁香| 国产精品久久久久久久久图文区| 日本不卡在线视频| 国产午夜精品一区二区三区视频| 一区二区免费看| 日韩午夜av电影| 99久久精品免费看| 蜜桃av一区二区三区电影| 久久久久久久性| 欧美日韩一区 二区 三区 久久精品| 国产欧美一区二区三区沐欲| 色综合久久综合网欧美综合网 | 99re免费视频精品全部| 一区二区久久久久久| 欧美精品乱码久久久久久按摩| 日韩毛片视频在线看| 欧美三级电影一区| 国产高清不卡一区二区| 亚洲一区二区三区三| 精品国产sm最大网站免费看| 色婷婷综合久久久久中文| 日本视频免费一区| 亚洲一区二区成人在线观看| 亚洲国产精品成人久久综合一区| 国产精品99久| 蜜桃传媒麻豆第一区在线观看| 欧美午夜免费电影| 成人做爰69片免费看网站| 青青草91视频| 亚洲大片精品永久免费| 亚洲人成小说网站色在线| 久久久久久久精| 这里是久久伊人| 欧美综合在线视频| 色综合天天综合网天天看片| 国产精品69毛片高清亚洲| 一区二区三区国产精华| 欧美国产综合一区二区| 欧美电影免费观看高清完整版在| 麻豆成人在线观看| 亚洲成人免费在线| 一区二区三区中文在线| 中文字幕制服丝袜成人av| 26uuu久久天堂性欧美| 欧美日韩一卡二卡| 欧美色综合天天久久综合精品| 日韩—二三区免费观看av| 亚洲欧美视频在线观看视频| 国产欧美日韩另类视频免费观看| 成人自拍视频在线| 国产成人小视频| 国产91精品久久久久久久网曝门 | 99这里都是精品| av电影一区二区| av中文字幕一区| 91免费视频观看| 欧美在线播放高清精品| 欧美三级日韩三级| 4438亚洲最大| 精品sm在线观看| 久久久精品影视| 亚洲欧洲99久久| 亚洲码国产岛国毛片在线| 亚洲一区二区五区| 视频一区二区三区入口| 美女久久久精品| 国产精品一区二区三区乱码| 丁香网亚洲国际| 一本高清dvd不卡在线观看| 欧美性xxxxx极品少妇| 制服丝袜日韩国产| 精品国产三级a在线观看| 国产日本亚洲高清| 亚洲美女屁股眼交| 日韩国产精品大片| 国产99久久久国产精品潘金 | 首页亚洲欧美制服丝腿| 久久电影网站中文字幕| 精品无人区卡一卡二卡三乱码免费卡| 亚洲女性喷水在线观看一区| 亚洲一区二区三区四区五区黄| 日韩欧美在线1卡| 国产女同性恋一区二区| 亚洲综合色视频| 久久国产精品色| 色综合久久久久久久| 91精品国产综合久久精品| 久久久久久久久久久久久女国产乱| 欧美精品免费视频| 国产精品丝袜在线| 日韩—二三区免费观看av| 国产在线播放一区| 欧美吞精做爰啪啪高潮| 久久中文字幕电影| 亚洲一区二区三区四区在线 | 精品日韩在线观看| 国产精品对白交换视频| 日本中文字幕一区二区有限公司| 亚洲制服丝袜av| 福利一区福利二区| 这里只有精品99re| 亚洲免费三区一区二区| 国产激情一区二区三区四区 |