Changeset 248 for oup/current/Tools


Ignore:
Timestamp:
Nov 26, 2007, 12:02:28 PM (17 years ago)
Author:
alloc
Message:
 
Location:
oup/current/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Tools/BinEdit.dfm

    r245 r248  
    107107        Colors.EvenColumn = clNavy
    108108        Colors.CurrentOffsetBackground = clBtnShadow
    109         Colors.OffsetBackGround = clBtnFace
     109        Colors.OffsetBackground = clBtnFace
    110110        Colors.CurrentOffset = clBtnHighlight
    111111        Colors.Grid = clBtnFace
     
    116116        AllowInsertMode = False
    117117        DrawGridLines = False
    118         Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
     118        Version = 'september 30, 2007; '#169' markus stephany, vcl[at]mirkes[dot]de'
    119119        OnChange = hexChange
    120120        ShowPositionIfNotFocused = True
  • oup/current/Tools/BinEdit.pas

    r231 r248  
    141141//      Self.SelectFileID(ConnectionID, fileid);
    142142    Self.ClearStructViewer;
     143    ClearValues;
    143144    mem := nil;
    144     ConManager.Connection[ConID].LoadDatFile(fileid, TStream(mem));
    145     rawlist := ConManager.Connection[ConID].GetRawList(fileid);
    146     hex.LoadFromStream(mem);
    147     mem.Free;
    148     ClearValues;
    149     WriteStructureInfos;
     145    hex.DataSize := 0;
     146    if fileinfo.Size > 0 then
     147    begin
     148      ConManager.Connection[ConID].LoadDatFile(fileid, TStream(mem));
     149      rawlist := ConManager.Connection[ConID].GetRawList(fileid);
     150      hex.LoadFromStream(mem);
     151      mem.Free;
     152      WriteStructureInfos;
     153    end;
    150154  end
    151155  else
  • oup/current/Tools/MetaEditor.dfm

    r244 r248  
    8282        Caption = 'Meta Edit'
    8383        ImageIndex = 1
     84        ExplicitLeft = 0
     85        ExplicitTop = 0
     86        ExplicitWidth = 0
     87        ExplicitHeight = 0
    8488      end
    8589      object tab_hex: TTabSheet
    8690        Caption = 'Binary Edit'
     91        ExplicitLeft = 0
     92        ExplicitTop = 0
     93        ExplicitWidth = 0
     94        ExplicitHeight = 0
    8795        object splitter_hex_1: TSplitter
    8896          Left = 0
     
    162170          Colors.EvenColumn = clNavy
    163171          Colors.CurrentOffsetBackground = clBtnShadow
    164           Colors.OffsetBackGround = clBtnFace
     172          Colors.OffsetBackground = clBtnFace
    165173          Colors.CurrentOffset = clBtnHighlight
    166174          Colors.Grid = clBtnFace
     
    171179          AllowInsertMode = False
    172180          DrawGridLines = False
    173           Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
     181          Version = 'september 30, 2007; '#169' markus stephany, vcl[at]mirkes[dot]de'
    174182          ShowPositionIfNotFocused = True
    175183        end
  • oup/current/Tools/MetaEditor.pas

    r244 r248  
    149149var
    150150  data: PNodeData;
    151   ffile: TFile;
     151  ffile: TResource;
    152152//*******************************************************************
    153153  fs: TFileStream;
     
    156156  data := Sender.GetNodeData(Node);
    157157  ffile := nil;
    158   if data.Field is TFile then
    159     ffile := TFile(data.Field);
     158  if data.Field is TResource then
     159    ffile := TResource(data.Field);
    160160  if data.Field is _MetaTypes.TDatLink then
    161161    if Assigned(_MetaTypes.TDatLink(data.Field).TargetFile) then
    162       ffile := TFile(_MetaTypes.TDatLink(data.Field).TargetFile);
     162      ffile := TResource(_MetaTypes.TDatLink(data.Field).TargetFile);
    163163  if Assigned(ffile) then
    164164  begin
     
    186186begin
    187187  data := Sender.GetNodeData(NewNode);
    188   if data.Field is TFile then
    189   begin
    190     if Assigned(TFile(data.Field).Editor) then
    191       Allowed := not TFile(data.Field).Opened
     188  if data.Field is TResource then
     189  begin
     190    if Assigned(TResource(data.Field).Editor) then
     191      Allowed := not TResource(data.Field).Opened
    192192    else
    193193      Allowed := True;
     
    196196  begin
    197197    data := Sender.GetNodeData(OldNode);
    198     if data.Field is TFile then
    199     begin
    200       if TFile(data.Field).Opened then
     198    if data.Field is TResource then
     199    begin
     200      if TResource(data.Field).Opened then
    201201      begin
    202202        if tab_meta.ControlCount > 0 then
    203203          for i := 0 to tab_meta.ControlCount - 1 do
    204204            tab_meta.RemoveControl(tab_meta.Controls[i]);
    205         TFile(data.Field).Opened := False;
     205        TResource(data.Field).Opened := False;
    206206      end;
    207207    end;
     
    244244      0:
    245245        begin
    246           if Data.Field is TFile then
     246          if Data.Field is TResource then
    247247          begin
    248             if Length(TFile(Data.Field).FileInfo.Name) = 0 then
     248            if Length(TResource(Data.Field).FileInfo.Name) = 0 then
    249249              TargetCanvas.Font.Color := $C06060;
    250             if TFile(Data.Field).FileInfo.Size = 0 then
     250            if TResource(Data.Field).FileInfo.Size = 0 then
    251251              TargetCanvas.Font.Color := $2020A0;
    252252          end;
     
    267267  i: Integer;
    268268  links: TStrings;
    269   ifile: TFile;
     269  ifile: TResource;
    270270begin
    271271  inherited;
     
    283283        end;
    284284      end;
    285       if data.Field is TFile then
     285      if data.Field is TResource then
    286286      begin
    287         ifile := TFile(data.Field);
     287        ifile := TResource(data.Field);
    288288        case Column of
    289289          0: HintText :=
  • oup/current/Tools/_TemplateFileList.dfm

    r241 r248  
    3838        object tab_files: TTabSheet
    3939          Caption = 'Filelist'
     40          ExplicitLeft = 0
     41          ExplicitTop = 0
     42          ExplicitWidth = 0
     43          ExplicitHeight = 0
    4044          object panel_extension: TPanel
    4145            Left = 0
     
    220224              Font.Name = 'Courier'
    221225              Font.Style = []
    222               ItemHeight = 13
     226              ItemHeight = 0
    223227              ParentFont = False
    224228              Sorted = True
     
    270274          Caption = 'Tree'
    271275          ImageIndex = 1
     276          ExplicitLeft = 0
     277          ExplicitTop = 0
     278          ExplicitWidth = 0
     279          ExplicitHeight = 0
    272280          object filelist_meta: TVirtualStringTree
    273281            Left = 0
  • oup/current/Tools/_TemplateFileList.pas

    r233 r248  
    420420  inherited;
    421421  data := Sender.GetNodeData(Node);
    422   if data.Field is TFile then
     422  if data.Field is TResource then
    423423  begin
    424424    if Assigned(FOnNewFileSelected) then
    425425    begin
    426       FOnNewFileSelected(TFile(data.Field).FileInfo);
     426      FOnNewFileSelected(TResource(data.Field).FileInfo);
    427427    end;
    428428  end;
     
    437437  inherited;
    438438  data := Sender.GetNodeData(NewNode);
    439   if data.Field is TFile then
     439  if data.Field is TResource then
    440440  begin
    441441    if Assigned(FOnNewFileSelecting) then
    442442    begin
    443       FOnNewFileSelecting(TFile(data.Field).FileInfo, Allowed);
     443      FOnNewFileSelecting(TResource(data.Field).FileInfo, Allowed);
    444444    end;
    445445  end;
     
    519519begin
    520520  Data     := Sender.GetNodeData(Node);
    521   if Data.Field is TFile then
    522   begin
    523     if Length(TFile(Data.Field).FileInfo.Name) = 0 then
     521  if Data.Field is TResource then
     522  begin
     523    if Length(TResource(Data.Field).FileInfo.Name) = 0 then
    524524      TargetCanvas.Font.Color := $C06060;
    525     if TFile(Data.Field).FileInfo.Size = 0 then
     525    if TResource(Data.Field).FileInfo.Size = 0 then
    526526      TargetCanvas.Font.Color := $2020A0;
    527527  end;
Note: See TracChangeset for help on using the changeset viewer.