Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/switch-MDI-to-TDI'
Browse files Browse the repository at this point in the history
  • Loading branch information
vic123 committed Jun 3, 2022
2 parents ca71769 + cfd6c96 commit 86e42d9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Forms/frmMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ procedure TTPMainForm.ApplicationEvents1Minimize(Sender: TObject);
end;

procedure TTPMainForm.FormCreate(Sender: TObject);
procedure AddTdiPopupMenuItem(action: TAction);
var
menuItem: TMenuItem;
begin
menuItem := TMenuItem.Create(FTDI.PageControl.PopupMenu);
FTDI.PageControl.PopupMenu.Items.Add(menuItem);
menuItem.Action := action;
end;
begin
TLogBasicConfigurator.Configure(TLogNullAppender.Create('nulllogger'));
TLogLogger.GetRootLogger.Level := Off;
Expand All @@ -148,6 +156,11 @@ procedure TTPMainForm.FormCreate(Sender: TObject);
FTDI := TTDI.CreateWithFactory(Self, StreamFormFactory);

FTDI.ShowMenuPopup := True;
FTDI.PageControl.PopupMenu.Items.Clear;
AddTdiPopupMenuItem(actNewStream);
AddTdiPopupMenuItem(actCloseActiveStream);
AddTdiPopupMenuItem(actCloseAllStreams);

{$IFDEF RELEASE}
miRunMultipleStreams.Visible := False;
{$ENDIF}
Expand Down

0 comments on commit 86e42d9

Please sign in to comment.