Changeset 233


Ignore:
Timestamp:
Apr 14, 2011, 12:51:20 PM (14 years ago)
Author:
george
Message:
  • Modified: Unit UStreamHelper no longer define TThreadStreamHelper.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CoolStreaming/CoolStreaming.lpk

    r172 r233  
    66    <Author Value="Chronos"/>
    77    <CompilerOptions>
    8       <Version Value="10"/>
     8      <Version Value="9"/>
    99      <PathDelim Value="\"/>
    1010      <SearchPaths>
     
    4949    </Files>
    5050    <Type Value="RunAndDesignTime"/>
    51     <RequiredPkgs Count="3">
     51    <RequiredPkgs Count="2">
    5252      <Item1>
    53         <PackageName Value="MicroThreading"/>
     53        <PackageName Value="TemplateGenerics"/>
    5454      </Item1>
    5555      <Item2>
    56         <PackageName Value="TemplateGenerics"/>
    57       </Item2>
    58       <Item3>
    5956        <PackageName Value="FCL"/>
    6057        <MinVersion Major="1" Valid="True"/>
    61       </Item3>
     58      </Item2>
    6259    </RequiredPkgs>
    6360    <UsageOptions>
  • CoolStreaming/UStreamHelper.pas

    r172 r233  
    66
    77uses
    8   Classes, DateUtils, syncobjs, UMicroThreading;
     8  Classes, DateUtils, syncobjs;
    99
    1010type
     
    1919    FEndianness: TEndianness;
    2020    SwapData: Boolean;
     21    function GetItem(Index: Integer): Byte;
    2122    procedure SetEndianness(const AValue: TEndianness);
     23    procedure SetItem(Index: Integer; const AValue: Byte);
    2224  public
    2325    procedure WriteByte(Data: Byte);
     
    5052    constructor Create; overload;
    5153    constructor Create(AStream: TStream); overload;
     54    procedure Clear;
    5255    destructor Destroy; override;
    5356    function GetSize: Int64; override;
     
    5861    property Endianness: TEndianness read FEndianness write SetEndianness;
    5962    property Stream: TStream read FStream write FStream;
    60   end;
    61 
    62   { TThreadStreamHelper }
    63 
    64   TThreadStreamHelper = class(TStreamHelper)
    65     Lock: TMicroThreadCriticalSection;
    66     procedure Clear;
    67     constructor Create;
    68     destructor Destroy; override;
     63    property Items[Index: Integer]: Byte read GetItem write SetItem; default;
    6964  end;
    7065
     
    195190end;
    196191
     192procedure TStreamHelper.Clear;
     193begin
     194  Stream.Size := 0;
     195end;
     196
    197197destructor TStreamHelper.Destroy;
    198198begin
     
    273273end;
    274274
     275function TStreamHelper.GetItem(Index: Integer): Byte;
     276begin
     277  Position := Index;
     278  Result := ReadByte;
     279end;
     280
     281procedure TStreamHelper.SetItem(Index: Integer; const AValue: Byte);
     282begin
     283 Position := Index;
     284 WriteByte(AValue);
     285end;
     286
    275287procedure TStreamHelper.WriteAnsiString(Data: string);
    276288var
     
    348360end;
    349361
    350 { TThreadStreamHelper }
    351 
    352 procedure TThreadStreamHelper.Clear;
    353 begin
    354   try
    355     Lock.Acquire;
    356     Size := 0;
    357   finally
    358     Lock.Release;
    359   end;
    360 end;
    361 
    362 constructor TThreadStreamHelper.Create;
    363 begin
    364   inherited Create;
    365   Lock := TMicroThreadCriticalSection.Create;
    366 end;
    367 
    368 destructor TThreadStreamHelper.Destroy;
    369 begin
    370   Lock.Free;
    371   inherited Destroy;
    372 end;
    373362
    374363end.
  • CoolTranslator/ReadMe.txt

    r229 r233  
    3131
    3232* TCollection: TListView.Columns
    33 * TStrings: TRadioGroup.
     33* TStrings: TRadioGroup.Items, TPageControl.Pages, TComboBox.Items, TMemo.Lines
    3434
    3535==Other constants==
  • CoolTranslator/UCoolTranslator.pas

    r229 r233  
    217217              with TCollection(Obj).Items[I] do
    218218                TranslateComponent(TCollection(Obj).Items[I]);
    219           if Obj is TStrings then
     219          (*if Obj is TStrings then
    220220            for I := 0 to TStrings(Obj).Count - 1 do
    221221              with TStrings(Obj) do
    222222                Strings[I] := TranslateText(Strings[I], Strings[I]);
     223          *)
    223224        end;
    224225      end;
     
    327328destructor TCoolTranslator.Destroy;
    328329begin
     330  FPOFile.Free;
    329331  Languages.Free;
     332  ComponentExcludes.Free;
    330333  inherited Destroy;
    331334end;
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r218 r233  
    2828    MouseButton: TMouseButton;
    2929    FDockItems: TObjectList; // TList<TCDManagerRegionsItem>
     30    FUpdating: Boolean;
    3031    procedure TabControlMouseLeave(Sender: TObject);
    3132    procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;
     
    335336  for I := 0 to DockItems.Count - 1 do
    336337  with TCDManagerTabsItem(DockItems[I]) do begin
     338    //Control.Tag := Integer(dhtTemporal);
    337339    //Control.Visible := False;
    338340    //Control.Parent := nil;
     
    369371    end;
    370372    PageControl.Pages[I].TabVisible := Control.Visible or (HideType = dhtTemporal);
     373
    371374    //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width;
    372375    //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Height := DockSite.Height - PageControl.Height;
Note: See TracChangeset for help on using the changeset viewer.