Esempio n. 1
0
        protected virtual void InitializeCommandManager()
        {
            var controlGroup = new CommandGroup("TestGroup");

            controlGroup.Add(new CreateButtonCommand());
            CommandManager.AddGroup(controlGroup);
        }
Esempio n. 2
0
        private void addCommand(ICommand command)
        {
            var commandGroup = command as CommandGroup;

            if (commandGroup != null)
            {
                currentCommandGroup = commandGroup;
                commands.Add(commandGroup);
            }
            else
            {
                if (currentCommandGroup != null)
                {
                    currentCommandGroup.Add(command);
                }
                else
                {
                    commands.Add(command);
                }
                addDisplayCommand(command);
            }
            clearStartEndTimes();
        }