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

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

?? wait.pas

?? 包含常用Internet協議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
字號:
{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Program:      WAIT.PAS
Object:       Delphi component which enable a component or application to
              wait for some event, optionnaly displaying a progress bar.
Author:       Fran鏾is PIETTE
Creation:     April, 1996
Version:      2.13
EMail:        http://users.swing.be/francois.piette  francois.piette@swing.be
              http://www.rtfm.be/fpiette             francois.piette@rtfm.be
              francois.piette@pophost.eunet.be
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1996-2000 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
              implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

              4. You must register this software by sending a picture postcard
                 to the author. Use a nice stamp and mention your name, street
                 address, EMail address and any comment you like to say.

Updates:
Jul 22, 1997  Adapted to Delphi 3
Oct 22, 1997  V2.00 Added WaitVersion constant and Running property
Nov 11, 1997  V2.10 Made a TCustomWait base component with virtual functions.
              This will easy the making of descendend components.
              Renamed OnWaitEvent    -> OnWait
                      OnTimeOutEvent -> OnTimeout
              Added events:
              OnWaitStart   When the component starts his job.
              OnWaiting     When the component is waiting.
              OnWaitStop    When the component stops his job.
Mar 27, 1998  V2.11 Adapted for C++Builder 3
Apr 20, 1998  V2.12 Removed the second 'r' from 'courrier'
Jul 08, 1998  V2.13 Adadpted for Delphi 4


 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit Wait;

{$B-}           { Enable partial boolean evaluation   }
{$T-}           { Untyped pointers                    }
{$IFNDEF VER80} { Not for Delphi 1                    }
    {$J+}       { Allow typed constant to be modified }
{$ENDIF}
{$IFDEF VER110} { C++ Builder V3.0                    }
    {$ObjExportAll On}
{$ENDIF}

interface

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

const
  WaitVersion = 212;

type
  TWaitEvent = procedure(Sender: TObject; Count : integer) of object;

  TCustomWait = class(TCustomControl)
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
  private
    FPen         : TPen;
    FFont        : TFont;
    FBrush       : TBrush;
    FCaption     : String;
    FTimer       : TTimer;
    FOnWait      : TWaitEvent;
    FOnWaiting   : TNotifyEvent;
    FOnWaitStart : TNotifyEvent;
    FOnWaitStop  : TNotifyEvent;
    FOnTimeout   : TNotifyEvent;
    FModalResult : TModalResult;
    FStartVal    : Integer;
  protected
    procedure   Paint; override;
    procedure   TimerEvent(Sender: TObject);
    procedure   AppMessage(var Msg: TMsg; var Handled: Boolean);
    function    GetRunning : Boolean;
    procedure   SetInterval(Value : Word);
    function    GetInterval : Word;
  public
    procedure   Start; virtual;
    procedure   Stop; virtual;
    procedure   StartModal; virtual;
    procedure   Restart; virtual;
  protected
    property Caption     : String       read FCaption      write FCaption;
    property ModalResult : TModalResult read FModalResult  write FModalResult;
    property Interval    : Word         read GetInterval   write SetInterval;
    property Running     : Boolean      read GetRunning;
    property OnWait      : TWaitEvent   read FOnWait       write FOnWait;
    property OnTimeout   : TNotifyEvent read FOnTimeout    write FOnTimeout;
    property OnWaiting   : TNotifyEvent read FOnWaiting    write FOnWaiting;
    property OnWaitStart : TNotifyEvent read FOnWaitStart  write FOnWaitStart;
    property OnWaitStop  : TNotifyEvent read FOnWaitStop   write FOnWaitStop;
  end;

  TWait = class(TCustomWait)
  published
    property Caption;
    property ModalResult;
    property Interval;
    property OnWait;
    property OnWaiting;
    property OnWaitStart;
    property OnWaitStop;
    property OnTimeout;
    property Running;
    property Visible;
  end;

procedure Register;

implementation

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure Register;
begin
    RegisterComponents('FPiette', [TWait]);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function atoi(value : string) : Integer;
var
    i : Integer;
begin
    Result := 0;
    i := 1;
    while (i <= Length(Value)) and (Value[i] = ' ') do
        i := i + 1;
    while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin
        Result := Result * 10 + ord(Value[i]) - ord('0');
        i := i + 1;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
constructor TCustomWait.Create(AOwner: TComponent);
begin
    inherited Create(AOwner);
    IsControl      := TRUE;
    Width          := 192;
    Height         := 32;
    Caption        := '60';
    FStartVal      := 60;
    FOnWait        := nil;
    FBrush         := TBrush.Create;
    FPen           := TPen.Create;
    FFont          := TFont.Create;
    FFont.Size     := 8;
    FFont.Name     := 'Courier';
    FFont.Pitch    := fpFixed;
    FTimer         := TTimer.Create(Self);
    FTimer.Enabled := FALSE;
    FTimer.OnTimer := TimerEvent;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
destructor TCustomWait.Destroy;
begin
    FPen.Free;
    FFont.Free;
    FBrush.Free;
    FTimer.Free;
    inherited Destroy;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.SetInterval(Value : Word);
begin
    FTimer.Interval := Value;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TCustomWait.GetInterval : Word;
begin
    Result := FTimer.Interval;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.Start;
begin
    FStartVal := atoi(Caption);
    if FStartVal = 0 then begin
        FStartVal := 15;
        Caption   := IntToStr(FStartVal);
    end;
    FTimer.Enabled := TRUE;
    if Assigned(FOnWaitStart) then
        FOnWaitStart(Self);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.Restart;
begin
    Caption := IntToStr(FStartVal);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.Stop;
begin
    FModalResult   := mrOk;
    FTimer.Enabled := FALSE;
    Caption        := IntToStr(FStartVal);
    if Assigned(FOnWaitStop) then
        FOnWaitStop(Self);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.TimerEvent(Sender: TObject);
var
    Count : Integer;
begin
    Count := atoi(FCaption) - 1;

    if Assigned(FOnWait) then
        FOnWait(Self, Count);

    if Count <= 0 then begin
        FTimer.Enabled := FALSE;
        FCaption       := 'Timeout';
        FModalResult   := mrCancel;
        Caption        := IntToStr(FStartVal);
        if Assigned(FOnTimeout) then
            FOnTimeout(Self);
    end
    else begin
        FCaption := IntToStr(count);
    end;
    Invalidate;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.AppMessage(var Msg: TMsg; var Handled: Boolean);
begin
    if (Msg.Message = WM_LBUTTONDOWN)   or
{       (Msg.Message = WM_LBUTTONUP)     or }
       (Msg.Message = WM_RBUTTONDOWN)   or
{       (Msg.Message = WM_RBUTTONUP)     or }
       (Msg.Message = WM_LBUTTONDBLCLK) or
       (Msg.Message = WM_RBUTTONDBLCLK) or
       (Msg.Message = WM_KEYDOWN)       or
{       (Msg.Message = WM_KEYUP)         or }
       (Msg.Message = WM_SYSKEYDOWN)    {or
       (Msg.Message = WM_SYSKEYUP) }
    then begin
        MessageBeep(MB_OK);
        Handled := TRUE;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TCustomWait.GetRunning : Boolean;
begin
    Result := FTimer.Enabled;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.StartModal;
var
    OldOnMessage : TMessageEvent;
begin
    OldOnMessage := Application.OnMessage;
    Application.OnMessage := AppMessage;
    FModalResult := mrNone;
    Start;
    while Running do begin
        if Assigned(FOnWaiting) then
            FOnWaiting(Self);
        Application.ProcessMessages;
    end;
    Application.OnMessage := OldOnMessage;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomWait.Paint;
var
    Len   : Integer;
begin
    Len := (atoi(Caption) * (Width - 7)) div FStartVal;

    Canvas.Pen   := FPen;
    Canvas.Font  := FFont;
    Canvas.Brush := FBrush;
    Canvas.Brush.Color := clWhite;
    Canvas.Rectangle(0, 0, Width - 1, Height - 1);
    Canvas.Brush.Color := clHighlight;
    Canvas.Rectangle(3, 3, 3 + Len, Height - 4);
    Canvas.TextOut(4, Height div 2 - 8, FCaption);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}

