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.
Revision 105 by alloc, Wed Feb 21 00:29:27 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 496 | Line 496 | end;
496  
497   procedure TForm_Main.LoadFile(typedb: Boolean);
498   var
499 <  ext: String;
499 >  i: Integer;
500   begin
501    opend.InitialDir := AppSettings.DatPath;
502    opend.Filter     := 'Compatible level files|*.dat;*.oldb|Oni level (*.dat)|*.dat|OUP level database (*.oldb)|*.oldb|Any (*.*)|*';
# Line 506 | Line 506 | begin
506      opend.FilterIndex := 2;
507    if opend.Execute then
508    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]);
512      AppSettings.DatPath := ExtractFilepath(opend.FileName);
513    end;
514    UpdateStatBar;
# Line 692 | Line 686 | begin
686    begin
687      CheckConnectionCloseable(index);
688      ConManager.CloseConnectionByIndex(index, RepMsg);
689 +    ShowOpenMsg(RepMsg);
690 +    UpdateConLists;
691    end;
692    UpdateStatBar;
693   end;
# Line 750 | Line 746 | begin
746  
747    if window_context = 'binedit' then
748    begin
749 < //    toolform         := TForm_BinEdit.Create(Self);
749 >    toolform         := TForm_BinEdit.Create(Self);
750      toolform.Caption := 'Binary .dat-Editor ' + caption_end;
751      iconindex        := 5;
752    end;
753    if window_context = 'extractor' then
754    begin
755 < //    toolform         := TForm_Extractor.Create(Self);
755 >    toolform         := TForm_Extractor.Create(Self);
756      toolform.Caption := 'Extractor ' + caption_end;
757      iconindex        := 8;
758    end;
# Line 768 | Line 764 | begin
764    end;
765    if window_context = 'rawedit' then
766    begin
767 < //    toolform         := TForm_RawEdit.Create(Self);
767 >    toolform         := TForm_RawEdit.Create(Self);
768      toolform.Caption := 'Binary .raw-Editor ' + caption_end;
769      iconindex        := 6;
770    end;
771    if window_context = 'txmpreplace' then
772    begin
773 < //    toolform         := TForm_TxmpReplace.Create(Application);
773 >    toolform         := TForm_TxmpReplace.Create(Self);
774      toolform.Caption := 'TXMP Replacer ' + caption_end;
775      iconindex        := 7;
776    end;

Diff Legend

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