| 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) |
| 160 |
|
if RepMsg = SM_OK then |
| 161 |
|
begin |
| 162 |
|
UpdateStatBar; |
| 163 |
+ |
UpdateConLists; |
| 164 |
|
end; |
| 165 |
|
end; |
| 166 |
|
|
| 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 (*.*)|*'; |
| 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; |
| 686 |
|
begin |
| 687 |
|
CheckConnectionCloseable(index); |
| 688 |
|
ConManager.CloseConnectionByIndex(index, RepMsg); |
| 689 |
+ |
ShowOpenMsg(RepMsg); |
| 690 |
+ |
UpdateConLists; |
| 691 |
|
end; |
| 692 |
|
UpdateStatBar; |
| 693 |
|
end; |
| 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; |
| 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; |