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

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

?? tntwidestrings.pas

?? Delphi知道現(xiàn)在也沒有提供Unicode支持
?? PAS
?? 第 1 頁 / 共 2 頁
字號:

{*****************************************************************************}
{                                                                             }
{    Tnt Delphi Unicode Controls                                              }
{      http://www.tntware.com/delphicontrols/unicode/                         }
{        Version: 2.3.0                                                       }
{                                                                             }
{    Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com)       }
{                                                                             }
{*****************************************************************************}

unit TntWideStrings;

{$INCLUDE TntCompilers.inc}

interface

{$IFDEF COMPILER_10_UP}
  {$MESSAGE FATAL 'Do not refer to TntWideStrings.pas.  It works correctly in Delphi 2006.'}
{$ENDIF}

uses
  Classes;

{******************************************************************************}
{                                                                              }
{  Delphi 2005 introduced TWideStrings in WideStrings.pas.                     }
{    Unfortunately, it was not ready for prime time.                           }
{      Setting CommaText is not consistent, and it relies on CharNextW         }
{         Which is only available on Windows NT+.                              }
{                                                                              }
{******************************************************************************}

type
  TWideStrings = class;

{ IWideStringsAdapter interface }
{ Maintains link between TWideStrings and IWideStrings implementations }

  IWideStringsAdapter = interface
    ['{25FE0E3B-66CB-48AA-B23B-BCFA67E8F5DA}']
    procedure ReferenceStrings(S: TWideStrings);
    procedure ReleaseStrings;
  end;

  TWideStringsEnumerator = class
  private
    FIndex: Integer;
    FStrings: TWideStrings;
  public
    constructor Create(AStrings: TWideStrings);
    function GetCurrent: WideString;
    function MoveNext: Boolean;
    property Current: WideString read GetCurrent;
  end;

