Changeset 209 for oup/current/Main.pas


Ignore:
Timestamp:
Jun 5, 2007, 12:07:29 AM (18 years ago)
Author:
alloc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Main.pas

    r197 r209  
    136136
    137137uses
    138   LevelDB;
     138  LevelDB, MetaEditor;
    139139
    140140{$R *.dfm}
     
    415415  tb_txmpreplacer.Enabled := active;
    416416  tb_extractor.Enabled := active;
     417  tb_meta.Enabled := active;
    417418//  tb_compare.Enabled := active;
    418419//  tb_structure.Enabled := active;
     
    605606
    606607procedure TForm_Main.menu_metaClick(Sender: TObject);
    607 begin
    608   ShowMessage('TBD');
     608var
     609  toolform:    TForm_Meta;
     610  i:           Integer;
     611  tag:         Integer;
     612  iconindex:   Integer;
     613begin
     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;
    609635end;
    610636
Note: See TracChangeset for help on using the changeset viewer.