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

Comparing oup/current/Main.pas (file contents):
Revision 172 by alloc, Sun Apr 8 23:52:14 2007 UTC vs.
Revision 209 by alloc, Mon Jun 4 22:07:29 2007 UTC

# Line 6 | Line 6 | uses
6    MPHexEditor, ToolWin, ImgList, Tabs,
7    MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, OneInst,
8    Data, TypeDefs, ConnectionManager,
9 < //  Functions, Exporters, DataStructures,
10 <  Functions,
11 <  Settings, {Helper_LevelDB, }
12 <  Template,
9 >  Functions, Settings, Template,
10    RawEdit, BinEdit, Extractor, Preview, TxmpReplace;
11  
12   type
# Line 138 | Line 135 | var
135   implementation
136  
137   uses
138 <  LevelDB;
138 >  LevelDB, MetaEditor;
139  
140   {$R *.dfm}
141  
# Line 257 | Line 254 | begin
254    end
255    else
256    begin
257 +    ShowMessage('Warning!' + #13#10 +
258 +                'It seems like this is the first time you OUP.' + #13#10 +
259 +                'I do not take any responsibility for messed up data files' + #13+#10 +
260 +                'Do not forget to make backup copies of your *.dat/*.raw/*.sep files!');
261      AppSettings.DatPath        := ExtractFilepath(Application.EXEname);
262      AppSettings.ExtractPath    := ExtractFilepath(Application.EXEname) + '\extract';
263      AppSettings.CharSet        := DEFAULT_CHARSET;
# Line 413 | Line 414 | begin
414    tb_rawedit.Enabled := active;
415    tb_txmpreplacer.Enabled := active;
416    tb_extractor.Enabled := active;
417 +  tb_meta.Enabled := active;
418   //  tb_compare.Enabled := active;
419   //  tb_structure.Enabled := active;
420   end;
# Line 603 | Line 605 | begin
605   end;
606  
607   procedure TForm_Main.menu_metaClick(Sender: TObject);
608 < begin
609 <  ShowMessage('TBD');
608 > var
609 >  toolform:    TForm_Meta;
610 >  i:           Integer;
611 >  tag:         Integer;
612 >  iconindex:   Integer;
613 > begin
614 >  tag := 1;
615 >  if MDIChildCount > 0 then
616 >    for i := 0 to MDIChildCount - 1 do
617 >      if MDIChildren[i].Tag >= tag then
618 >        tag := MDIChildren[i].Tag + 1;
619 >
620 >  iconindex := -1;
621 >
622 >  toolform := nil;
623 >
624 >  toolform         := TForm_Meta.Create(Self);
625 >  toolform.Caption := 'MetaEditor' + ' ' + IntToStr(tag) + '       ';
626 >  iconindex        := 11;
627 >
628 >  if Assigned(toolform) then
629 >  begin
630 >    toolform.Name    := 'meta' + IntToStr(tag);
631 >    toolform.Tag     := tag;
632 >    MDITab.AddTab(TForm(toolform), iconindex);
633 >    toolform.Caption := AnsiReplaceStr(toolform.Caption, '       ', '');
634 >  end;
635   end;
636  
637   procedure TForm_Main.menu_filecompareClick(Sender: TObject);

Diff Legend

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