{ TWideStrings class }

  TWideStrings = class(TPersistent)
  private
    FDefined: TStringsDefined;
    FDelimiter: WideChar;
    FQuoteChar: WideChar;
    {$IFDEF COMPILER_7_UP}
    FNameValueSeparator: WideChar;
    {$ENDIF}
    FUpdateCount: Integer;
    FAdapter: IWideStringsAdapter;
    function GetCommaText: WideString;
    function GetDelimitedText: WideString;
    function GetName(Index: Integer): WideString;
    function GetValue(const Name: WideString): WideString;
    procedure ReadData(Reader: TReader);
    procedure SetCommaText(const Value: WideString);
    procedure SetDelimitedText(const Value: WideString);
    procedure SetStringsAdapter(const Value: IWideStringsAdapter);
    procedure SetValue(const Name, Value: WideString);
    procedure WriteData(Writer: TWriter);
    function GetDelimiter: WideChar;
    procedure SetDelimiter(const Value: WideChar);
    function GetQuoteChar: WideChar;
    procedure SetQuoteChar(const Value: WideChar);
    function GetNameValueSeparator: WideChar;
    {$IFDEF COMPILER_7_UP}
    procedure SetNameValueSeparator(const Value: WideChar);
    {$ENDIF}
    function GetValueFromIndex(Index: Integer): WideString;
    procedure SetValueFromIndex(Index: Integer; const Value: WideString);
  protected
    procedure AssignTo(Dest: TPersistent); override;
    procedure DefineProperties(Filer: TFiler); override;
    procedure Error(const Msg: WideString; Data: Integer); overload;
    procedure Error(Msg: PResStringRec; Data: Integer); overload;
    function ExtractName(const S: WideString): WideString;
    function Get(Index: Integer): WideString; virtual; abstract;
    function GetCapacity: Integer; virtual;
    function GetCount: Integer; virtual; abstract;
    function GetObject(Index: Integer): TObject; virtual;
    function GetTextStr: WideString; virtual;
    procedure Put(Index: Integer; const S: WideString); virtual;
    procedure PutObject(Index: Integer; AObject: TObject); virtual;
    procedure SetCapacity(NewCapacity: Integer); virtual;
    procedure SetTextStr(const Value: WideString); virtual;
    procedure SetUpdateState(Updating: Boolean); virtual;
    property UpdateCount: Integer read FUpdateCount;
    function CompareStrings(const S1, S2: WideString): Integer; virtual;
  public
    destructor Destroy; override;
    function Add(const S: WideString): Integer; virtual;
    function AddObject(const S: WideString; AObject: TObject): Integer; virtual;
    procedure Append(const S: WideString);
    procedure AddStrings(Strings: TStrings{TNT-ALLOW TStrings}); overload; virtual;
    procedure AddStrings(Strings: TWideStrings); overload; virtual;
    procedure Assign(Source: TPersistent); override;
    procedure BeginUpdate;
    procedure Clear; virtual; abstract;
    procedure Delete(Index: Integer); virtual; abstract;
    procedure EndUpdate;
    function Equals(Strings: TWideStrings): Boolean;
    procedure Exchange(Index1, Index2: Integer); virtual;
    function GetEnumerator: TWideStringsEnumerator;
    function GetTextW: PWideChar; virtual;
    function IndexOf(const S: WideString): Integer; virtual;
    function IndexOfName(const Name: WideString): Integer; virtual;
    function IndexOfObject(AObject: TObject): Integer; virtual;
    procedure Insert(Index: Integer; const S: WideString); virtual; abstract;
    procedure InsertObject(Index: Integer; const S: WideString;
      AObject: TObject); virtual;
    procedure LoadFromFile(const FileName: WideString); virtual;
    procedure LoadFromStream(Stream: TStream); virtual;
    procedure Move(CurIndex, NewIndex: Integer); virtual;
    procedure SaveToFile(const FileName: WideString); virtual;
    procedure SaveToStream(Stream: TStream); virtual;
    procedure SetTextW(const Text: PWideChar); virtual;
    property Capacity: Integer read GetCapacity write SetCapacity;
    property CommaText: WideString read GetCommaText write SetCommaText;
    property Count: Integer read GetCount;
    property Delimiter: WideChar read GetDelimiter write SetDelimiter;
    property DelimitedText: WideString read GetDelimitedText write SetDelimitedText;
    property Names[Index: Integer]: WideString read GetName;
    property Objects[Index: Integer]: TObject read GetObject write PutObject;
    property QuoteChar: WideChar read GetQuoteChar write SetQuoteChar;
    property Values[const Name: WideString]: WideString read GetValue write SetValue;
    property ValueFromIndex[Index: Integer]: WideString read GetValueFromIndex write SetValueFromIndex;
    property NameValueSeparator: WideChar read GetNameValueSeparator {$IFDEF COMPILER_7_UP} write SetNameValueSeparator {$ENDIF};
    property Strings[Index: Integer]: WideString read Get write Put; default;
    property Text: WideString read GetTextStr write SetTextStr;
    property StringsAdapter: IWideStringsAdapter read FAdapter write SetStringsAdapter;
  end;

  PWideStringItem = ^TWideStringItem;
  TWideStringItem = record
    FString: WideString;
    FObject: TObject;
  end;

  PWideStringItemList = ^TWideStringItemList;
  TWideStringItemList = array[0..MaxListSize] of TWideStringItem;

implementation

uses
  Windows, SysUtils, TntSystem, {$IFDEF COMPILER_9_UP} WideStrUtils, {$ELSE} TntWideStrUtils, {$ENDIF}
  TntSysUtils, TntClasses;

{ TWideStringsEnumerator }

constructor TWideStringsEnumerator.Create(AStrings: TWideStrings);
begin
  inherited Create;
  FIndex := -1;
  FStrings := AStrings;
end;

function TWideStringsEnumerator.GetCurrent: WideString;
begin
  Result := FStrings[FIndex];
end;

function TWideStringsEnumerator.MoveNext: Boolean;
begin
  Result := FIndex < FStrings.Count - 1;
  if Result then
    Inc(FIndex);
end;

{ TWideStrings }

destructor TWideStrings.Destroy;
begin
  StringsAdapter := nil;
  inherited;
end;

function TWideStrings.Add(const S: WideString): Integer;
begin
  Result := GetCount;
  Insert(Result, S);
end;

function TWideStrings.AddObject(const S: WideString; AObject: TObject): Integer;
begin
  Result := Add(S);
  PutObject(Result, AObject);
end;

procedure TWideStrings.Append(const S: WideString);
begin
  Add(S);
end;

