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

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

?? tflatprogressbarunit.pas

?? 貨代程序
?? PAS
字號:
unit TFlatProgressBarUnit;

interface

{$I DFS.inc}

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 
  Forms, Dialogs, ExtCtrls, Comctrls, FlatUtilitys;

type
  TFlatProgressBar = class(TGraphicControl)
  private
    FTransparent: Boolean;
    FSmooth: Boolean;
    FUseAdvColors: Boolean;
    FAdvColorBorder: TAdvColors;
    FOrientation: TProgressBarOrientation;
    FElementWidth: Integer;
    FElementColor: TColor;
    FBorderColor: TColor;
    FPosition: Integer;
    FMin: Integer;
    FMax: Integer;
    FStep: Integer;
    procedure SetMin (Value: Integer);
    procedure SetMax (Value: Integer);
    procedure SetPosition (Value: Integer);
    procedure SetStep (Value: Integer);
    procedure SetColors (Index: Integer; Value: TColor);
    procedure SetAdvColors (Index: Integer; Value: TAdvColors);
    procedure SetUseAdvColors (Value: Boolean);
    procedure SetOrientation (Value: TProgressBarOrientation);
    procedure SetSmooth (Value: Boolean);
    procedure CheckBounds;
    procedure CMSysColorChange (var Message: TMessage); message CM_SYSCOLORCHANGE;
    procedure CMParentColorChanged (var Message: TWMNoParams); message CM_PARENTCOLORCHANGED;
    procedure SetTransparent (const Value: Boolean);
  protected
    procedure CalcAdvColors;
    procedure DrawElements;
    procedure Paint; override;
   {$IFDEF DFS_COMPILER_4_UP}
    procedure SetBiDiMode(Value: TBiDiMode); override;
   {$ENDIF}
  public
    constructor Create (AOwner: TComponent); override;
    procedure StepIt;
    procedure StepBy (Delta: Integer);
  published
    property Transparent: Boolean read FTransparent write SetTransparent default false;
    property Align;
    property Cursor;
    property Color default $00E1EAEB;
    property ColorElement: TColor index 0 read FElementColor write SetColors default $00996633;
    property ColorBorder: TColor index 1 read FBorderColor write SetColors default $008396A0;
    property AdvColorBorder: TAdvColors index 0 read FAdvColorBorder write SetAdvColors default 50;
    property UseAdvColors: Boolean read FUseAdvColors write SetUseAdvColors default false;
    property Orientation: TProgressBarOrientation read FOrientation write SetOrientation default pbHorizontal;
    property Enabled;
    property ParentColor;
    property Visible;
    property Hint;
    property ShowHint;
    property PopupMenu;
    property ParentShowHint;
    property Min: Integer read FMin write SetMin;
    property Max: Integer read FMax write SetMax;
    property Position: Integer read FPosition write SetPosition default 0;
    property Step: Integer read FStep write SetStep default 10;
    property Smooth: Boolean read FSmooth write SetSmooth default false;

    property OnDragDrop;
    property OnDragOver;
    property OnEndDrag;
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property OnStartDrag;
   {$IFDEF DFS_COMPILER_4_UP}
    property Anchors;
    property BiDiMode write SetBidiMode;
    property Constraints;
    property DragKind;
    property ParentBiDiMode;
    property OnEndDock;
    property OnStartDock;
   {$ENDIF}
  end;

implementation

constructor TFlatProgressBar.Create (AOwner: TComponent);
begin
  inherited Create(AOwner);
  Height := 16;
  Width := 147;
  FElementWidth := 8;
  FElementColor := $00996633;
  FBorderColor := $008396A0;
  ParentColor := True;
  Orientation := pbHorizontal;
  FStep := 10;
  FMin := 0;
  FMax := 100;
  FUseAdvColors := false;
  FAdvColorBorder := 50;
  Transparent := false;
end;

procedure TFlatProgressBar.SetOrientation (Value: TProgressBarOrientation);
begin
  if FOrientation <> Value then
  begin
    FOrientation := Value;
    if (csLoading in ComponentState) then
    begin
      Repaint;
      Exit;
    end;
    SetBounds(Left, Top, Height, Width);
    Invalidate;
  end;
end;

procedure TFlatProgressBar.SetMin (Value: Integer);
begin
  if FMin <> Value then
  begin
    FMin := Value;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.SetMax (Value: Integer);
begin
  if FMax <> Value then
  begin
    if Value < FPosition then FPosition := Value;
    FMax := Value;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.SetPosition (Value: Integer);
