Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ToolStripLocationCancelEventArgs.cs
- BooleanExpr.cs
- FrameworkContentElement.cs
- InputMethodStateTypeInfo.cs
- UsernameTokenFactoryCredential.cs
- DocumentReference.cs
- ObjectStateManager.cs
- CatchDesigner.xaml.cs
- FamilyTypefaceCollection.cs
- WebPartEditorOkVerb.cs
- EditorZone.cs
- IItemContainerGenerator.cs
- SpeechSeg.cs
- PropertyPushdownHelper.cs
- OperationCanceledException.cs
- GeometryGroup.cs
- CompilationSection.cs
- XsdSchemaFileEditor.cs
- UIElement.cs
- PinnedBufferMemoryStream.cs
- Panel.cs
- HMACMD5.cs
- WebEventTraceProvider.cs
- CodeConstructor.cs
- Fx.cs
- XmlElementAttribute.cs
- TimeZoneInfo.cs
- ApplicationContext.cs
- IndexedGlyphRun.cs
- EntityProviderServices.cs
- CriticalExceptions.cs
- DoubleUtil.cs
- NameHandler.cs
- Color.cs
- VectorCollection.cs
- ScaleTransform.cs
- securitycriticaldataClass.cs
- AdjustableArrowCap.cs
- Animatable.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EncodingDataItem.cs
- objectresult_tresulttype.cs
- XmlNodeList.cs
- SafeCertificateContext.cs
- FormatterConverter.cs
- ZipQueryOperator.cs
- TemplateKeyConverter.cs
- WebBrowserPermission.cs
- Calendar.cs
- CompModHelpers.cs
- TextLine.cs
- IHttpResponseInternal.cs
- PostBackOptions.cs
- PointAnimationUsingKeyFrames.cs
- MenuEventArgs.cs
- UpdateTranslator.cs
- CollectionChangeEventArgs.cs
- ButtonPopupAdapter.cs
- GenericRootAutomationPeer.cs
- hresults.cs
- CopyAction.cs
- MSAAEventDispatcher.cs
- TypeBrowser.xaml.cs
- Rect3DConverter.cs
- Operand.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SmiEventSink_DeferedProcessing.cs
- SoapAttributes.cs
- TripleDES.cs
- ObjectQueryProvider.cs
- XmlComment.cs
- ConnectionManagementElement.cs
- XmlAnyElementAttribute.cs
- DBSqlParserColumnCollection.cs
- RecognizedPhrase.cs
- CqlLexerHelpers.cs
- ExpressionTable.cs
- SoapHttpTransportImporter.cs
- DefinitionUpdate.cs
- BindingBase.cs
- RuntimeArgument.cs
- WebPartDesigner.cs
- ToolStripOverflow.cs
- Color.cs
- ElapsedEventArgs.cs
- TextContainer.cs
- SqlRewriteScalarSubqueries.cs
- Bitmap.cs
- EnumConverter.cs
- TemplateEditingFrame.cs
- NameValuePair.cs
- BooleanConverter.cs
- SessionParameter.cs
- FormClosedEvent.cs
- Geometry3D.cs
- IconConverter.cs
- NativeMethods.cs
- SqlConnectionString.cs
- StringCollectionMarkupSerializer.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs