12 [PermissionSet(
SecurityAction.InheritanceDemand, Name =
"FullTrust")]
25 private const int ENABLED = 2;
27 private const int INVISIBLE = 16;
29 private const int CHECKED = 4;
31 private const int SUPPORTED = 1;
40 return (status & 4) != 0;
55 return (status & 2) != 0;
69 if (properties ==
null)
84 return (status & 1) != 0;
99 return (status & 0x10) == 0;
103 SetStatus(16, !value);
133 execHandler = handler;
138 private void SetStatus(
int mask,
bool value)
141 num = ((!value) ? (num & ~mask) : (num | mask));
152 if (execHandler !=
null)
179 if (statusHandler !=
null)
181 statusHandler(
this, e);
190 if ((status & 1) != 0)
194 if ((status & 2) != 0)
198 if ((status & 0x10) == 0)
202 if ((status & 4) != 0)
virtual bool Visible
Gets or sets a value indicating whether this menu item is visible.
virtual void OnCommandChanged(EventArgs e)
Raises the E:System.ComponentModel.Design.MenuCommand.CommandChanged event.
virtual void Invoke(object arg)
Invokes the command with the given parameter.
Represents a unique command identifier that consists of a numeric command ID and a GUID menu group id...
Represents the base class for classes that contain event data, and provides a value to use for events...
static Delegate Remove(Delegate source, Delegate value)
Removes the last occurrence of the invocation list of a delegate from the invocation list of another ...
static Delegate Combine(Delegate a, Delegate b)
Concatenates the invocation lists of two delegates.
SecurityAction
Specifies the security actions that can be performed using declarative security.
static readonly EventArgs Empty
Provides a value to use with events that do not have event data.
delegate void EventHandler(object sender, EventArgs e)
Represents the method that will handle an event that has no event data.
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
virtual int OleStatus
Gets the OLE command status code for this menu item.
The exception that is thrown when an attempt to check out a file that is checked into a source code m...
virtual bool Supported
Gets or sets a value indicating whether this menu item is supported.
static readonly CheckoutException Canceled
Initializes a new instance of the T:System.ComponentModel.Design.CheckoutException class that specifi...
EventHandler CommandChanged
Occurs when the menu command changes.
Represents a Windows menu or toolbar command item.
MenuCommand(EventHandler handler, CommandID command)
Initializes a new instance of the T:System.ComponentModel.Design.MenuCommand class.
Implements IDictionary by using a T:System.Collections.Specialized.ListDictionary while the collectio...
override string ToString()
Returns a string representation of this menu command.
override string ToString()
Returns a T:System.String that represents the current object.
virtual IDictionary Properties
Gets the public properties associated with the T:System.ComponentModel.Design.MenuCommand.
virtual void Invoke()
Invokes the command.
virtual bool Enabled
Gets a value indicating whether this menu item is available.
Represents a nongeneric collection of key/value pairs.
virtual bool Checked
Gets or sets a value indicating whether this menu item is checked.