begin
  if Value > FMax then Value := FMax;
  if Value < FMin then Value := FMin;
  
  if Value > FPosition then
  begin
    FPosition := Value;
    DrawElements;
  end;
  if Value < FPosition then
  begin
    FPosition := Value;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.SetStep (Value: Integer);
begin
  if FStep <> Value then
  begin
    FStep := Value;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.StepIt;
begin
  if (FPosition + FStep) > FMax then
    FPosition := FMax
  else
    FPosition := FPosition + FStep;
  DrawElements;
end;

procedure TFlatProgressBar.StepBy (Delta: Integer);
begin
  if (FPosition + Delta) > FMax then
    FPosition := FMax
  else
    FPosition := FPosition + Delta;
  DrawElements;
end;

procedure TFlatProgressBar.SetColors (Index: Integer; Value: TColor);
begin
  case Index of
    0: FElementColor := Value;
    1: FBorderColor := Value;
  end;
  Invalidate;
end;

procedure TFlatProgressBar.CalcAdvColors;
begin
  if FUseAdvColors then
  begin
    FBorderColor := CalcAdvancedColor(Color, FBorderColor, FAdvColorBorder, darken);
  end;
end;

procedure TFlatProgressBar.SetAdvColors (Index: Integer; Value: TAdvColors);
begin
  case Index of
    0: FAdvColorBorder := Value;
  end;
  CalcAdvColors;
  Invalidate;
end;

procedure TFlatProgressBar.SetUseAdvColors (Value: Boolean);
begin
  if Value <> FUseAdvColors then
  begin
    FUseAdvColors := Value;
    ParentColor := Value;
    CalcAdvColors;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.CMSysColorChange (var Message: TMessage);
begin
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatProgressBar.CMParentColorChanged (var Message: TWMNoParams);
begin
  inherited;
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatProgressBar.SetSmooth(Value: Boolean);
begin
  if Value <> FSmooth then
  begin
    FSmooth := Value;
    Invalidate;
  end;
end;

procedure TFlatProgressBar.SetTransparent(const Value: Boolean);
begin
  FTransparent := Value;
  Invalidate;
end;

{$IFDEF DFS_COMPILER_4_UP}
procedure TFlatProgressBar.SetBiDiMode(Value: TBiDiMode);
begin
  inherited;
  Invalidate;
end;
{$ENDIF}

procedure TFlatProgressBar.CheckBounds;
var
  maxboxes: Word;
begin
  if FOrientation = pbHorizontal then
  begin
    maxboxes := (Width - 3) div (FElementWidth + 1);
    if Width < 12 then
      Width := 12
    else
      Width := maxboxes * (FElementWidth + 1) + 3;
  end
  else
  begin
    maxboxes := (Height - 3) div (FElementWidth + 1);
    if Height < 12 then
      Height := 12
    else
      Height := maxboxes * (FElementWidth + 1) + 3;
  end;
end;

procedure TFlatProgressBar.Paint;
var
  PaintRect: TRect;
begin
  if not Smooth then
    CheckBounds;
  PaintRect := ClientRect;
  
  // Background
  if not FTransparent then
  begin
    canvas.Brush.Color := Self.Color;
    canvas.Brush.Style := bsSolid;
    canvas.FillRect(PaintRect);
  end;

  // Border
  canvas.Brush.Color := FBorderColor;
  Canvas.FrameRect(PaintRect);

  // Elements
  DrawElements;
end;

procedure TFlatProgressBar.DrawElements;
var
  NumElements, NumToPaint: LongInt;
  Painted: Byte;
  ElementRect: TRect;
