Ejemplo n.º 1
0
        /// If a designer supports a MenuCommand, it will add it here.
        public void AddCommand(System.ComponentModel.Design.MenuCommand command)
        {
            if (commands == null)
            {
                commands        = new Hashtable();
                defaultCommands = new DefaultMenuCommands(host as IServiceProvider);
                defaultCommands.AddTo(this);
            }

            // Only add a command if we haven't already.
            if (FindCommand(command.CommandID) == null)
            {
                commands.Add(command.CommandID, command);
            }
        }
		/// If a designer supports a MenuCommand, it will add it here.
		public void AddCommand(System.ComponentModel.Design.MenuCommand command)
		{
			if (commands == null)
			{
				commands = new Hashtable();
                defaultCommands = new DefaultMenuCommands(host as IServiceProvider);
                defaultCommands.AddTo(this);
			}

			// Only add a command if we haven't already.
			if (FindCommand(command.CommandID) == null)
			{
				commands.Add(command.CommandID, command);
			}
		}