Changeset 105 for oup/rewrite/Main.pas


Ignore:
Timestamp:
Feb 21, 2007, 1:29:27 AM (18 years ago)
Author:
alloc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oup/rewrite/Main.pas

    r97 r105  
    1111  Settings, {Helper_LevelDB, }
    1212  Template,
    13   Preview;
    14 //  BinEdit, Extractor, RawEdit, TxmpReplace;
     13  RawEdit, BinEdit, Extractor, Preview, TxmpReplace;
    1514
    1615type
     
    162161  begin
    163162    UpdateStatBar;
     163    UpdateConLists;
    164164  end;
    165165end;
     
    497497procedure TForm_Main.LoadFile(typedb: Boolean);
    498498var
    499   ext: String;
     499  i: Integer;
    500500begin
    501501  opend.InitialDir := AppSettings.DatPath;
     
    507507  if opend.Execute then
    508508  begin
    509     ext := ExtractFileExt(opend.FileName);
    510     if ext = '.dat' then
    511     begin
    512       CreateConnection(opend.FileName);
    513     end else if ext = '.oldb' then
    514     begin
    515       CreateConnection(opend.FileName);
    516     end else
    517       ShowMessage('Incompatible file');
     509    if opend.Files.Count > 0 then
     510      for i := 0 to opend.Files.Count - 1 do
     511        CreateConnection(opend.Files.Strings[i]);
    518512    AppSettings.DatPath := ExtractFilepath(opend.FileName);
    519513  end;
     
    693687    CheckConnectionCloseable(index);
    694688    ConManager.CloseConnectionByIndex(index, RepMsg);
     689    ShowOpenMsg(RepMsg);
     690    UpdateConLists;
    695691  end;
    696692  UpdateStatBar;
     
    751747  if window_context = 'binedit' then
    752748  begin
    753 //    toolform         := TForm_BinEdit.Create(Self);
     749    toolform         := TForm_BinEdit.Create(Self);
    754750    toolform.Caption := 'Binary .dat-Editor ' + caption_end;
    755751    iconindex        := 5;
     
    757753  if window_context = 'extractor' then
    758754  begin
    759 //    toolform         := TForm_Extractor.Create(Self);
     755    toolform         := TForm_Extractor.Create(Self);
    760756    toolform.Caption := 'Extractor ' + caption_end;
    761757    iconindex        := 8;
     
    769765  if window_context = 'rawedit' then
    770766  begin
    771 //    toolform         := TForm_RawEdit.Create(Self);
     767    toolform         := TForm_RawEdit.Create(Self);
    772768    toolform.Caption := 'Binary .raw-Editor ' + caption_end;
    773769    iconindex        := 6;
     
    775771  if window_context = 'txmpreplace' then
    776772  begin
    777 //    toolform         := TForm_TxmpReplace.Create(Application);
     773    toolform         := TForm_TxmpReplace.Create(Self);
    778774    toolform.Caption := 'TXMP Replacer ' + caption_end;
    779775    iconindex        := 7;
Note: See TracChangeset for help on using the changeset viewer.