begin
  with canvas do
  begin
    if not Smooth then
    begin
      if FOrientation = pbHorizontal then
      begin
        NumElements := Trunc((ClientWidth - 3) div (FElementWidth + 1));
        NumToPaint := Trunc((FPosition - FMin) / ((FMax - FMin) / NumElements) + 0.00000001);

        if NumToPaint > NumElements then
          NumToPaint := NumElements;

        {$IFDEF DFS_COMPILER_4_UP}
        if BidiMode = bdRightToLeft then
          ElementRect := Rect(ClientRect.Right - 2 - FElementWidth, ClientRect.Top + 2, ClientRect.Right - 2, ClientRect.Bottom - 2)
        else
          ElementRect := Rect(ClientRect.Left + 2, ClientRect.Top + 2, ClientRect.Left + 2 + FElementWidth, ClientRect.Bottom - 2);
        {$ELSE}
        ElementRect := Rect(ClientRect.Left + 2, ClientRect.Top + 2, ClientRect.Left + 2 + FElementWidth, ClientRect.Bottom - 2);
        {$ENDIF}

        if NumToPaint > 0 then
        begin
          Brush.Color := FElementColor;
          Brush.Style := bsSolid;
          for Painted := 1 to NumToPaint do
          begin
            Canvas.FillRect(ElementRect);
            {$IFDEF DFS_COMPILER_4_UP}
            if BidiMode = bdRightToLeft then
            begin
              ElementRect.Left := ElementRect.Left - FElementWidth - 1;
              ElementRect.Right := ElementRect.Right - FElementWidth - 1;
            end
            else
            begin
             ElementRect.Left := ElementRect.Left + FElementWidth + 1;
             ElementRect.Right := ElementRect.Right + FElementWidth + 1;
            end;
            {$ELSE}
            ElementRect.Left := ElementRect.Left + FElementWidth + 1;
            ElementRect.Right := ElementRect.Right + FElementWidth + 1;
            {$ENDIF}
          end;
        end;
      end
      else
      begin
        NumElements := Trunc((ClientHeight - 3) div (FElementWidth + 1));
        NumToPaint := Trunc((FPosition - FMin) / ((FMax - FMin) / NumElements) + 0.00000001);

        if NumToPaint > NumElements then
          NumToPaint := NumElements;
        ElementRect := Rect(ClientRect.Left + 2, ClientRect.Bottom - FElementWidth - 2, ClientRect.Right - 2, ClientRect.Bottom - 2);


        if NumToPaint > 0 then
        begin
          Brush.Color := FElementColor;
          Brush.Style := bsSolid;
          for Painted := 1 to NumToPaint do
          begin
            Canvas.FillRect(ElementRect);
            ElementRect.Top := ElementRect.Top - (FElementWidth + 1);
            ElementRect.Bottom := ElementRect.Bottom - (FElementWidth + 1);
          end;
        end;
      end;
    end
    else
    begin
      if (FOrientation = pbHorizontal) and (FPosition > 0) then
      begin
        Brush.Color := FElementColor;
        Canvas.FillRect(Rect(2, 2, ClientRect.Left + 2 + ((FPosition * (ClientWidth - 4)) div (FMax - FMin)), ClientRect.Bottom - 2));
      end
      else
      begin
        Brush.Color := FElementColor;
        Canvas.FillRect(Rect(2, ClientRect.Bottom - 2 - ((FPosition * (ClientHeight - 4)) div (FMax - FMin)), ClientRect.Right - 2, ClientRect.Bottom - 2));
      end;
    end;
  end;
end;

