protected virtual void OnActiveFilesButtonClick(object sender, ActiveFilesButtonClickEventArgs e)
        {
            Form parentForm = this.MdiParent;

            if (parentForm == null)
            {
                return;
            }

            DXPopupMenu activeFilesPopupMenu = CreateActiveFilesPopupMenu();

            foreach (XtraMdiTabPage page in this.Pages)
            {
                if (!page.PageVisible || !page.PageEnabled)
                {
                    continue;
                }

                DXMenuItem menuItem = CreateMenuItem(page);
                menuItem.Click += new EventHandler(OnActiveFilesButtonMenuItemClick);
                activeFilesPopupMenu.Items.Add(menuItem);
            }

            IXtraTab xtraTabIntf = this as IXtraTab;

            if (xtraTabIntf == null)
            {
                return;
            }

            Point menuPos = new Point(e.ButtonInfo.Bounds.X, e.ButtonInfo.Bounds.Bottom);

            MenuManagerHelper.GetMenuManager(xtraTabIntf.LookAndFeel).ShowPopupMenu(activeFilesPopupMenu, parentForm, menuPos);
        }
예제 #2
0
 protected virtual void OnActiveFilesButtonClick(ActiveFilesButtonClickEventArgs ea)
 {
     if (ActiveFilesButtonClick != null)
     {
         ActiveFilesButtonClick(this, ea);
     }
 }