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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? qiledmatrix.pas

?? Iocomp Ultra Pack v3.0.2 Sources.For.Delphi 數(shù)據(jù)顯示編程插件,可用于工業(yè)控制
?? 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类专区欧美蜜桃臀第一页| 欧美三级电影网站| 免费观看一级特黄欧美大片| 亚洲六月丁香色婷婷综合久久| 国产精品五月天| 久久久久久久久久久99999| 欧美一区二区三区在线观看视频| 欧美日韩一区小说| 日韩午夜av一区| 精品理论电影在线观看 | 亚洲影视在线观看| 亚洲动漫第一页| 免费人成网站在线观看欧美高清| 看电视剧不卡顿的网站| 国产精品一卡二| 94色蜜桃网一区二区三区| 91麻豆蜜桃一区二区三区| 欧美日韩一级二级| 亚洲精品一区在线观看| 国产精品久久久久影院亚瑟| 樱花影视一区二区| 美国精品在线观看| 99久久久国产精品免费蜜臀| 这里只有精品免费| 国产拍揄自揄精品视频麻豆| 依依成人精品视频| 蜜桃免费网站一区二区三区| 成人不卡免费av| 日韩午夜电影av| 一区在线中文字幕| 美女尤物国产一区| 色综合视频在线观看| 日韩一区二区高清| 日韩美女视频一区| 九九视频精品免费| 欧美亚洲一区二区三区四区| 精品久久久久久久久久久久久久久久久 | 欧美久久高跟鞋激| 国产片一区二区| 日本大胆欧美人术艺术动态| www.色精品| 精品久久久久久久久久久久包黑料 | 欧美久久一二区| 国产精品乱人伦| 蜜桃av噜噜一区| 色婷婷综合久久久久中文一区二区| 亚洲美女精品一区| 韩国av一区二区三区| 午夜精品在线视频一区| 国产98色在线|日韩| 成人一区在线看| 99精品热视频| 色婷婷综合久色| 欧美精品一二三区| 精品日韩一区二区| 亚洲欧美另类小说| 亚洲不卡av一区二区三区| 天天射综合影视| 国产精品99久久久久久似苏梦涵| 成人手机在线视频| 91传媒视频在线播放| 91精品国产乱码久久蜜臀| 国产日产欧美一区二区视频| 一区二区日韩电影| 国产一区二区日韩精品| 欧美色涩在线第一页| www国产成人免费观看视频 深夜成人网| 久久国产综合精品| 成人综合婷婷国产精品久久免费| 色婷婷久久一区二区三区麻豆| 欧美肥妇bbw| 国产精品麻豆网站| 久久精品国产99久久6| 亚洲成人动漫一区| 亚洲免费观看高清完整版在线观看 | 久久蜜桃一区二区| 欧美国产一区视频在线观看| 一级精品视频在线观看宜春院| 天天爽夜夜爽夜夜爽精品视频| 成人精品免费看| 精品理论电影在线观看| 偷拍自拍另类欧美| 91福利社在线观看| 国产精品久久免费看| 久久精品国产第一区二区三区 | 一区二区日韩av| 成人一区二区三区视频| 日韩欧美成人一区| 亚洲sss视频在线视频| 99国产精品久久久久久久久久久| 国产亚洲欧美在线| 国产婷婷色一区二区三区在线| 日本不卡一区二区三区高清视频| 91极品美女在线| 国产精品色在线观看| 国产精品一区二区x88av| 精品国产3级a| 欧美a级一区二区| 欧美丰满一区二区免费视频| 亚洲欧美日韩一区二区 | 亚洲成人1区2区| 色94色欧美sute亚洲13| 欧美在线播放高清精品| 亚洲在线成人精品| 欧美伊人久久大香线蕉综合69| 亚洲精品伦理在线| 色噜噜狠狠色综合中国| 亚洲乱码中文字幕| 在线免费观看成人短视频| 亚洲女爱视频在线| 欧美日韩在线观看一区二区| 日本中文字幕不卡| 欧美不卡在线视频| 国产精品 日产精品 欧美精品| 久久亚洲二区三区| gogogo免费视频观看亚洲一| 一区在线观看视频| 欧美系列一区二区| 日韩av不卡在线观看| 精品国产麻豆免费人成网站| 国产一区不卡视频| 国产精品亲子伦对白| 91香蕉视频污| 欧美成人精品福利| 国产成a人亚洲精品| 自拍偷在线精品自拍偷无码专区| 91精品91久久久中77777| 亚洲成人黄色小说| 2022国产精品视频| 91视频www| 午夜精品福利一区二区蜜股av | 亚洲欧美另类小说视频| 欧美日韩在线观看一区二区 | 一区二区三区日韩精品视频| 欧美日韩的一区二区| 国产美女主播视频一区| 亚洲裸体在线观看| 久久综合资源网| 在线视频你懂得一区| 精品午夜久久福利影院| 亚洲欧美日韩精品久久久久| 欧美大片在线观看| 一本色道久久综合狠狠躁的推荐 | 极品少妇xxxx精品少妇| 久久久天堂av| 精品视频免费在线| 成人精品一区二区三区中文字幕| 亚洲电影视频在线| 国产精品久久久99| 日韩欧美一区在线观看| 91影院在线观看| 国产精品1区2区| 免费成人在线观看视频| 亚洲丝袜制服诱惑| 日本一区二区三区在线观看| 欧美精品日韩一本| 色菇凉天天综合网| 成人黄色片在线观看| 韩国女主播一区| 天堂影院一区二区| 亚洲精选免费视频| 国产精品久久久久久久久久久免费看| 日韩欧美激情在线| 欧美一区国产二区| 欧美日本在线视频| 一道本成人在线| 一本到三区不卡视频| 成人高清在线视频| 懂色一区二区三区免费观看| 国产精品一区二区在线看| 日本91福利区| 日本中文字幕一区| 国产亚洲污的网站| 亚洲精品一区二区三区蜜桃下载 | 9l国产精品久久久久麻豆| 国产在线精品一区二区不卡了| 日韩—二三区免费观看av| 午夜免费久久看| 日韩在线观看一区二区| 三级影片在线观看欧美日韩一区二区| 亚洲激情成人在线| 一区二区三区不卡视频| 亚洲另类在线一区| 亚洲精品菠萝久久久久久久| 一区二区三区鲁丝不卡| 亚洲午夜精品17c| 亚洲国产精品久久久久婷婷884| 亚洲国产中文字幕| 日本中文在线一区| 激情丁香综合五月| 国产iv一区二区三区| 91在线观看美女| 欧美性大战久久久久久久蜜臀 | 成人禁用看黄a在线| 国产精品白丝av| 色国产综合视频| 日韩欧美不卡一区| 日本一二三不卡| 亚洲国产乱码最新视频| 美女视频免费一区|