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

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

?? percnt3d.pas

?? 有3D效果的進度條 。 developed by delphi
?? PAS
字號:
// The Unofficial Newsletter of Delphi Users - Issue #12 - February 23rd, 1996 

unit Percnt3d;

(*

   TPercnt3D by Lars Posthuma; December 26, 1995.

   Copyright 1995, Lars Posthuma.

   All rights reserved.



   This source code may be freely distributed and used. The author

   accepts no responsibility for its use or misuse.

   No warranties whatsoever are offered for this unit.



   If you make any changes to this source code please inform me at:

   LPosthuma@COL.IB.COM.

*)



interface



uses

  WinTypes, WinProcs, Classes, Graphics, Controls, ExtCtrls, Forms, SysUtils, Dialogs;



type

  TPercnt3DOrientation = (BarHorizontal,BarVertical);



  TPercnt3D = class(TCustomPanel)

    private

      { Private declarations }

      fProgress    : Integer;

      fMinValue    : Integer;

      fMaxValue    : Integer;

      fShowText    : Boolean;



      fOrientation : TPercnt3DOrientation;

      fHeight      : Integer;

      fWidth       : Integer;

      fValueChange : TNotifyEvent;



      procedure SetBounds(Left,Top,fWidth,fHeight: integer); override;

      procedure SetHeight(value: Integer); virtual;

      procedure SetWidth(value: Integer); virtual;



      procedure SetMaxValue(value: Integer); virtual;

      procedure SetMinValue(value: Integer); virtual;

      procedure SetProgress(value: Integer); virtual;

      procedure SetOrientation(value: TPercnt3DOrientation);

      procedure SetShowText(value: Boolean);

      function GetPercentDone: Longint;

    protected

      { Protected declarations }

      procedure Paint; override;

    public

      { Public declarations }

      constructor Create(AOwner: TComponent); override;

      destructor Destroy; override;

      procedure AddProgress(Value: Integer);

      property PercentDone: Longint read GetPercentDone;

      procedure SetMinMaxValue(Minvalue,MaxValue: Integer);

    published

      { Published declarations }

      property Align;

      property Cursor;

      property Color default clBtnFace;

      property Enabled;

      property Font;

      property Height default 25;

      property Width default 100;

      property MaxValue: Integer

               read fMaxValue write SetMaxValue

               default 100;

      property MinValue: Integer

               read fMinValue write SetMinValue

               default 0;

      property Progress: Integer

               read fProgress write SetProgress

               default 0;

      property ShowText: Boolean

               read fShowText write SetShowText

               default True;

      property Orientation: TPercnt3DOrientation             {}

               read fOrientation write SetOrientation

               default BarHorizontal;

      property OnValueChange: TNotifyEvent                   {Userdefined Method}

               read fValueChange write fValueChange;

      property Visible;

      property Hint;

      property ParentColor;

      property ParentFont;

      property ParentShowHint;

      property ShowHint;

      property Tag;



      property OnClick;

      property OnDragDrop;

      property OnDragOver;

      property OnEndDrag;

      property OnMouseDown;

      property OnMouseMove;

      property OnMouseUp;

  end;



procedure Register;



implementation



constructor TPercnt3D.Create(AOwner: TComponent);

begin

 inherited Create(AOwner);

 Color       := clBtnFace;                       {Set initial (default) values}

 Height      := 25;

 Width       := 100;

 fOrientation := BarHorizontal;

 Font.Color  := clBlue;

 Caption     := ' ';

 fMinValue   := 0;

 fMaxValue   := 100;

 fProgress   := 0;

 fShowText   := True;

end;



destructor TPercnt3D.Destroy;

begin

 inherited Destroy

end;



procedure TPercnt3D.SetHeight(value: integer);

begin

 if value <> fHeight then begin

   fHeight:= value;

   SetBounds(Left,Top,Width,fHeight);

   Invalidate;

 end

end;



procedure TPercnt3D.SetWidth(value: integer);

begin

 if value <> fWidth then begin

   fWidth:= value;

   SetBounds(Left,Top,fWidth,Height);

   Invalidate;

 end

end;



