Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- StreamInfo.cs
- MaterialGroup.cs
- HttpListenerResponse.cs
- StyleXamlParser.cs
- ResourceExpression.cs
- SelectedGridItemChangedEvent.cs
- DatatypeImplementation.cs
- Models.cs
- ProxyFragment.cs
- InlinedLocationReference.cs
- GeometryConverter.cs
- DbReferenceCollection.cs
- CodeTypeParameter.cs
- IFlowDocumentViewer.cs
- DataGridItemCollection.cs
- XmlTextReader.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ShaderEffect.cs
- CircleHotSpot.cs
- ToolStripKeyboardHandlingService.cs
- HtmlTableRow.cs
- HostingEnvironmentException.cs
- ConstraintEnumerator.cs
- IBuiltInEvidence.cs
- SpeechSeg.cs
- TypedDataSetSchemaImporterExtension.cs
- VariantWrapper.cs
- XmlSchemaExternal.cs
- DynamicContractTypeBuilder.cs
- AlternateView.cs
- _HelperAsyncResults.cs
- WindowsEditBoxRange.cs
- ProtocolsConfigurationHandler.cs
- figurelength.cs
- MailBnfHelper.cs
- ProvideValueServiceProvider.cs
- StylusEventArgs.cs
- TypeDependencyAttribute.cs
- ToolStripControlHost.cs
- Permission.cs
- Dynamic.cs
- XslUrlEditor.cs
- TextFormatterHost.cs
- FileInfo.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- XmlSchemaType.cs
- ValidationPropertyAttribute.cs
- ContractNamespaceAttribute.cs
- LazyTextWriterCreator.cs
- TransactionFilter.cs
- WebFormDesignerActionService.cs
- xml.cs
- EnvironmentPermission.cs
- WebPartDisplayModeCollection.cs
- DataTableMapping.cs
- EndpointReference.cs
- DataColumnPropertyDescriptor.cs
- SerializationInfo.cs
- StreamGeometry.cs
- HwndTarget.cs
- LocatorBase.cs
- FixedHighlight.cs
- ConfigurationStrings.cs
- Debugger.cs
- ProgressPage.cs
- DataSourceCache.cs
- FieldDescriptor.cs
- TreeViewTemplateSelector.cs
- KeyToListMap.cs
- VectorCollection.cs
- ItemCollection.cs
- InputScope.cs
- DataGridViewRowStateChangedEventArgs.cs
- BackgroundWorker.cs
- OleDbPermission.cs
- ContainerParaClient.cs
- RadioButtonPopupAdapter.cs
- Substitution.cs
- __FastResourceComparer.cs
- Dynamic.cs
- ClipboardData.cs
- RegexBoyerMoore.cs
- DataSourceHelper.cs
- Panel.cs
- ProgressBarHighlightConverter.cs
- AnnotationComponentChooser.cs
- ObjectDisposedException.cs
- TraceHwndHost.cs
- DriveNotFoundException.cs
- AmbiguousMatchException.cs
- GeneralTransform3DTo2D.cs
- ping.cs
- SHA256.cs
- AssemblyNameUtility.cs
- ApplicationServiceManager.cs
- columnmapkeybuilder.cs
- RubberbandSelector.cs
- AttachedPropertyMethodSelector.cs
- ListViewDeleteEventArgs.cs
- UnitySerializationHolder.cs