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
- AccessedThroughPropertyAttribute.cs
- BuildResultCache.cs
- processwaithandle.cs
- QilIterator.cs
- Utils.cs
- SqlOuterApplyReducer.cs
- LostFocusEventManager.cs
- ColumnResult.cs
- MobileListItem.cs
- MultiPageTextView.cs
- GridItemPatternIdentifiers.cs
- ClientData.cs
- TextServicesProperty.cs
- PathFigureCollection.cs
- HtmlImage.cs
- ToolStripSplitButton.cs
- XmlException.cs
- ExpressionBuilderContext.cs
- ReturnValue.cs
- GraphicsContainer.cs
- log.cs
- ChildChangedEventArgs.cs
- ValueUnavailableException.cs
- ConfigXmlSignificantWhitespace.cs
- EdmSchemaAttribute.cs
- CodeEntryPointMethod.cs
- DecoderFallbackWithFailureFlag.cs
- TraceFilter.cs
- ListBox.cs
- EpmHelper.cs
- UrlPropertyAttribute.cs
- BuilderPropertyEntry.cs
- BindingExpressionBase.cs
- Transactions.cs
- WebServiceReceive.cs
- ObjectDataSource.cs
- PartManifestEntry.cs
- UITypeEditor.cs
- PropertyGeneratedEventArgs.cs
- Calendar.cs
- WaitHandle.cs
- WeakEventTable.cs
- ExceptionRoutedEventArgs.cs
- InternalCompensate.cs
- ColumnReorderedEventArgs.cs
- DataGridItemCollection.cs
- XhtmlBasicCommandAdapter.cs
- FastEncoderWindow.cs
- CodeComment.cs
- AttributeAction.cs
- CodeBlockBuilder.cs
- GraphicsPathIterator.cs
- DocumentOrderComparer.cs
- AnimationStorage.cs
- WinFormsSecurity.cs
- SectionUpdates.cs
- ExternalFile.cs
- StylusTouchDevice.cs
- FocusTracker.cs
- InkCanvas.cs
- SourceFileBuildProvider.cs
- X509Certificate.cs
- Rect3DConverter.cs
- mansign.cs
- StringValidator.cs
- PermissionToken.cs
- NonBatchDirectoryCompiler.cs
- FixedPageStructure.cs
- ItemAutomationPeer.cs
- ObjectDataSourceSelectingEventArgs.cs
- ConfigPathUtility.cs
- TimeoutException.cs
- OleDbConnectionFactory.cs
- AttachedPropertyInfo.cs
- XamlStream.cs
- DataConnectionHelper.cs
- LayeredChannelListener.cs
- OciHandle.cs
- PathSegmentCollection.cs
- DataGridViewControlCollection.cs
- SimpleTextLine.cs
- Typeface.cs
- UserPreferenceChangingEventArgs.cs
- JoinTreeNode.cs
- IPHostEntry.cs
- PathTooLongException.cs
- RelationshipWrapper.cs
- TransportElement.cs
- DateTimeOffsetAdapter.cs
- CriticalExceptions.cs
- HtmlValidationSummaryAdapter.cs
- GradientStop.cs
- WebResourceUtil.cs
- Visual3D.cs
- MissingMemberException.cs
- CapabilitiesSection.cs
- _RequestCacheProtocol.cs
- ModuleBuilder.cs
- DbCommandTree.cs
- ApplicationGesture.cs