procedure TPercnt3D.SetBounds(Left,Top,fWidth,fHeight : integer);

 Procedure SwapWH(Var Width, Height: Integer);

 Var

  TmpInt: Integer;

 begin

  TmpInt:= Width;

  Width := Height;

  Height:= TmpInt;

 end;

 Procedure SetMinDims(Var XValue,YValue: Integer; XValueMin,YValueMin: Integer);

 begin

  if XValue < XValueMin

   then XValue:= XValueMin;

  if YValue < YValueMin

   then YValue:= YValueMin;

 end;

begin

 case fOrientation of

   BarHorizontal: begin

                   if fHeight > fWidth

                     then SwapWH(fWidth,fHeight);

                   SetMinDims(fWidth,fHeight,50,20);

                  end;

   BarVertical  : begin

                   if fWidth > fHeight

                     then SwapWH(fWidth,fHeight);

                   SetMinDims(fWidth,fHeight,20,50);

                  end;

 end;

 inherited SetBounds(Left,Top,fWidth,fHeight);

end;



procedure TPercnt3D.SetOrientation(value : TPercnt3DOrientation);

Var

 x: Integer;

begin

 if value <> fOrientation then begin

   fOrientation:= value;

   SetBounds(Left,Top,Height,Width);                       {Swap Width/Height}

   Invalidate;

 end

end;



procedure TPercnt3D.SetMaxValue(value: integer);

begin

 if value <> fMaxValue then begin

   fMaxValue:= value;

   Invalidate;

 end

end;



procedure TPercnt3D.SetMinValue(value: integer);

begin

 if value <> fMinValue then begin

   fMinValue:= value;

   Invalidate;

 end

end;



procedure TPercnt3D.SetMinMaxValue(MinValue, MaxValue: integer);

begin

 fMinValue:= MinValue;

 fMaxValue:= MaxValue;

 fProgress:= 0;

 Repaint;                                        { Always Repaint }

end;



