define.pas

来自「ThreadPro 是本人开发的一套用于多线程编程的 Delphi 基础类库」· PAS 代码 · 共 75 行

PAS
75
字号
unit Define;

interface

const
  BtnTypeCount             =       3;
  BtnTypeCountEx           =       4;
  BtnStatCount             =       2;
  BtnStatCountEx           =       3;
                                           //start,goon,stop
  ABtnEnab : array[0..BtnStatCount-1,0..BtnTypeCount-1] of Boolean = (
                                            (True ,True ,False),     //null
                                            (False,False,True )     //running
                                           );

  ABtnEnabEx : array[0..BtnStatCountEx-1,0..BtnTypeCountEx-1] of Boolean = (
                                            (True ,False,False,False),     //null
                                            (False,True ,False,True ),    //running
                                            (False,False,True ,True )      //paused
                                           );

  WEB_ENGINE_COUNT       =       6;

  WebEngineName : array[0..WEB_ENGINE_COUNT - 1] of string = (
                  'google中文',
                  '百度',
                  '雅虎中文',
                  '新浪爱问',
                  '搜狗搜索',
                  '中搜'
                  );

  APP_TITLE                =       'ThreadPro v2.0 Demo';
  CFG_FILE                 =       'config.ini';

var
  AppPath : string;

  ColToSort : Integer;
  bUp : Boolean;


type
  TBtnStat = (bsNull, bsRunning);
  TBtnType = (btStart, btGoon, btStop) ;

  TBtnStatEx = (bsxNull, bsxRunning, bsxPaused);     // for websearch
  TBtnTypeEx = (btxStart, btxPause, btxGoon, btxStop) ;   // for websearch

  //            //谷歌     百度     雅虎     新浪     搜狐    中搜        微软
  TWebEngine  = (weGoogle, weBaidu, weYahoo, weSina, weSogou, weZhongSou{, weMsn}) ;

  //线程任务参数定义
  {used in demo1}
  PDemoParam = ^TDemoParam;
  TDemoParam = record
    Relay : Integer;
  end;
  {used in demo2}
  PCheckProxyParam = ^TCheckProxyParam;
  TCheckProxyParam = record
    IP : array[0..14] of Char;
    Port : Integer;
  end;
  {used in demo3}
  PWebEngineObj = ^TWebEngineObj;
  TWebEngineObj = record
    Site : TWebEngine;
  end;

implementation


end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?