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
- CodeAttributeArgumentCollection.cs
- ReflectionServiceProvider.cs
- RewritingValidator.cs
- DependencyPropertyValueSerializer.cs
- DependencyProperty.cs
- ObjectDataSourceDisposingEventArgs.cs
- GridViewPageEventArgs.cs
- BindingOperations.cs
- WebPartDisplayModeCollection.cs
- PhysicalOps.cs
- ValueTypePropertyReference.cs
- DataGridViewImageColumn.cs
- RolePrincipal.cs
- Material.cs
- GenericUriParser.cs
- SwitchDesigner.xaml.cs
- Menu.cs
- SqlDependency.cs
- ButtonPopupAdapter.cs
- WCFServiceClientProxyGenerator.cs
- DataExpression.cs
- ColorTransform.cs
- PopupRoot.cs
- CacheDependency.cs
- DPTypeDescriptorContext.cs
- handlecollector.cs
- InstancePersistence.cs
- WCFModelStrings.Designer.cs
- SubpageParagraph.cs
- WebPartConnectionsConfigureVerb.cs
- OrderablePartitioner.cs
- ProcessModelInfo.cs
- PersistenceParticipant.cs
- PageThemeParser.cs
- ZipIORawDataFileBlock.cs
- CommandManager.cs
- DataSourceControl.cs
- SendMessageRecord.cs
- HijriCalendar.cs
- XmlWriterDelegator.cs
- Int16AnimationBase.cs
- CustomErrorCollection.cs
- DataGridColumnsPage.cs
- EventLogSession.cs
- Int32Animation.cs
- VirtualPathUtility.cs
- TextChange.cs
- ModifyActivitiesPropertyDescriptor.cs
- SafeSecurityHelper.cs
- HealthMonitoringSection.cs
- WebControlToolBoxItem.cs
- KeyTimeConverter.cs
- TextFormatter.cs
- ProcessThreadCollection.cs
- AppSettingsExpressionBuilder.cs
- _NTAuthentication.cs
- ObjectAssociationEndMapping.cs
- DispatcherHooks.cs
- DbTypeMap.cs
- HandlerBase.cs
- AttributeProviderAttribute.cs
- Matrix3DStack.cs
- Brush.cs
- ReaderWriterLockWrapper.cs
- WebPartEditorCancelVerb.cs
- EntityConnectionStringBuilder.cs
- FirstMatchCodeGroup.cs
- ValidationHelpers.cs
- EditorPartCollection.cs
- BookmarkResumptionRecord.cs
- SymbolPair.cs
- RemotingSurrogateSelector.cs
- TimerElapsedEvenArgs.cs
- WhitespaceReader.cs
- TextHidden.cs
- ReferentialConstraint.cs
- OverflowException.cs
- IdnElement.cs
- bidPrivateBase.cs
- FixedNode.cs
- XmlAttributeOverrides.cs
- MouseGestureConverter.cs
- MemoryFailPoint.cs
- WindowsListBox.cs
- DocumentSequenceHighlightLayer.cs
- ProcessInfo.cs
- FlowDocumentPaginator.cs
- AssemblyAttributesGoHere.cs
- lengthconverter.cs
- PartialCachingAttribute.cs
- DatatypeImplementation.cs
- WebBrowserNavigatingEventHandler.cs
- RadioButtonBaseAdapter.cs
- StorageScalarPropertyMapping.cs
- QilPatternFactory.cs
- WebPartHelpVerb.cs
- SimpleWebHandlerParser.cs
- QueryReaderSettings.cs
- XmlHierarchicalEnumerable.cs
- MessageProtectionOrder.cs