ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/Main.pas
(Generate patch)

Comparing:
oup/rewrite/Main.pas (file contents), Revision 97 by alloc, Mon Jan 22 23:05:45 2007 UTC vs.
oup/current/Main.pas (file contents), Revision 112 by alloc, Thu Feb 22 00:37:39 2007 UTC

# Line 10 | Line 10 | uses
10    Functions,
11    Settings, {Helper_LevelDB, }
12    Template,
13 <  Preview;
14 < //  BinEdit, Extractor, RawEdit, TxmpReplace;
13 >  RawEdit, BinEdit, Extractor, Preview, TxmpReplace;
14  
15   type
16    TForm_Main = class(TForm)
# Line 161 | Line 160 | begin
160    if RepMsg = SM_OK then
161    begin
162      UpdateStatBar;
163 +    UpdateConLists;
164    end;
165   end;
166  
# Line 254 | Line 254 | begin
254    begin
255      AppSettings.DatPath        := ExtractFilepath(Application.EXEname);
256      AppSettings.ExtractPath    := ExtractFilepath(Application.EXEname) + '\extract';
257    AppSettings.FilenumbersAsHex := False;
257      AppSettings.CharSet        := DEFAULT_CHARSET;
258      AppSettings.HideUnusedData := False;
259    end;
# Line 496 | Line 495 | end;
495  
496   procedure TForm_Main.LoadFile(typedb: Boolean);
497   var
498 <  ext: String;
498 >  i: Integer;
499   begin
500    opend.InitialDir := AppSettings.DatPath;
501    opend.Filter     := 'Compatible level files|*.dat;*.oldb|Oni level (*.dat)|*.dat|OUP level database (*.oldb)|*.oldb|Any (*.*)|*';
# Line 506 | Line 505 | begin
505      opend.FilterIndex := 2;
506    if opend.Execute then
507    begin
508 <    ext := ExtractFileExt(opend.FileName);
509 <    if ext = '.dat' then
510 <    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');
508 >    if opend.Files.Count > 0 then
509 >      for i := 0 to opend.Files.Count - 1 do
510 >        CreateConnection(opend.Files.Strings[i]);
511      AppSettings.DatPath := ExtractFilepath(opend.FileName);
512    end;
513    UpdateStatBar;
# Line 692 | Line 685 | begin
685    begin
686      CheckConnectionCloseable(index);
687      ConManager.CloseConnectionByIndex(index, RepMsg);
688 +    ShowOpenMsg(RepMsg);
689 +    UpdateConLists;
690    end;
691    UpdateStatBar;
692   end;
# Line 750 | Line 745 | begin
745  
746    if window_context = 'binedit' then
747    begin
748 < //    toolform         := TForm_BinEdit.Create(Self);
748 >    toolform         := TForm_BinEdit.Create(Self);
749      toolform.Caption := 'Binary .dat-Editor ' + caption_end;
750      iconindex        := 5;
751    end;
752    if window_context = 'extractor' then
753    begin
754 < //    toolform         := TForm_Extractor.Create(Self);
754 >    toolform         := TForm_Extractor.Create(Self);
755      toolform.Caption := 'Extractor ' + caption_end;
756      iconindex        := 8;
757    end;
# Line 768 | Line 763 | begin
763    end;
764    if window_context = 'rawedit' then
765    begin
766 < //    toolform         := TForm_RawEdit.Create(Self);
766 >    toolform         := TForm_RawEdit.Create(Self);
767      toolform.Caption := 'Binary .raw-Editor ' + caption_end;
768      iconindex        := 6;
769    end;
770    if window_context = 'txmpreplace' then
771    begin
772 < //    toolform         := TForm_TxmpReplace.Create(Application);
772 >    toolform         := TForm_TxmpReplace.Create(Self);
773      toolform.Caption := 'TXMP Replacer ' + caption_end;
774      iconindex        := 7;
775    end;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)