private IMenuBarItem createSaveItemFor(TObjectBase objectBase) { return(CreateMenuButton.WithCaption(AppConstants.MenuNames.SaveAsPKML) .WithIcon(ApplicationIcons.SaveIconFor(typeof(TObjectBase).Name)) .WithCommandFor <SaveUICommandFor <TObjectBase>, TObjectBase>(objectBase)); }
protected override void SetModelMenuItems(IContextMenuView contextMenuView, IContainerBase containerBase, IBaseNode node) { var entity = Get <T>(node.Id); contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.Rename) .WithCommandFor <RenameObjectCommand <T>, T>(entity).WithIcon(ApplicationIcons.Rename)); contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.Edit) .WithCommandFor <EditCommandFor <T>, T>(entity).WithIcon(ApplicationIcons.Edit)); contextMenuView.AddMenuItem(CreateMenuButton.WithCaption(AppConstants.MenuNames.SaveAsPKML) .WithCommandFor <SaveUICommandFor <T>, T>(entity).WithIcon(ApplicationIcons.SaveIconFor(typeof(T).Name))); createRemoveCommandFor(contextMenuView, entity); base.SetModelMenuItems(contextMenuView, containerBase, node); }