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

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

?? wait.pas

?? Delphi 網絡通信協議代碼,是多種網絡協議的實現代碼
?? 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
EMail:        francois.piette@pophost.eunet.be    
              francois.piette@rtfm.be             http://www.rtfm.be/fpiette
Creation:     April, 1996
Version:      2.13
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1996, 1997, 1998 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一区二区三区免费野_久草精品视频
精品一区二区三区在线观看| 日韩激情av在线| 精品国一区二区三区| 日韩一区二区精品葵司在线| 91精品免费观看| 日韩天堂在线观看| 久久麻豆一区二区| 亚洲国产精品精华液2区45| 国产精品久线在线观看| 亚洲日本在线观看| 亚洲香肠在线观看| 日本欧美一区二区在线观看| 久久国产尿小便嘘嘘尿| 国模冰冰炮一区二区| 99这里只有久久精品视频| 一本一道综合狠狠老| 777午夜精品视频在线播放| 日韩欧美一级在线播放| 久久久久久9999| 亚洲蜜臀av乱码久久精品| 亚洲a一区二区| 激情图片小说一区| 99re热视频精品| 欧美日韩国产首页在线观看| 日韩欧美国产午夜精品| 国产精品女上位| 亚洲成人激情av| 国产一区二区网址| 色噜噜久久综合| 精品88久久久久88久久久| 亚洲男人的天堂在线aⅴ视频| 亚洲成av人综合在线观看| 国产一区二区在线观看免费| 在线亚洲一区二区| 久久蜜桃一区二区| 亚洲国产精品一区二区www| 精东粉嫩av免费一区二区三区| 99精品视频中文字幕| 欧美一区二区久久| 亚洲码国产岛国毛片在线| 青青草国产精品97视觉盛宴| av中文字幕亚洲| 欧美一级二级三级乱码| 亚洲视频在线一区二区| 精品无人区卡一卡二卡三乱码免费卡 | 亚洲精品一区二区三区香蕉| 综合久久一区二区三区| 久久国产精品99久久人人澡| 在线视频国内一区二区| 国产欧美一区二区在线| 麻豆精品在线观看| 欧美性大战久久久久久久| 欧美高清在线视频| 国产精品影音先锋| 91精品一区二区三区在线观看| 日韩毛片精品高清免费| 国产最新精品精品你懂的| 在线电影欧美成精品| 亚洲国产视频在线| 日本高清免费不卡视频| 亚洲视频一区在线观看| 成人国产亚洲欧美成人综合网| 精品国产91洋老外米糕| 免费成人结看片| 日韩午夜在线观看视频| 亚洲高清免费视频| 欧美日韩精品二区第二页| 亚洲福利一区二区| 欧美日韩小视频| 午夜av一区二区三区| 欧美日韩一区三区| 首页综合国产亚洲丝袜| 欧美日韩电影在线播放| 五月激情丁香一区二区三区| 欧美日韩第一区日日骚| 午夜精品久久久久久不卡8050| 欧美午夜精品一区二区三区| 亚洲影院久久精品| 欧美日韩精品综合在线| 午夜国产精品一区| 日韩亚洲电影在线| 国产99久久精品| 国产精品国产三级国产aⅴ中文| 国产suv精品一区二区883| 国产精品福利一区| 色综合久久综合网| 亚洲二区视频在线| 精品捆绑美女sm三区| 国产成人aaaa| 一区二区三区四区精品在线视频| 欧美亚洲图片小说| 蜜桃久久久久久久| 久久亚洲影视婷婷| 99久久精品国产网站| 视频在线在亚洲| 久久综合999| 91猫先生在线| 日韩电影免费在线看| 久久久久青草大香线综合精品| 成人久久视频在线观看| 亚洲乱码国产乱码精品精的特点| 欧美在线制服丝袜| 久久99深爱久久99精品| 亚洲天堂精品视频| 日韩女优av电影在线观看| 成人深夜视频在线观看| 亚洲成a人v欧美综合天堂下载 | 美女视频黄免费的久久| 久久久久久一级片| 欧美日韩精品高清| 成人激情免费电影网址| 亚洲成av人片一区二区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 偷拍亚洲欧洲综合| 国产欧美精品一区二区三区四区| 欧日韩精品视频| 国产成人精品影视| 午夜不卡av在线| 亚洲女同一区二区| 国产欧美一二三区| 日韩欧美电影一二三| 色悠久久久久综合欧美99| 国产一区二区三区在线观看免费视频 | 91麻豆精品久久久久蜜臀| 成人av在线观| 国内精品伊人久久久久av一坑| 一区二区三区在线观看网站| 久久久激情视频| 欧美一区二区观看视频| 91九色最新地址| 成人av网站在线| 国内偷窥港台综合视频在线播放| 亚洲在线免费播放| 亚洲日本在线a| 国产精品午夜春色av| 久久久国产午夜精品| 在线播放欧美女士性生活| 欧美午夜电影一区| 99久久精品情趣| 成人午夜免费视频| 国产成人av电影免费在线观看| 久久99国产精品久久| 天堂午夜影视日韩欧美一区二区| 亚洲精品中文字幕在线观看| 国产精品美女一区二区在线观看| 久久久久久久久久久久久女国产乱| 9191成人精品久久| 7777精品久久久大香线蕉| 欧美最猛性xxxxx直播| 日本道免费精品一区二区三区| av在线不卡免费看| 色悠悠亚洲一区二区| 色偷偷成人一区二区三区91| 99精品桃花视频在线观看| 97成人超碰视| 91久久香蕉国产日韩欧美9色| 91香蕉视频污| 欧美日韩精品一区二区| 在线不卡中文字幕| 精品国产一区二区精华| 国产日韩欧美麻豆| 国产精品污网站| 亚洲女人小视频在线观看| 亚洲一区二三区| 男人的天堂久久精品| 国产一区二区不卡在线| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日韩欧美一区二区久久婷婷| 精品国产乱码久久| 欧美国产精品v| 亚洲影院在线观看| 久久精品国产一区二区| 国产传媒日韩欧美成人| 91浏览器在线视频| 欧美久久久久久蜜桃| 精品嫩草影院久久| 亚洲欧洲精品一区二区三区不卡| 亚洲精品国产a久久久久久 | 欧美狂野另类xxxxoooo| 欧美tk—视频vk| 亚洲欧洲成人精品av97| 蜜臀久久99精品久久久久久9| 国产一区二区三区蝌蚪| 99久久国产综合精品色伊 | 国产精品女主播av| 婷婷中文字幕综合| 粉嫩av一区二区三区| 91福利视频网站| 国产欧美一区二区精品久导航| 一区二区三区高清在线| 国内精品伊人久久久久影院对白| 色综合天天综合狠狠| 精品久久久久一区二区国产| 亚洲另类在线制服丝袜| 国产综合一区二区| 欧美理论在线播放| 国产精品亲子乱子伦xxxx裸| 美国毛片一区二区| 欧美婷婷六月丁香综合色| 欧美经典一区二区|