Exemple #1
0
        protected void AddChildNodeCommand(string text, string longText, Type childType, Type nodeType, Type registerType, NodeMultiplicity nodeMultiplicity)
        {
            ConfigurationUICommand item = new ConfigurationUICommand(serviceProvider, text,
                longText,
                CommandState.Enabled, nodeMultiplicity,
                new AddChildNodeCommand(serviceProvider, childType),
                nodeType, Shortcut.None, InsertionPoint.New, null);

            AddUICommand(item, registerType);
        }
		/// <summary>
		/// Initialize a new instance of the <see cref="ConfigurationUICommand"/> class.
		/// </summary>		
		/// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
		/// <param name="text">The text for the command.</param>
		/// <param name="longText">The text that will be in the status bar.</param>
		/// <param name="commandState">One of the <see cref="CommandState"/> values.</param>		
		/// <param name="multiplicity">One of the <see cref="NodeMultiplicity"/> values.</param>
		/// <param name="command">The command to execute.</param>		
		/// <param name="nodeType">The node type that will be created when the command is executed.</param>
		/// <param name="shortcut">A short cut for the command.</param>
		/// <param name="insertionPoint">One of the <see cref="InsertionPoint"/> values.</param>
		/// <param name="icon">The icon for the command.</param>
		public ConfigurationUICommand(IServiceProvider serviceProvider, string text,
			string longText, CommandState commandState, NodeMultiplicity multiplicity,
			ConfigurationNodeCommand command, Type nodeType, Shortcut shortcut, 
			InsertionPoint insertionPoint, Icon icon)
		{
			this.text = text;
			this.longText = longText;
			this.commandState = commandState;
			this.command = command;
			this.nodeType = nodeType;
			this.insertionPoint = insertionPoint;
			this.shortcut = shortcut;
			this.icon = icon;
			this.serviceProvider = serviceProvider;
			this.multiplicity = multiplicity;
		}
 /// <summary>
 /// Initialize a new instance of the <see cref="ConfigurationUICommand"/> class.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="text">The text for the command.</param>
 /// <param name="longText">The text that will be in the status bar.</param>
 /// <param name="commandState">One of the <see cref="CommandState"/> values.</param>
 /// <param name="multiplicity">One of the <see cref="NodeMultiplicity"/> values.</param>
 /// <param name="command">The command to execute.</param>
 /// <param name="nodeType">The node type that will be created when the command is executed.</param>
 /// <param name="shortcut">A short cut for the command.</param>
 /// <param name="insertionPoint">One of the <see cref="InsertionPoint"/> values.</param>
 /// <param name="icon">The icon for the command.</param>
 public ConfigurationUICommand(IServiceProvider serviceProvider, string text,
                               string longText, CommandState commandState, NodeMultiplicity multiplicity,
                               ConfigurationNodeCommand command, Type nodeType, Shortcut shortcut,
                               InsertionPoint insertionPoint, Icon icon)
 {
     this.text            = text;
     this.longText        = longText;
     this.commandState    = commandState;
     this.command         = command;
     this.nodeType        = nodeType;
     this.insertionPoint  = insertionPoint;
     this.shortcut        = shortcut;
     this.icon            = icon;
     this.serviceProvider = serviceProvider;
     this.multiplicity    = multiplicity;
 }
Exemple #4
0
        protected void AddChildNodeCommand(string text, string longText, Type childType, Type nodeType, Type registerType, NodeMultiplicity nodeMultiplicity)
        {
            ConfigurationUICommand item = new ConfigurationUICommand(serviceProvider, text,
                                                                     longText,
                                                                     CommandState.Enabled, nodeMultiplicity,
                                                                     new AddChildNodeCommand(serviceProvider, childType),
                                                                     nodeType, Shortcut.None, InsertionPoint.New, null);

            AddUICommand(item, registerType);
        }