Ejemplo n.º 1
0
        public CommandsActionsAdapter(IServiceProvider serviceProvider, ActionsPaneItemCollection actions, CommandCollection commands, bool showGroupsAsRegions, IExchangeSnapIn snapIn, ExchangeFormView view, bool createActionsAtBottom)
        {
            this.snapIn                = snapIn;
            this.serviceProvider       = serviceProvider;
            this.actions               = actions;
            this.commands              = commands;
            this.adapters              = new List <CommandActionAdapter>(commands.Count);
            this.showGroupsAsRegions   = showGroupsAsRegions;
            this.createActionsAtBottom = createActionsAtBottom;
            this.view = view;
            this.commands.CommandAdded   += new CommandEventHandler(this.commands_CommandAdded);
            this.commands.CommandRemoved += new CommandEventHandler(this.commands_CommandRemoved);
            ActionsPaneItemCollection actionsPaneItemCollection = new ActionsPaneItemCollection();

            for (int i = 0; i < this.commands.Count; i++)
            {
                CommandActionAdapter commandActionAdapter = this.CreateAdapter(this.commands[i]);
                this.adapters.Add(commandActionAdapter);
                if (commandActionAdapter.Command.Visible)
                {
                    actionsPaneItemCollection.Add(commandActionAdapter.ActionItem);
                }
            }
            this.actions.AddRange(actionsPaneItemCollection.ToArray());
        }
Ejemplo n.º 2
0
 public CommandsActionsAdapter(IServiceProvider serviceProvider, ActionsPaneItemCollection actions, CommandCollection commands, bool showGroupsAsRegions, IExchangeSnapIn snapIn, ExchangeFormView view) : this(serviceProvider, actions, commands, showGroupsAsRegions, snapIn, view, false)
 {
 }