Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewSelectedCellsAccessibleObject.cs / 1 / DataGridViewSelectedCellsAccessibleObject.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security.Permissions; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewSelectedCellsAccessibleObject : AccessibleObject { DataGridView owner; public DataGridViewSelectedCellsAccessibleObject(DataGridView owner) { this.owner = owner; } public override string Name { get { return SR.GetString(SR.DataGridView_AccSelectedCellsName); } } public override AccessibleObject Parent { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.owner.AccessibilityObject; } } public override AccessibleRole Role { get { return AccessibleRole.Grouping; } } public override AccessibleStates State { get { return AccessibleStates.Selected | AccessibleStates.Selectable; } } public override string Value { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.Name; } } public override AccessibleObject GetChild(int index) { if (index >= 0 && index < this.owner.GetCellCount(DataGridViewElementStates.Selected)) { return this.owner.SelectedCell(index).AccessibilityObject; } else { return null; } } public override int GetChildCount() { return this.owner.GetCellCount(DataGridViewElementStates.Selected); } public override AccessibleObject GetSelected() { return this; } public override AccessibleObject GetFocused() { if (this.owner.CurrentCell != null && this.owner.CurrentCell.Selected) { return this.owner.CurrentCell.AccessibilityObject; } else { return null; } } [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] public override AccessibleObject Navigate(AccessibleNavigation navigationDirection) { switch (navigationDirection) { case AccessibleNavigation.FirstChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(0).AccessibilityObject; } else { return null; } case AccessibleNavigation.LastChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(this.owner.GetCellCount(DataGridViewElementStates.Selected) - 1).AccessibilityObject; } else { return null; } default: { return null; } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security.Permissions; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewSelectedCellsAccessibleObject : AccessibleObject { DataGridView owner; public DataGridViewSelectedCellsAccessibleObject(DataGridView owner) { this.owner = owner; } public override string Name { get { return SR.GetString(SR.DataGridView_AccSelectedCellsName); } } public override AccessibleObject Parent { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.owner.AccessibilityObject; } } public override AccessibleRole Role { get { return AccessibleRole.Grouping; } } public override AccessibleStates State { get { return AccessibleStates.Selected | AccessibleStates.Selectable; } } public override string Value { [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] get { return this.Name; } } public override AccessibleObject GetChild(int index) { if (index >= 0 && index < this.owner.GetCellCount(DataGridViewElementStates.Selected)) { return this.owner.SelectedCell(index).AccessibilityObject; } else { return null; } } public override int GetChildCount() { return this.owner.GetCellCount(DataGridViewElementStates.Selected); } public override AccessibleObject GetSelected() { return this; } public override AccessibleObject GetFocused() { if (this.owner.CurrentCell != null && this.owner.CurrentCell.Selected) { return this.owner.CurrentCell.AccessibilityObject; } else { return null; } } [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] public override AccessibleObject Navigate(AccessibleNavigation navigationDirection) { switch (navigationDirection) { case AccessibleNavigation.FirstChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(0).AccessibilityObject; } else { return null; } case AccessibleNavigation.LastChild: if (this.owner.GetCellCount(DataGridViewElementStates.Selected) > 0) { return this.owner.SelectedCell(this.owner.GetCellCount(DataGridViewElementStates.Selected) - 1).AccessibilityObject; } else { return null; } default: { return null; } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UrlPath.cs
- ExcCanonicalXml.cs
- ReturnEventArgs.cs
- DBProviderConfigurationHandler.cs
- GridErrorDlg.cs
- CommandPlan.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ISCIIEncoding.cs
- DesignerCategoryAttribute.cs
- LoginDesigner.cs
- XpsException.cs
- CellParagraph.cs
- CursorConverter.cs
- _AutoWebProxyScriptHelper.cs
- DataKey.cs
- SystemColors.cs
- DesignerDataRelationship.cs
- EntityClassGenerator.cs
- BindingMAnagerBase.cs
- UserControlCodeDomTreeGenerator.cs
- XPathDocumentBuilder.cs
- XamlTreeBuilderBamlRecordWriter.cs
- IsolatedStorageFileStream.cs
- ExpressionEditor.cs
- CaseInsensitiveHashCodeProvider.cs
- HttpSessionStateBase.cs
- ManifestSignatureInformation.cs
- WindowsProgressbar.cs
- ScriptingJsonSerializationSection.cs
- XmlWellformedWriter.cs
- SelectionUIHandler.cs
- Decorator.cs
- AudioBase.cs
- TrustManager.cs
- GridViewSelectEventArgs.cs
- GlobalizationAssembly.cs
- ASCIIEncoding.cs
- MissingMemberException.cs
- SymbolDocumentGenerator.cs
- WebPartConnectVerb.cs
- ParallelEnumerableWrapper.cs
- Match.cs
- HttpRequestWrapper.cs
- LogLogRecordEnumerator.cs
- Int32CAMarshaler.cs
- Soap.cs
- TreeNode.cs
- TaskFileService.cs
- XmlCharType.cs
- FilterException.cs
- AxWrapperGen.cs
- ResetableIterator.cs
- LinkedResourceCollection.cs
- ObjectResult.cs
- SafeNativeMethods.cs
- ControlCollection.cs
- SerializationInfo.cs
- ResourceExpressionEditorSheet.cs
- SoapMessage.cs
- BitmapEffectDrawingContextState.cs
- WaitHandle.cs
- ExecutedRoutedEventArgs.cs
- WindowsListViewGroup.cs
- ImmutableCollection.cs
- PropertyPathWorker.cs
- WebBrowsableAttribute.cs
- DataGridViewRowCollection.cs
- GeometryModel3D.cs
- FilteredReadOnlyMetadataCollection.cs
- DragEvent.cs
- ReferentialConstraint.cs
- DataGridViewCheckBoxCell.cs
- RoutedEventConverter.cs
- TextModifierScope.cs
- ExecutionContext.cs
- ListenerConstants.cs
- TreeViewImageIndexConverter.cs
- SQLString.cs
- UrlAuthFailedErrorFormatter.cs
- FileVersionInfo.cs
- RijndaelManagedTransform.cs
- ListBoxAutomationPeer.cs
- ConnectionConsumerAttribute.cs
- DiscoveryReference.cs
- WebBrowserNavigatingEventHandler.cs
- DataServices.cs
- OdbcStatementHandle.cs
- SHA384.cs
- PlatformNotSupportedException.cs
- BigInt.cs
- SrgsDocumentParser.cs
- StrokeCollection2.cs
- Assign.cs
- UserControl.cs
- ConsoleTraceListener.cs
- UnsafeNetInfoNativeMethods.cs
- Empty.cs
- Expressions.cs
- CompilerTypeWithParams.cs
- CompilerTypeWithParams.cs