procedure TWideStrings.AddStrings(Strings: TStrings{TNT-ALLOW TStrings});
var
  I: Integer;
begin
  BeginUpdate;
  try
    for I := 0 to Strings.Count - 1 do
      AddObject(Strings[I], Strings.Objects[I]);
  finally
    EndUpdate;
  end;
end;

procedure TWideStrings.AddStrings(Strings: TWideStrings);
var
  I: Integer;
begin
  BeginUpdate;
  try
    for I := 0 to Strings.Count - 1 do
      AddObject(Strings[I], Strings.Objects[I]);
  finally
    EndUpdate;
  end;
end;

procedure TWideStrings.Assign(Source: TPersistent);
begin
  if Source is TWideStrings then
  begin
    BeginUpdate;
    try
      Clear;
      FDefined := TWideStrings(Source).FDefined;
      {$IFDEF COMPILER_7_UP}
      FNameValueSeparator := TWideStrings(Source).FNameValueSeparator;
      {$ENDIF}
      FQuoteChar := TWideStrings(Source).FQuoteChar;
      FDelimiter := TWideStrings(Source).FDelimiter;
      AddStrings(TWideStrings(Source));
    finally
      EndUpdate;
    end;
  end
  else if Source is TStrings{TNT-ALLOW TStrings} then
  begin
    BeginUpdate;
    try
      Clear;
      {$IFDEF COMPILER_7_UP}
      FNameValueSeparator := WideChar(TStrings{TNT-ALLOW TStrings}(Source).NameValueSeparator);
      {$ENDIF}
      FQuoteChar := WideChar(TStrings{TNT-ALLOW TStrings}(Source).QuoteChar);
      FDelimiter := WideChar(TStrings{TNT-ALLOW TStrings}(Source).Delimiter);
      AddStrings(TStrings{TNT-ALLOW TStrings}(Source));
    finally
      EndUpdate;
    end;
  end
  else
    inherited Assign(Source);
end;

procedure TWideStrings.AssignTo(Dest: TPersistent);
var
  I: Integer;
begin
  if Dest is TWideStrings then Dest.Assign(Self)
  else if Dest is TStrings{TNT-ALLOW TStrings} then
  begin
    TStrings{TNT-ALLOW TStrings}(Dest).BeginUpdate;
    try
      TStrings{TNT-ALLOW TStrings}(Dest).Clear;
      {$IFDEF COMPILER_7_UP}
      TStrings{TNT-ALLOW TStrings}(Dest).NameValueSeparator := AnsiChar(NameValueSeparator);
      {$ENDIF}
      TStrings{TNT-ALLOW TStrings}(Dest).QuoteChar := AnsiChar(QuoteChar);
      TStrings{TNT-ALLOW TStrings}(Dest).Delimiter := AnsiChar(Delimiter);
      for I := 0 to Count - 1 do
        TStrings{TNT-ALLOW TStrings}(Dest).AddObject(Strings[I], Objects[I]);
    finally
      TStrings{TNT-ALLOW TStrings}(Dest).EndUpdate;
    end;
  end
  else
    inherited AssignTo(Dest);
end;

procedure TWideStrings.BeginUpdate;
begin
  if FUpdateCount = 0 then SetUpdateState(True);
  Inc(FUpdateCount);
end;

procedure TWideStrings.DefineProperties(Filer: TFiler);

  function DoWrite: Boolean;
  begin
    if Filer.Ancestor <> nil then
    begin
      Result := True;
      if Filer.Ancestor is TWideStrings then
        Result := not Equals(TWideStrings(Filer.Ancestor))
    end
    else Result := Count > 0;
  end;

begin
  Filer.DefineProperty('Strings', ReadData, WriteData, DoWrite);
end;

procedure TWideStrings.EndUpdate;
begin
  Dec(FUpdateCount);
  if FUpdateCount = 0 then SetUpdateState(False);
end;

function TWideStrings.Equals(Strings: TWideStrings): Boolean;
var
  I, Count: Integer;
begin
  Result := False;
  Count := GetCount;
  if Count <> Strings.GetCount then Exit;
  for I := 0 to Count - 1 do if Get(I) <> Strings.Get(I) then Exit;
  Result := True;
end;