{ This function solves for x in the equation &quotx is y% of z". }

function SolveForX(Y, Z: Longint): Integer;

begin

 SolveForX:= Trunc( Z * (Y * 0.01) );

end;



{ This function solves for y in the equation &quotx is y% of z". }

function SolveForY(X, Z: Longint): Integer;

begin

 if Z = 0

   then SolveForY:= 0

   else SolveForY:= Trunc( (X * 100) / Z );

end;





function TPercnt3D.GetPercentDone: Longint;

begin

 GetPercentDone:= SolveForY(fProgress - fMinValue, fMaxValue - fMinValue);

end;



procedure TPercnt3D.Paint;

var

 TheImage: TBitmap;

 FillSize: Longint;

 W,H,X,Y : Integer;

 TheText : string;

begin

 with Canvas do begin

   TheImage:= TBitmap.Create;

   try

     TheImage.Height:= Height;

     TheImage.Width := Width;

     with TheImage.Canvas do begin

       Brush.Color:= Color;

       with ClientRect do begin

         { Paint the background }

         { Select Black Pen to outline Window }

         Pen.Style:= psSolid;

         Pen.Width:= 1;

         Pen.Color:= clBlack;



         { Bounding rectangle in black }

         Rectangle(Left,Top,Right,Bottom);



         { Draw the inner bevel }

         Pen.Color:= clGray;

         Rectangle(Left + 3, Top + 3, Right - 3, Bottom - 3);

         Pen.Color:= clWhite;

         MoveTo(Left + 4, Bottom - 4);

         LineTo(Right - 4, Bottom - 4);

         LineTo(Right - 4, Top + 2);



         { Draw the 3D Percent stuff }

         { Outline the Percent Bar in black }

         Pen.Color:= clBlack;

         if Orientation = BarHorizontal

           then w:= Right - Left { + 1; }

           else w:= Bottom - Top;

         FillSize:= SolveForX(PercentDone, W);

         if FillSize > 0 then begin

           case orientation of

            BarHorizontal: begin

                            Rectangle(Left,Top,FillSize,Bottom);



                            { Draw the 3D Percent stuff }

                            { UpperRight, LowerRight, LowerLeft }

                            Pen.Color:= clGray;

                            Pen.Width:= 2;

                            MoveTo(FillSize - 2, Top + 2);

                            LineTo(FillSize - 2, Bottom - 2);

                            LineTo(Left + 2, Bottom - 2);



                            { LowerLeft, UpperLeft, UpperRight }

                            Pen.Color:= clWhite;

                            Pen.Width:= 1;

                            MoveTo(Left + 1, Bottom - 3);

                            LineTo(Left + 1, Top + 1);

                            LineTo(FillSize - 2, Top + 1);

                           end;

            BarVertical:   begin

                            FillSize:= Height - FillSize;

                            Rectangle(Left,FillSize,Right,Bottom);



                            { Draw the 3D Percent stuff }

                            { LowerLeft, UpperLeft, UpperRight }

                            Pen.Color:= clGray;

                            Pen.Width:= 2;

                            MoveTo(Left + 2, FillSize + 2);

                            LineTo(Right - 2, FillSize + 2);

                            LineTo(Right - 2, Bottom - 2);



                            { UpperRight, LowerRight, LowerLeft }

                            Pen.Color:= clWhite;

                            Pen.Width:= 1;

                            MoveTo(Left + 1,FillSize + 2);

                            LineTo(Left + 1,Bottom - 2);

                            LineTo(Right - 2,Bottom - 2);

                           end;

           end;

         end;

         if ShowText = True then begin

           Brush.Style:= bsClear;

           Font       := Self.Font;

           Font.Color := Self.Font.Color;

           TheText:= Format('%d%%', [PercentDone]);

           X:= (Right - Left + 1 - TextWidth(TheText)) div 2;

           Y:= (Bottom - Top + 1 - TextHeight(TheText)) div 2;

           TextRect(ClientRect, X, Y, TheText);

         end;

       end;

     end;

     Canvas.CopyMode:= cmSrcCopy;

     Canvas.Draw(0,0,TheImage);

     finally

       TheImage.Destroy;

   end;

 end;

end;



procedure TPercnt3D.SetProgress(value: Integer);

begin

 if (fProgress <> value) and (value >= fMinValue) and (value <= fMaxValue) then begin

   fProgress:= value;

   Invalidate;

 end;

end;



procedure TPercnt3D.AddProgress(value: Integer);

begin

 Progress:= fProgress + value;

 Refresh;

end;



procedure TPercnt3D.SetShowText(value: Boolean);

begin

 if value <> fShowText then begin

   fShowText:= value;

   Refresh;

 end;

end;



procedure Register;

begin

 RegisterComponents('DDG', [TPercnt3D]);

end;



end.









?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费高清在线视频一区·| 国产精品激情偷乱一区二区∴| www.亚洲免费av| 成人免费视频app| 成人性视频免费网站| 成人黄色一级视频| 91麻豆国产自产在线观看| 色婷婷精品久久二区二区蜜臀av| 91免费看片在线观看| 欧美影院午夜播放| 欧美肥妇bbw| 久久一留热品黄| 中文字幕中文字幕一区| 一区二区三区产品免费精品久久75| 夜夜嗨av一区二区三区四季av| 亚洲国产一区视频| 蓝色福利精品导航| 成人精品视频一区| 欧美视频在线播放| 亚洲精品在线免费播放| 日韩伦理av电影| 午夜精品久久久久| 国产美女在线精品| 欧美最猛黑人xxxxx猛交| 欧美精品久久99| 国产人成一区二区三区影院| 亚洲精品国产a久久久久久| 免费不卡在线视频| 菠萝蜜视频在线观看一区| 欧美在线免费观看视频| 精品日韩一区二区三区免费视频| 国产精品五月天| 日韩激情一区二区| aaa亚洲精品| 精品av综合导航| 亚洲一区二区三区小说| 国产一区二区久久| 欧美亚洲国产一区二区三区va | 亚洲欧美色一区| 性欧美大战久久久久久久久| 国产一本一道久久香蕉| 欧美喷潮久久久xxxxx| 国产精品第四页| 韩国精品久久久| 欧美色偷偷大香| 国产精品国产三级国产普通话蜜臀| 亚洲成人在线网站| 91免费精品国自产拍在线不卡| 精品国产乱码久久| 视频一区中文字幕国产| 99久久99久久精品免费观看| 久久综合久久鬼色中文字| 一区二区三区在线视频观看58| 国产99久久久久久免费看农村| 欧美一级理论片| 亚洲777理论| 在线视频欧美区| 国产精品第四页| fc2成人免费人成在线观看播放| 26uuu欧美日本| 精品综合久久久久久8888| 欧美日韩视频第一区| 一区二区三区免费网站| 色综合天天在线| 亚洲人123区| 一本到高清视频免费精品| 欧美激情中文不卡| 成人av中文字幕| 国产精品美女久久久久久久网站| 国产乱对白刺激视频不卡| 久久精品一区蜜桃臀影院| 国内久久精品视频| 久久视频一区二区| 国产成人一区在线| 国产三级一区二区| 成人国产在线观看| 亚洲精品自拍动漫在线| 在线免费不卡电影| 亚洲一区二区不卡免费| 欧美高清一级片在线| 日韩电影免费在线| 日韩一区二区三区在线观看| 美腿丝袜亚洲三区| 久久精品一区二区三区av| 成人天堂资源www在线| 中文字幕欧美一区| 在线观看视频一区二区欧美日韩| 一区二区激情视频| 欧美一区二区高清| 国产精品一卡二| 亚洲欧洲成人精品av97| 欧美伊人久久久久久午夜久久久久| 一区二区三区四区中文字幕| 欧美乱熟臀69xxxxxx| 国模大尺度一区二区三区| 国产精品久久久久久妇女6080| 91影院在线免费观看| 亚洲成人激情综合网| 2017欧美狠狠色| 色综合久久中文字幕| 日本免费新一区视频| 久久免费视频色| 一本大道综合伊人精品热热| 日韩黄色免费电影| 国产精品久久久久一区二区三区 | 青青草91视频| 久久麻豆一区二区| 91行情网站电视在线观看高清版| 热久久国产精品| 亚洲色图制服诱惑| 久久综合久久综合久久| 色综合中文综合网| 色综合天天综合网天天看片 | 久久精品视频免费| 欧美综合视频在线观看| 国产精品18久久久久久vr| 亚洲综合图片区| 日本一区二区成人| 91精品久久久久久久91蜜桃| a4yy欧美一区二区三区| 韩国一区二区三区| 日韩精品一二区| 亚洲一区在线视频观看| 国产精品久久久99| 亚洲精品一区二区三区精华液| 色噜噜狠狠成人中文综合 | 亚洲va韩国va欧美va精品| 2020国产精品| 日韩欧美国产综合在线一区二区三区 | 午夜在线成人av| 亚洲精品久久久蜜桃| 国产亚洲va综合人人澡精品| 欧美一区二区在线看| 91久久精品一区二区三区| 高清不卡一二三区| 国产精品一区久久久久| 蜜乳av一区二区三区| 亚洲综合视频网| 亚洲视频一二三| 亚洲欧洲精品天堂一级| 国产精品欧美久久久久无广告| 欧美精品一区二区三区高清aⅴ| 欧美精品粉嫩高潮一区二区| 色婷婷久久久综合中文字幕| 99国产精品久久久久| 成人免费看片app下载| 国产不卡视频一区二区三区| 国产乱人伦偷精品视频免下载| 国产一区二区三区精品视频| 韩国女主播成人在线观看| 国产在线观看免费一区| 激情综合网av| 高清国产一区二区三区| 成人国产视频在线观看| 99热国产精品| 欧美性大战久久久久久久蜜臀| 在线亚洲精品福利网址导航| 在线视频欧美精品| 8x福利精品第一导航| 欧美一级午夜免费电影| 欧美成人精品二区三区99精品| 日韩三级视频中文字幕| 精品国产一区久久| 国产欧美一区二区精品忘忧草| 中文字幕精品综合| 夜夜嗨av一区二区三区网页| 天天操天天综合网| 精品一区二区三区在线播放| 国产高清在线精品| 欧美性大战久久| 久久综合久色欧美综合狠狠| 国产欧美一区二区精品性| 亚洲精品精品亚洲| 免费看黄色91| 成人激情小说乱人伦| 欧美日本视频在线| 国产亚洲欧洲一区高清在线观看| 国产精品久久久久三级| 婷婷一区二区三区| 国产成人免费视频一区| 欧美亚洲综合一区| 国产日韩欧美制服另类| 亚洲午夜在线视频| 国产一区激情在线| 欧美在线你懂的| 国产精品全国免费观看高清 | 色天天综合色天天久久| 欧美二区三区91| 国产精品久久久久影院| 日韩av不卡一区二区| 99久久久久免费精品国产| 日韩亚洲欧美在线| 一区二区三区四区不卡视频| 国产一区二区三区在线观看免费| 日本道色综合久久| 久久久久久电影| 蜜桃视频一区二区三区在线观看| 91在线一区二区三区| 久久综合九色综合97婷婷女人| 夜夜精品视频一区二区 |