Ejemplo n.º 1
0
        public void UpdateCommands()
        {
            ICommandItem[] commands;
            lock (m_commands)
            {
                commands = m_commands.ToArray<ICommandItem>();
            }

            foreach (var command in commands)
            {
                var commandState = new Atf.Applications.CommandState(command.Text, command.IsChecked);

                m_adaptee.UpdateCommand(command.CommandTag, commandState);

                if (commandState.Text != command.Text)
                    command.Text = commandState.Text;
                if (commandState.Check != command.IsChecked)
                    command.IsChecked = commandState.Check;
            }
        }
Ejemplo n.º 2
0
        public void UpdateCommands()
        {
            ICommandItem[] commands;
            lock (m_commands)
            {
                commands = m_commands.ToArray <ICommandItem>();
            }

            foreach (var command in commands)
            {
                var commandState = new Atf.Applications.CommandState(command.Text, command.IsChecked);

                m_adaptee.UpdateCommand(command.CommandTag, commandState);

                if (commandState.Text != command.Text)
                {
                    command.Text = commandState.Text;
                }
                if (commandState.Check != command.IsChecked)
                {
                    command.IsChecked = commandState.Check;
                }
            }
        }