procedure TWideStrings.Error(const Msg: WideString; Data: Integer);

  function ReturnAddr: Pointer;
  asm
          MOV     EAX,[EBP+4]
  end;

begin
  raise EStringListError.CreateFmt(Msg, [Data]) at ReturnAddr;
end;

procedure TWideStrings.Error(Msg: PResStringRec; Data: Integer);
begin
  Error(WideLoadResString(Msg), Data);
end;

procedure TWideStrings.Exchange(Index1, Index2: Integer);
var
  TempObject: TObject;
  TempString: WideString;
begin
  BeginUpdate;
  try
    TempString := Strings[Index1];
    TempObject := Objects[Index1];
    Strings[Index1] := Strings[Index2];
    Objects[Index1] := Objects[Index2];
    Strings[Index2] := TempString;
    Objects[Index2] := TempObject;
  finally
    EndUpdate;
  end;
end;

function TWideStrings.ExtractName(const S: WideString): WideString;
var
  P: Integer;
begin
  Result := S;
  P := Pos(NameValueSeparator, Result);
  if P <> 0 then
    SetLength(Result, P-1) else
    SetLength(Result, 0);
end;

function TWideStrings.GetCapacity: Integer;
begin  // descendents may optionally override/replace this default implementation
  Result := Count;
end;

function TWideStrings.GetCommaText: WideString;
var
  LOldDefined: TStringsDefined;
  LOldDelimiter: WideChar;
  LOldQuoteChar: WideChar;
begin
  LOldDefined := FDefined;
  LOldDelimiter := FDelimiter;
  LOldQuoteChar := FQuoteChar;
  Delimiter := ',';
  QuoteChar := '"';
  try
    Result := GetDelimitedText;
  finally
    FDelimiter := LOldDelimiter;
    FQuoteChar := LOldQuoteChar;
    FDefined := LOldDefined;
  end;
end;

function TWideStrings.GetDelimitedText: WideString;
var
  S: WideString;
  P: PWideChar;
  I, Count: Integer;
