Exemplo n.º 1
0
        protected void AddExpandMenuItems(IMenuBarSubMenu subMenuExpand)
        {
            subMenuExpand.AddItem(CreateMenuButton.WithCaption("Expand Selection").WithActionCommand(() => Presenter.ExpandSelection()));

            subMenuExpand.AddItem(CreateMenuButton.WithCaption("Collapse Selection").WithActionCommand(() => Presenter.CollapseSelection()));
            subMenuExpand.AddItem(CreateMenuButton.WithCaption("Collapse all Except Selection").WithActionCommand(() => Presenter.CollapseAllExceptSelection()).AsGroupStarter());
        }
Exemplo n.º 2
0
        private void createUpdateMenu(IMenuBarSubMenu chartTemplate)
        {
            var chartTemplates = allSimulationTemplates().ToList();

            if (chartTemplates.Any())
            {
                var overwrite = CreateSubMenu.WithCaption(MenuNames.UpdateExistingTemplate)
                                .WithIcon(ApplicationIcons.SaveAsTemplate);

                chartTemplates.Each(t => overwrite.AddItem(updateMenuFor(t)));
                chartTemplate.AddItem(overwrite);
            }
        }
Exemplo n.º 3
0
 public static IMenuBarSubMenu WithItem(this IMenuBarSubMenu barSubMenu, IMenuBarItem subElement)
 {
     barSubMenu.AddItem(subElement);
     return(barSubMenu);
 }