end.



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一级二级三级在线免费观看| 久久久国产精品午夜一区ai换脸| 国产成人在线视频免费播放| 日本视频一区二区| 婷婷久久综合九色综合伊人色| 亚洲欧美精品午睡沙发| 亚洲日本va午夜在线电影| 中文字幕在线观看一区二区| 日韩美女视频一区| 亚洲一区在线观看免费| 五月综合激情婷婷六月色窝| 秋霞影院一区二区| 国产一区二区三区不卡在线观看| 国产精品小仙女| 99热在这里有精品免费| 欧美在线一区二区| 欧美久久久久久久久久| 精品剧情v国产在线观看在线| 精品福利一区二区三区免费视频| 26uuuu精品一区二区| 国产精品久久久久婷婷二区次| 国产精品高潮久久久久无| 亚洲人成网站在线| 天涯成人国产亚洲精品一区av| 久久精品国产色蜜蜜麻豆| 国产成人午夜精品5599| 欧美色国产精品| 久久久久久久综合| 亚洲一区二区三区美女| 狠狠色综合播放一区二区| 成人av电影免费观看| 欧美三级日本三级少妇99| 日韩一级片在线观看| 国产精品全国免费观看高清| 亚洲图片一区二区| 国产精品一色哟哟哟| 在线免费观看不卡av| 久久影视一区二区| 亚洲激情综合网| 国产原创一区二区| 欧美日韩一区二区三区四区 | 久久午夜色播影院免费高清| 自拍偷在线精品自拍偷无码专区| 日韩制服丝袜先锋影音| 91尤物视频在线观看| 日韩欧美一区在线观看| 一区二区三区丝袜| 国产又粗又猛又爽又黄91精品| 欧美专区日韩专区| 国产精品美女久久久久av爽李琼| 美日韩黄色大片| 欧美亚洲一区二区在线观看| 国产欧美精品一区| 激情五月激情综合网| 欧美三级电影网| 亚洲精品v日韩精品| 国产成a人亚洲精品| 欧美大片免费久久精品三p| 亚洲小说欧美激情另类| 99久久伊人精品| 国产日本亚洲高清| 国产乱色国产精品免费视频| 日韩一区二区三区视频| 日韩精品久久久久久| 在线观看日韩一区| 成人免费小视频| 成人免费视频一区| 国产精品五月天| 国产麻豆9l精品三级站| 久久综合色播五月| 精品综合免费视频观看| 精品久久一区二区| 国产综合色产在线精品| 精品三级在线观看| 免费成人av资源网| 日韩欧美专区在线| 久久丁香综合五月国产三级网站| 日韩午夜小视频| 蜜臀av性久久久久av蜜臀妖精 | 国产精品一级在线| 日韩免费在线观看| 国产乱人伦精品一区二区在线观看| 日韩视频不卡中文| 狠狠色狠狠色综合系列| 欧美激情一区二区三区四区| 成人福利视频在线| 亚洲视频一区在线| 欧美日韩一区二区电影| 五月天欧美精品| 久久综合一区二区| 99久久精品一区二区| 亚洲已满18点击进入久久| 欧美喷潮久久久xxxxx| 日本欧美一区二区| 久久伊99综合婷婷久久伊| 不卡视频在线观看| 亚洲自拍偷拍图区| 精品久久国产97色综合| 成人动漫精品一区二区| 亚洲国产一区二区在线播放| 日韩一区二区电影网| 成人av网址在线观看| 亚洲一二三专区| 久久综合色鬼综合色| 91免费版pro下载短视频| 亚洲.国产.中文慕字在线| 欧美精品一区二| 在线欧美一区二区| 国产成人在线电影| 午夜精品福利一区二区三区av| 欧美精品一区二区三区很污很色的| 成人av网站在线观看免费| 午夜电影网一区| 国产情人综合久久777777| 欧美精选午夜久久久乱码6080| 国内精品国产成人国产三级粉色| 日韩美女视频一区| 2024国产精品视频| 欧美蜜桃一区二区三区| 成人午夜视频免费看| 男女性色大片免费观看一区二区| 亚洲欧洲美洲综合色网| 亚洲精品一区二区三区影院| 欧美性高清videossexo| 成人黄页在线观看| 精品一二三四在线| 日韩精品一区第一页| 亚洲精品国产a久久久久久| www国产精品av| 日韩欧美国产综合一区| 欧美视频第二页| 日本韩国欧美一区| 成人激情av网| 粉嫩一区二区三区在线看| 久久成人精品无人区| 日韩成人午夜电影| 亚洲精品菠萝久久久久久久| 亚洲欧洲无码一区二区三区| 国产人成亚洲第一网站在线播放| 欧美一二三在线| 91麻豆精品国产91久久久久 | 国产成人av一区| 国产一区在线观看视频| 蜜臀久久久久久久| 天天操天天综合网| 亚洲国产视频在线| 亚洲影院在线观看| 一区二区三区中文字幕| 一区二区三区在线观看动漫| 日韩美女视频一区二区| 亚洲丝袜制服诱惑| 亚洲丝袜美腿综合| 亚洲精品国产a久久久久久| 亚洲欧美日韩国产手机在线| 亚洲视频一二三区| 亚洲色图另类专区| 亚洲综合图片区| 午夜免费久久看| 欧美a级一区二区| 九九九精品视频| 国产大片一区二区| 成人黄色av网站在线| 91精彩视频在线观看| 欧美在线你懂得| 91精品国产免费| 26uuu精品一区二区三区四区在线| 久久综合色播五月| 国产精品毛片高清在线完整版| 综合精品久久久| 午夜亚洲福利老司机| 裸体歌舞表演一区二区| 福利一区二区在线| caoporen国产精品视频| 91搞黄在线观看| 精品国产乱码久久久久久浪潮 | 日本亚洲欧美天堂免费| 黑人巨大精品欧美一区| 99久久精品免费观看| 欧洲生活片亚洲生活在线观看| 欧美高清一级片在线| 久久久久青草大香线综合精品| 中文字幕一区不卡| 日韩高清在线一区| 成人免费av网站| 欧美美女黄视频| 欧美国产在线观看| 亚洲国产日韩精品| 国产精品一区二区久久不卡| 欧洲精品视频在线观看| 日韩精品一区二区三区三区免费| 国产精品热久久久久夜色精品三区| 亚洲国产精品久久人人爱| 国产a精品视频| 欧美日韩精品欧美日韩精品| 国产三级一区二区| 亚洲成人av一区二区三区| 成人午夜激情片| 日韩欧美在线不卡| 亚洲综合一区二区精品导航| 国产激情91久久精品导航|