begin
  Count := GetCount;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美另类变人与禽xxxxx| 成人av电影观看| 日韩丝袜美女视频| 精品一区二区三区日韩| 欧美大片在线观看| 国产精品66部| 亚洲丝袜另类动漫二区| 欧美在线观看视频在线| 午夜电影一区二区| 精品日韩av一区二区| 国产精品白丝av| 亚洲色图丝袜美腿| 67194成人在线观看| 国产一区亚洲一区| 日韩理论片在线| 欧美日韩日日夜夜| 精品无码三级在线观看视频| 中文字幕免费在线观看视频一区| 色婷婷综合中文久久一本| 亚洲6080在线| 亚洲国产精华液网站w| 欧美三级中文字| 极品美女销魂一区二区三区| 日韩毛片一二三区| 欧美一二三区精品| 99国产精品视频免费观看| 亚洲福利电影网| 欧美激情一区二区三区不卡 | 欧美日韩视频第一区| 激情五月激情综合网| 亚洲色图一区二区| 久久人人爽人人爽| 欧美日韩高清在线| 丁香网亚洲国际| 日韩专区一卡二卡| 亚洲欧美欧美一区二区三区| 精品福利一区二区三区| 色婷婷综合在线| 国产成人精品一区二区三区四区| 亚洲福利一二三区| 日韩一区日韩二区| 久久综合久久综合久久综合| 欧美日韩一区久久| www.欧美精品一二区| 国产一区欧美一区| 五月天视频一区| 一区二区三区视频在线看| 国产午夜精品一区二区三区嫩草 | 国产婷婷一区二区| 欧美一级高清大全免费观看| 在线视频你懂得一区二区三区| 国产老女人精品毛片久久| 丝袜美腿亚洲综合| 亚洲精品视频自拍| 中文字幕不卡在线| 国产夜色精品一区二区av| 欧美一区永久视频免费观看| 91成人国产精品| 99国产麻豆精品| 成人高清伦理免费影院在线观看| 韩国精品在线观看| 麻豆高清免费国产一区| 日韩电影网1区2区| 日韩电影免费在线看| 午夜av电影一区| 午夜一区二区三区视频| 亚洲激情校园春色| 亚洲激情校园春色| 一区二区三区 在线观看视频| 国产精品成人网| 国产精品视频免费| 国产精品女人毛片| 国产精品国产自产拍在线| 欧美高清在线精品一区| 欧美国产精品一区二区三区| 久久久久久久精| 久久久精品一品道一区| 久久久亚洲国产美女国产盗摄| 久久亚洲精品国产精品紫薇| 久久久久国产精品麻豆| 亚洲国产高清不卡| 综合自拍亚洲综合图不卡区| 亚洲美女视频在线| 亚洲综合成人在线| 同产精品九九九| 久久国产视频网| 国产精品一区二区免费不卡| 成人中文字幕在线| 99九九99九九九视频精品| 91色在线porny| 在线观看成人小视频| 欧美美女bb生活片| 日韩欧美国产系列| 国产日产欧美一区二区三区| 成人免费在线视频| 亚洲国产精品麻豆| 麻豆久久久久久久| 粉嫩绯色av一区二区在线观看| 99久久99久久久精品齐齐| 精品视频1区2区| 精品蜜桃在线看| ...av二区三区久久精品| 亚洲一区二区影院| 精一区二区三区| 成人av网在线| 欧美日韩国产一级| 久久在线免费观看| 亚洲宅男天堂在线观看无病毒| 青青青伊人色综合久久| 成人在线视频一区二区| 91福利社在线观看| 精品国产制服丝袜高跟| 中文字幕一区日韩精品欧美| 天堂蜜桃一区二区三区| 成人综合婷婷国产精品久久蜜臀| 欧美日韩国产一级| 国产精品色呦呦| 日本不卡一区二区三区| 不卡在线观看av| 91精品蜜臀在线一区尤物| 日本一区二区成人| 日韩综合小视频| 色女孩综合影院| 久久一区二区视频| 亚洲五码中文字幕| 国产成人av在线影院| 欧美精品自拍偷拍| 亚洲欧洲在线观看av| 麻豆精品精品国产自在97香蕉| 91天堂素人约啪| 久久久久久99精品| 亚洲成人av电影在线| 不卡的av在线| 久久综合九色综合97婷婷| 日韩激情在线观看| 色综合久久天天| 欧美高清在线视频| 国产呦萝稀缺另类资源| 制服.丝袜.亚洲.另类.中文| 亚洲免费观看在线观看| 丁香六月久久综合狠狠色| 亚洲精品一区在线观看| 视频一区中文字幕国产| 在线这里只有精品| 国产精品动漫网站| 国产精品一品视频| 精品毛片乱码1区2区3区| 丝袜美腿亚洲一区二区图片| 欧美影院精品一区| 亚洲色欲色欲www在线观看| 成人高清视频在线| 亚洲国产高清在线观看视频| 国产成人一区在线| 久久天天做天天爱综合色| 麻豆精品一区二区综合av| 欧美一级精品在线| 免播放器亚洲一区| 日韩久久精品一区| 日韩一区精品字幕| 欧美精品视频www在线观看 | 全部av―极品视觉盛宴亚洲| 欧美日韩中文另类| 亚洲国产成人av好男人在线观看| 在线精品视频一区二区三四| 中文字幕在线一区免费| 成人福利视频在线看| 国产精品无码永久免费888| 国产大陆精品国产| 欧美激情在线免费观看| 国产成人aaa| 中文字幕在线免费不卡| 91麻豆蜜桃一区二区三区| 综合久久国产九一剧情麻豆| 色综合久久久久综合| 亚洲精品菠萝久久久久久久| 欧美自拍丝袜亚洲| 天天综合色天天| 日韩一卡二卡三卡四卡| 精东粉嫩av免费一区二区三区| 精品欧美一区二区久久| 国产一区二区三区| 成人免费毛片aaaaa**| 国产精品二三区| 欧美色涩在线第一页| 首页国产丝袜综合| 26uuu精品一区二区在线观看| 99国产精品久久久| 这里只有精品99re| 国产在线国偷精品产拍免费yy| 国产日本一区二区| 欧美写真视频网站| 精品在线播放午夜| 国产精品乱码久久久久久| 色88888久久久久久影院野外| 婷婷开心久久网| 久久久亚洲精品石原莉奈| 色综合天天性综合| 日韩成人av影视| 中文av字幕一区| 欧美日本一区二区在线观看|