Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / Design / CommandID.cs / 1 / CommandID.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides Object's ToString method. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Overrides Object's ToString method. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RuleSettings.cs
- SqlInfoMessageEvent.cs
- Invariant.cs
- RadioButtonList.cs
- TableRowGroup.cs
- _SSPISessionCache.cs
- TraceSection.cs
- RootBrowserWindow.cs
- ValidatingPropertiesEventArgs.cs
- AffineTransform3D.cs
- WebHeaderCollection.cs
- FileRecordSequence.cs
- ToolStripContentPanelRenderEventArgs.cs
- SqlCaseSimplifier.cs
- MeshGeometry3D.cs
- InvariantComparer.cs
- ListSourceHelper.cs
- CqlWriter.cs
- sqlpipe.cs
- SqlDataSourceCache.cs
- DynamicPropertyHolder.cs
- ReceiveSecurityHeaderElementManager.cs
- AsymmetricCryptoHandle.cs
- tooltip.cs
- SubpageParagraph.cs
- LinqDataSourceEditData.cs
- DiscardableAttribute.cs
- ShellProvider.cs
- TransformDescriptor.cs
- WindowsListViewGroupSubsetLink.cs
- ExpressionBindingCollection.cs
- NumberSubstitution.cs
- BamlLocalizableResource.cs
- TraceContextEventArgs.cs
- XmlBoundElement.cs
- SafeRightsManagementEnvironmentHandle.cs
- ReturnType.cs
- HwndSourceKeyboardInputSite.cs
- UserControl.cs
- MailWebEventProvider.cs
- ToolStripPanelSelectionBehavior.cs
- TextChangedEventArgs.cs
- HttpRuntime.cs
- TableTextElementCollectionInternal.cs
- CngProvider.cs
- FacetEnabledSchemaElement.cs
- Metafile.cs
- RewritingValidator.cs
- FloaterParaClient.cs
- DocumentationServerProtocol.cs
- ContainerControl.cs
- XmlSchemaExporter.cs
- XmlElementCollection.cs
- DbConnectionStringBuilder.cs
- HtmlTableCell.cs
- FrameworkName.cs
- DbDataReader.cs
- Pkcs7Signer.cs
- BuildResult.cs
- XmlSchemaDatatype.cs
- BitmapMetadata.cs
- DisplayInformation.cs
- BinaryObjectWriter.cs
- TextEditorThreadLocalStore.cs
- PieceNameHelper.cs
- IntPtr.cs
- XmlWhitespace.cs
- ParagraphVisual.cs
- Assert.cs
- BinaryMessageEncodingElement.cs
- ECDsa.cs
- SqlWorkflowInstanceStore.cs
- AsyncOperation.cs
- WinFormsUtils.cs
- IntellisenseTextBox.designer.cs
- DbConnectionOptions.cs
- SqlCrossApplyToCrossJoin.cs
- ServiceOperation.cs
- SqlXmlStorage.cs
- SystemKeyConverter.cs
- CodeDirectiveCollection.cs
- DriveInfo.cs
- ConstraintEnumerator.cs
- Tracer.cs
- SessionState.cs
- RegexMatch.cs
- TableCell.cs
- RotateTransform3D.cs
- SemanticKeyElement.cs
- ResponseStream.cs
- IPCCacheManager.cs
- SchemaAttDef.cs
- Path.cs
- DescriptionAttribute.cs
- Message.cs
- BitmapEffect.cs
- CommandDesigner.cs
- HtmlHead.cs
- Int32Animation.cs
- CacheDependency.cs