Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewHitTestInfo.cs / 1305376 / DataGridViewHitTestInfo.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Globalization; namespace System.Windows.Forms { public partial class DataGridView { ///public sealed class HitTestInfo { internal DataGridViewHitTestType type = DataGridViewHitTestType.None; //internal DataGridViewHitTestTypeCloseEdge edge = DataGridViewHitTestTypeCloseEdge.None; internal DataGridViewHitTestTypeInternal typeInternal = DataGridViewHitTestTypeInternal.None; internal int row; internal int col; internal int adjacentRow; internal int adjacentCol; internal int mouseBarOffset; internal int rowStart; internal int colStart; /// /// /// public static readonly HitTestInfo Nowhere = new HitTestInfo(); internal HitTestInfo() { this.type = DataGridViewHitTestType.None; this.typeInternal = DataGridViewHitTestTypeInternal.None; //this.edge = DataGridViewHitTestTypeCloseEdge.None; this.row = this.col = -1; this.rowStart = this.colStart = -1; this.adjacentRow = this.adjacentCol = -1; } ///Allows the ///object to inform you the /// extent of the grid. /// /// public int ColumnIndex { get { return this.col; } } ///Gets the number of the clicked column. ////// /// public int RowIndex { get { return this.row; } } ///Gets the /// number of the clicked row. ////// /// public int ColumnX { get { return this.colStart; } } ///Gets the left edge of the column. ////// /// public int RowY { get { return this.rowStart; } } ///Gets the top edge of the row. ////// /// public DataGridViewHitTestType Type { get { return this.type; } } ///Gets the part of the ///control, other than the row or column, that was /// clicked. /// /// public override bool Equals(object value) { HitTestInfo hti = value as HitTestInfo; if (hti != null) { return (this.type == hti.type && this.row == hti.row && this.col == hti.col); } return false; } ///Indicates whether two objects are identical. ////// /// public override int GetHashCode() { return WindowsFormsUtils.GetCombinedHashCodes((int) this.type, this.row, this.col); } ///Gets the hash code for the ///instance. /// /// public override string ToString() { return "{ Type:" + type.ToString() + ", Column:" + col.ToString(CultureInfo.CurrentCulture) + ", Row:" + row.ToString(CultureInfo.CurrentCulture) + " }"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets the type, column number and row number. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Globalization; namespace System.Windows.Forms { public partial class DataGridView { ///public sealed class HitTestInfo { internal DataGridViewHitTestType type = DataGridViewHitTestType.None; //internal DataGridViewHitTestTypeCloseEdge edge = DataGridViewHitTestTypeCloseEdge.None; internal DataGridViewHitTestTypeInternal typeInternal = DataGridViewHitTestTypeInternal.None; internal int row; internal int col; internal int adjacentRow; internal int adjacentCol; internal int mouseBarOffset; internal int rowStart; internal int colStart; /// /// /// public static readonly HitTestInfo Nowhere = new HitTestInfo(); internal HitTestInfo() { this.type = DataGridViewHitTestType.None; this.typeInternal = DataGridViewHitTestTypeInternal.None; //this.edge = DataGridViewHitTestTypeCloseEdge.None; this.row = this.col = -1; this.rowStart = this.colStart = -1; this.adjacentRow = this.adjacentCol = -1; } ///Allows the ///object to inform you the /// extent of the grid. /// /// public int ColumnIndex { get { return this.col; } } ///Gets the number of the clicked column. ////// /// public int RowIndex { get { return this.row; } } ///Gets the /// number of the clicked row. ////// /// public int ColumnX { get { return this.colStart; } } ///Gets the left edge of the column. ////// /// public int RowY { get { return this.rowStart; } } ///Gets the top edge of the row. ////// /// public DataGridViewHitTestType Type { get { return this.type; } } ///Gets the part of the ///control, other than the row or column, that was /// clicked. /// /// public override bool Equals(object value) { HitTestInfo hti = value as HitTestInfo; if (hti != null) { return (this.type == hti.type && this.row == hti.row && this.col == hti.col); } return false; } ///Indicates whether two objects are identical. ////// /// public override int GetHashCode() { return WindowsFormsUtils.GetCombinedHashCodes((int) this.type, this.row, this.col); } ///Gets the hash code for the ///instance. /// /// public override string ToString() { return "{ Type:" + type.ToString() + ", Column:" + col.ToString(CultureInfo.CurrentCulture) + ", Row:" + row.ToString(CultureInfo.CurrentCulture) + " }"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets the type, column number and row number. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FrameworkElementFactoryMarkupObject.cs
- IWorkflowDebuggerService.cs
- nulltextcontainer.cs
- TransactedBatchingElement.cs
- ModelUIElement3D.cs
- GeneralTransform2DTo3DTo2D.cs
- ParentQuery.cs
- DBConcurrencyException.cs
- PenThreadWorker.cs
- XpsS0ValidatingLoader.cs
- SqlParameter.cs
- BooleanConverter.cs
- EntityDataSourceState.cs
- LinqDataSourceSelectEventArgs.cs
- EntityDataSourceUtil.cs
- AnnotationHighlightLayer.cs
- WebPartConnectionsCloseVerb.cs
- LineInfo.cs
- _ConnectionGroup.cs
- OracleConnectionStringBuilder.cs
- WebPartMinimizeVerb.cs
- CompilationUtil.cs
- ErrorStyle.cs
- Memoizer.cs
- PageContent.cs
- ApplyImportsAction.cs
- SqlUDTStorage.cs
- ServerValidateEventArgs.cs
- TrackingMemoryStream.cs
- HtmlTableCell.cs
- ControllableStoryboardAction.cs
- WorkflowTimerService.cs
- HtmlProps.cs
- TrailingSpaceComparer.cs
- IgnoreFlushAndCloseStream.cs
- WebOperationContext.cs
- Win32PrintDialog.cs
- ByteAnimation.cs
- EnumType.cs
- WebPartsSection.cs
- ApplicationInfo.cs
- SynchronizationFilter.cs
- JapaneseLunisolarCalendar.cs
- HttpVersion.cs
- DynamicArgumentDesigner.xaml.cs
- GeneralTransform3DGroup.cs
- FilteredXmlReader.cs
- TemplateField.cs
- DataServiceRequestException.cs
- DataSvcMapFileSerializer.cs
- TimelineGroup.cs
- ModelItemKeyValuePair.cs
- DetailsViewRow.cs
- DivideByZeroException.cs
- SizeKeyFrameCollection.cs
- FontWeightConverter.cs
- AssemblyNameProxy.cs
- CodeCommentStatement.cs
- ObjectQuery.cs
- CompilerLocalReference.cs
- Shared.cs
- Crypto.cs
- SqlCacheDependencyDatabase.cs
- TextRunTypographyProperties.cs
- LocatorManager.cs
- FakeModelItemImpl.cs
- DependencyObjectProvider.cs
- TextRange.cs
- SessionPageStateSection.cs
- PaginationProgressEventArgs.cs
- ChannelServices.cs
- TemplateBamlTreeBuilder.cs
- ListViewItem.cs
- SiteOfOriginContainer.cs
- ScriptModule.cs
- WbmpConverter.cs
- GetWorkflowTree.cs
- IisHelper.cs
- CommandExpr.cs
- CustomErrorCollection.cs
- NativeObjectSecurity.cs
- DataBindingExpressionBuilder.cs
- latinshape.cs
- XPathBinder.cs
- Formatter.cs
- DependencyPropertyKind.cs
- SequentialWorkflowRootDesigner.cs
- KerberosTicketHashIdentifierClause.cs
- AttributeCollection.cs
- Message.cs
- HandlerBase.cs
- SqlBooleanMismatchVisitor.cs
- NumericUpDownAcceleration.cs
- GradientStop.cs
- MailMessageEventArgs.cs
- Rule.cs
- ValidatingReaderNodeData.cs
- translator.cs
- TextSelectionProcessor.cs
- WebPartHeaderCloseVerb.cs