end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区高清| 欧美亚洲动漫制服丝袜| 日本网站在线观看一区二区三区| 亚洲精品一区二区三区四区高清| 在线一区二区三区四区| 国产高清亚洲一区| 久久精品国产网站| 午夜精品久久一牛影视| 中文字幕在线观看不卡视频| 欧美不卡激情三级在线观看| 欧美性猛片aaaaaaa做受| 成人精品视频.| 粉嫩aⅴ一区二区三区四区五区| 国产在线不卡一区| 精品影院一区二区久久久| 亚洲成av人片一区二区梦乃| 亚洲黄一区二区三区| 国产精品国产a| 亚洲视频免费看| 夜夜操天天操亚洲| 亚洲午夜一区二区| 亚洲成国产人片在线观看| 五月婷婷综合在线| 琪琪久久久久日韩精品| 裸体在线国模精品偷拍| 国产一区二区在线影院| 不卡电影一区二区三区| 91传媒视频在线播放| 制服.丝袜.亚洲.中文.综合 | 激情欧美一区二区| 国产精品成人免费精品自在线观看| 欧美欧美午夜aⅴ在线观看| 制服丝袜中文字幕亚洲| 久久久蜜臀国产一区二区| 亚洲色图在线视频| 免费高清在线视频一区·| 成人性生交大片免费看中文| 欧美三级电影在线观看| 久久免费的精品国产v∧| 一区二区三区欧美| 美女久久久精品| 99vv1com这只有精品| 91精品欧美久久久久久动漫| 久久久91精品国产一区二区三区| 中文字幕在线一区免费| 精品无码三级在线观看视频| 99精品视频一区二区| 日韩欧美国产三级电影视频| 一区二区三区在线视频播放| 国产乱人伦偷精品视频免下载| 91久久精品国产91性色tv| 国产偷国产偷精品高清尤物| 五月开心婷婷久久| 色欧美乱欧美15图片| 国产午夜亚洲精品理论片色戒| 日本aⅴ亚洲精品中文乱码| 色综合久久综合网欧美综合网| 欧美精品丝袜久久久中文字幕| 日韩美女视频19| 成人国产一区二区三区精品| 26uuu国产在线精品一区二区| 日本中文字幕一区| 欧美精品免费视频| 日本免费在线视频不卡一不卡二| 欧美最猛黑人xxxxx猛交| 亚洲乱码精品一二三四区日韩在线| 国产美女一区二区| 国产欧美日韩另类一区| 国产成人自拍网| 国产精品日产欧美久久久久| 国产成人精品影院| 日韩毛片视频在线看| 91小视频在线免费看| 亚洲午夜私人影院| 777奇米成人网| 日韩av高清在线观看| 亚洲精品在线一区二区| 粉嫩嫩av羞羞动漫久久久| 欧美国产日产图区| 91国产精品成人| 日日摸夜夜添夜夜添国产精品| 91精品欧美一区二区三区综合在 | 美女尤物国产一区| 久久久亚洲精品石原莉奈| 99在线精品免费| 日韩黄色一级片| 久久一区二区三区国产精品| 91啪亚洲精品| 麻豆精品视频在线观看免费| 中文字幕av资源一区| 91电影在线观看| 美脚の诱脚舐め脚责91| 日韩精品在线看片z| 91在线观看美女| 美女视频一区二区三区| 国产精品久久久久久户外露出| 51精品国自产在线| 成人av动漫在线| 国产精品亚洲第一区在线暖暖韩国| 亚洲一区在线播放| 国产精品午夜久久| 日韩一级大片在线| 色久优优欧美色久优优| 国产成人精品亚洲777人妖 | 欧美绝品在线观看成人午夜影视| 婷婷综合五月天| 亚洲福利视频导航| 国产精品久久久久7777按摩| 尤物在线观看一区| 肉肉av福利一精品导航| 激情综合网激情| 不卡视频一二三四| 欧美精品三级日韩久久| 国产欧美在线观看一区| 亚洲日本一区二区| 日本vs亚洲vs韩国一区三区| 国产99精品国产| 欧美中文字幕一区| 国产色爱av资源综合区| 亚洲精品久久久蜜桃| 蜜桃视频一区二区| www.66久久| 精品少妇一区二区三区| 日韩一区欧美一区| 久久精品国产999大香线蕉| 不卡大黄网站免费看| 欧美第一区第二区| 亚洲香肠在线观看| 风间由美中文字幕在线看视频国产欧美| 丁香六月综合激情| 欧美成人在线直播| 五月天欧美精品| 91成人在线精品| 中文欧美字幕免费| 老司机午夜精品99久久| 欧美日韩高清一区二区| 自拍偷拍欧美精品| 国产91色综合久久免费分享| 精品日韩在线一区| 午夜国产精品一区| 色婷婷久久久综合中文字幕| 日本一区二区免费在线| 久久99精品一区二区三区三区| 在线精品视频一区二区| 亚洲人成人一区二区在线观看 | 在线日韩一区二区| 国产精品久久毛片av大全日韩| 国产激情一区二区三区| xnxx国产精品| 成人黄色国产精品网站大全在线免费观看 | 日韩精品在线网站| 久久超碰97人人做人人爱| 欧美刺激午夜性久久久久久久 | 日韩丝袜情趣美女图片| 婷婷成人激情在线网| 欧美视频三区在线播放| 国产精品午夜电影| 一本大道久久精品懂色aⅴ| 久久精品视频在线免费观看| 亚洲一区二区av在线| 欧美日韩性生活| 青青青爽久久午夜综合久久午夜| 欧美浪妇xxxx高跟鞋交| 奇米精品一区二区三区在线观看 | 免费观看成人鲁鲁鲁鲁鲁视频| 91精品久久久久久久久99蜜臂 | 国产亚洲一区二区三区四区| 天堂精品中文字幕在线| 91 com成人网| 国产美女娇喘av呻吟久久| 中文在线一区二区| 欧美三级三级三级| 奇米影视7777精品一区二区| 国产偷国产偷亚洲高清人白洁 | 天天综合网天天综合色| 精品盗摄一区二区三区| 国产伦精品一区二区三区视频青涩 | 91年精品国产| 九九精品视频在线看| 久久婷婷国产综合精品青草| 一区二区在线观看视频| 91精品久久久久久久久99蜜臂 | 日韩国产高清影视| 久久中文字幕电影| 日本道色综合久久| 美国毛片一区二区| 亚洲色图在线播放| 日韩美女在线视频| 欧美日韩国产在线观看| 美日韩黄色大片| 午夜一区二区三区在线观看| 国产无人区一区二区三区| 在线视频中文字幕一区二区| 国产69精品久久久久777| 亚洲国产毛片aaaaa无费看| 欧美不卡一二三| 欧美高清视频www夜色资源网| 国产成人午夜高潮毛片| 日韩av午夜在线观看| 亚洲精品网站在线观看|