Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }/// Overrides Object's ToString method. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NavigationProgressEventArgs.cs
- ToolboxCategory.cs
- ReadOnlyDataSourceView.cs
- ElementUtil.cs
- Quad.cs
- TypeLibConverter.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- DataKey.cs
- C14NUtil.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- SocketException.cs
- SystemThemeKey.cs
- PaintValueEventArgs.cs
- UnsafeNativeMethods.cs
- OleDbErrorCollection.cs
- MatcherBuilder.cs
- NavigationFailedEventArgs.cs
- BitConverter.cs
- XmlCharacterData.cs
- WindowsNonControl.cs
- CommittableTransaction.cs
- DictionarySectionHandler.cs
- AxImporter.cs
- MLangCodePageEncoding.cs
- GraphicsPathIterator.cs
- GenericTypeParameterBuilder.cs
- CryptoHelper.cs
- DbTransaction.cs
- WindowsGraphics2.cs
- StoragePropertyMapping.cs
- DbConnectionPool.cs
- ByteStreamMessageUtility.cs
- HtmlInputControl.cs
- HostingEnvironmentException.cs
- ConnectionStringSettingsCollection.cs
- TypeConstant.cs
- WebControlToolBoxItem.cs
- DetailsViewUpdatedEventArgs.cs
- EntityContainerAssociationSet.cs
- XmlBinaryWriter.cs
- Profiler.cs
- UnaryExpression.cs
- RTLAwareMessageBox.cs
- SystemTcpStatistics.cs
- Item.cs
- OutputCacheModule.cs
- SchemaTypeEmitter.cs
- PeerPresenceInfo.cs
- thaishape.cs
- GacUtil.cs
- WindowsListViewGroupHelper.cs
- LoginUtil.cs
- SQLDateTime.cs
- ListViewDataItem.cs
- _HeaderInfo.cs
- SiteOfOriginPart.cs
- GraphicsPathIterator.cs
- BooleanFunctions.cs
- RecipientInfo.cs
- Operators.cs
- GridViewUpdateEventArgs.cs
- SimpleTableProvider.cs
- X509Certificate.cs
- ChildChangedEventArgs.cs
- SqlRemoveConstantOrderBy.cs
- InputGestureCollection.cs
- SerializationException.cs
- ProfileSettingsCollection.cs
- DataSourceProvider.cs
- ButtonChrome.cs
- RoutedPropertyChangedEventArgs.cs
- VersionPair.cs
- GB18030Encoding.cs
- OuterGlowBitmapEffect.cs
- ToolboxComponentsCreatingEventArgs.cs
- PolicyUnit.cs
- CodeObject.cs
- CodeArrayCreateExpression.cs
- BaseComponentEditor.cs
- TemplateEditingService.cs
- DashStyle.cs
- MaskedTextBox.cs
- ComEventsSink.cs
- SQLUtility.cs
- TreeNodeStyle.cs
- SoapAttributeOverrides.cs
- sortedlist.cs
- WhitespaceReader.cs
- SR.Designer.cs
- ClientSideQueueItem.cs
- MessageSecurityVersion.cs
- ExpressionConverter.cs
- SqlParameter.cs
- controlskin.cs
- UInt16Converter.cs
- CatalogZone.cs
- SqlConnection.cs
- CultureMapper.cs
- WebReferencesBuildProvider.cs
- ScrollBar.cs