示例#1
0
        protected DefaultCollectionElementAddCommand(CommandAttribute commandAttribute, ConfigurationElementType configurationElementType, ElementCollectionViewModel collection, IUIServiceWpf uiService)
            : base(commandAttribute, uiService)
        {
            Guard.ArgumentNotNull(configurationElementType, "configurationElementType");

            this.ConfigurationElementType = configurationElementType.ElementType;
            this.ElementCollectionModel   = collection;

            commandPlacement = commandAttribute.CommandPlacement;
        }
示例#2
0
        public DefaultCollectionElementAddCommand(ConfigurationElementType configurationElementType, ElementCollectionViewModel collection, IUIServiceWpf uiService)
            : base(uiService)
        {
            Guard.ArgumentNotNull(configurationElementType, "configurationElementType");

            this.ConfigurationElementType = configurationElementType.ElementType;
            this.ElementCollectionModel   = collection;

            commandPlacement = CommandPlacement.ContextAdd;
        }
 /// <summary>
 /// Returns a list of <see cref="CommandModel"/> instances that belong to the specified <see cref="CommandPlacement"/>.
 /// </summary>
 /// <param name="placement">The <see cref="CommandPlacement"/> for which commands should be returned.</param>
 /// <returns>
 /// A list of <see cref="CommandModel"/> instances that belong to the specified <see cref="CommandPlacement"/>.
 /// </returns>
 public IEnumerable<CommandModel> GetCommands(CommandPlacement placement)
 {
     EnsureCommands();
     return globalCommands
         .Where(x => x.Placement == placement);
 }
 /// <summary>
 /// Returns a list of <see cref="CommandModel"/> instances that belong to the specified <see cref="CommandPlacement"/>.
 /// </summary>
 /// <param name="placement">The <see cref="CommandPlacement"/> for which commands should be returned.</param>
 /// <returns>
 /// A list of <see cref="CommandModel"/> instances that belong to the specified <see cref="CommandPlacement"/>.
 /// </returns>
 public IEnumerable <CommandModel> GetCommands(CommandPlacement placement)
 {
     EnsureCommands();
     return(globalCommands
            .Where(x => x.Placement == placement));
 }
示例#5
0
 public TransitionInfo(string commandText)
 {
     _commandText      = commandText;
     _commandPlacement = Presentation.CommandPlacement.Toolbar | Presentation.CommandPlacement.PropertiesToolbar |
                         Presentation.CommandPlacement.LinkList | Presentation.CommandPlacement.ContextMenu;
 }
示例#6
0
 public IEntityWorkflowTransition CommandPlacement(CommandPlacement commandPlacement)
 {
     _commandPlacement = commandPlacement;
     return(this);
 }