public void DataGridViewRowAccessibleObject_Select_NoDataGridView_Nop(AccessibleSelection flags) { using var owner = new DataGridViewRow(); var accessibleObject = new DataGridViewRowAccessibleObject(owner); accessibleObject.Select(flags); }
public override void Select(AccessibleSelection flags) { if (Owner == null) { throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); } DataGridViewRowHeaderCell dataGridViewCell = (DataGridViewRowHeaderCell)Owner; DataGridView dataGridView = dataGridViewCell.DataGridView; if (dataGridView == null) { return; } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.Focus(); } if (dataGridViewCell.OwningRow != null && (dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect || dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect)) { if ((flags & (AccessibleSelection.TakeSelection | AccessibleSelection.AddSelection)) != 0) { dataGridViewCell.OwningRow.Selected = true; } else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) { dataGridViewCell.OwningRow.Selected = false; } } }
public override void Select(AccessibleSelection flags) { if (base.Owner == null) { throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewCellAccessibleObject_OwnerNotSet")); } DataGridViewRowHeaderCell owner = (DataGridViewRowHeaderCell)base.Owner; DataGridView dataGridView = owner.DataGridView; if (dataGridView != null) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.FocusInternal(); } if ((owner.OwningRow != null) && ((dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect) || (dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect))) { if ((flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) != AccessibleSelection.None) { owner.OwningRow.Selected = true; } else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) { owner.OwningRow.Selected = false; } } } }
// Helper function that is used by the CurveLegend's accessibility object // to select a specific CurveLegend control. Specifically, this function is used // in the CurveLegend.CurveLegendAccessibleObject.Select function. internal void SelectChild(CurveLegend.CurveLegendAccessibleObject child, AccessibleSelection selection) { int childID = child.ID; // Determine which selection action should occur, based on the // AccessibleSelection value. if ((selection & AccessibleSelection.TakeSelection) != 0) { for (int i = 0; i < chartControl.Legends.Length; i++) { if (i == childID) { chartControl.Legends[i].Selected = true; } else { chartControl.Legends[i].Selected = false; } } // AccessibleSelection.AddSelection means that the CurveLegend will be selected. if ((selection & AccessibleSelection.AddSelection) != 0) { chartControl.Legends[childID].Selected = true; } // AccessibleSelection.AddSelection means that the CurveLegend will be unselected. if ((selection & AccessibleSelection.RemoveSelection) != 0) { chartControl.Legends[childID].Selected = false; } } }
public override void Select(AccessibleSelection flags) { if (base.Owner == null) { throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewCellAccessibleObject_OwnerNotSet")); } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { base.Owner.DataGridView.FocusInternal(); if ((base.Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0) && (base.Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible) > 0)) { DataGridViewRow row = base.Owner.DataGridView.Rows[base.Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)]; DataGridViewColumn firstColumn = base.Owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible); base.Owner.DataGridView.SetCurrentCellAddressCoreInternal(firstColumn.Index, row.Index, false, true, false); } } if (((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) && base.Owner.DataGridView.MultiSelect) { base.Owner.DataGridView.SelectAll(); } if (((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) && ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.None)) { base.Owner.DataGridView.ClearSelection(); } }
public void DataGridViewCellAccessibleObject_Select_NothingToDo_Nop(AccessibleSelection flags) { using var owner = new SubDataGridViewCell(); var accessibleObject = new DataGridViewCellAccessibleObject(owner); accessibleObject.Select(flags); }
internal void SelectChild(AccessibleSelection flags, int index) { if (index >= 0 && index < CheckedListBox.Items.Count) { CheckedListBox.SetSelected(index, true); } }
public override void Select(AccessibleSelection flags) { if (_owner == null) { throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { _owner.DataGridView?.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { _owner.Selected = true; if (_owner.DataGridView != null) { _owner.DataGridView.CurrentCell = _owner; // Do not change old selection } } if ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) { // it seems that in any circumstances a cell can become selected _owner.Selected = true; } if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection && (flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) == 0) { _owner.Selected = false; } }
public override void Select(AccessibleSelection flags) { var tva = _tn.Tree; switch (flags) { case AccessibleSelection.TakeSelection: case AccessibleSelection.TakeFocus: //never mind: this is a flag that can be added to others tva.SelectedNode = _tn; break; case AccessibleSelection.AddSelection: if (tva.SelectionMode == TreeSelectionMode.Single) { tva.ClearSelection(); } _tn.IsSelected = true; break; case AccessibleSelection.RemoveSelection: _tn.IsSelected = false; break; //case AccessibleSelection.ExtendSelection: // //never mind // break; } }
public override void Select(AccessibleSelection flags) { if (this.accessibleObjectType == AccessibleObjectType.Item) { ISelectionService service = this.GetService(typeof(ISelectionService)) as ISelectionService; ActivityDesigner associatedDesigner = this.AssociatedDesigner; if ((service != null) && (associatedDesigner != null)) { if (((flags & AccessibleSelection.TakeFocus) > AccessibleSelection.None) || ((flags & AccessibleSelection.TakeSelection) > AccessibleSelection.None)) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Replace); } else if ((flags & AccessibleSelection.AddSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Add); } else if ((flags & AccessibleSelection.RemoveSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Remove); } } } else { base.Select(flags); } }
public virtual void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) != 0) { owner.Focus(); } return; }
public override void Select(AccessibleSelection flags) { try { this.ParentCheckedListBox.AccessibilityObject.GetSystemIAccessibleInternal().accSelect((int)flags, this.index + 1); } catch (ArgumentException) { } }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.DataGrid.CurrentRowIndex = this.owner.RowNumber; } }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.Owner.FocusedRelation = this.relationship; } }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.DataGrid.CurrentCell = new DataGridCell(this.owner.RowNumber, this.column); } }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: this.SelectedDataItem = this.item; break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: this.column.Owner.CurrentColumn = this.column; break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: this.Control.SelectedGridItem = (PropertyGridItemBase)this.item; break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: int num = this.owner.EnableCodedUITests ? 1 : 0; break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { // Focus the PropertyGridView window // if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { Owner.FocusedRelation = relationship; } }
public override void Select(AccessibleSelection flags) { PropertyGridItemBase propertyGridItemBase = !(this.parent is PropertyGridGroupAccessibleObject) ? (PropertyGridItemBase)((PropertyGridItemAccessibleObject)this.parent).Item : (PropertyGridItemBase)((PropertyGridGroupAccessibleObject)this.parent).Group; switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: this.parent.Control.SelectedGridItem = propertyGridItemBase; break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { if (Owner is null) { throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); } if (Owner.DataGridView?.IsHandleCreated != true) { return; } // AccessibleSelection.TakeFocus should focus the grid and then focus the first data grid view data cell if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { // Focus the grid Owner.DataGridView.Focus(); if (Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0 && Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible) > 0) { // This means that there are visible rows and columns. // Focus the first data cell. DataGridViewRow row = Owner.DataGridView.Rows[Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)]; DataGridViewColumn col = Owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible); // DataGridView::set_CurrentCell clears the previous selection. // So use SetCurrenCellAddressCore directly. Owner.DataGridView.SetCurrentCellAddressCoreInternal(col.Index, row.Index, false /*setAnchorCellAddress*/, true /*validateCurrentCell*/, false /*thoughMouseClick*/); } } // AddSelection selects the entire grid. if ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) { if (Owner.DataGridView.MultiSelect) { Owner.DataGridView.SelectAll(); } } // RemoveSelection clears the selection on the entire grid. // But only if AddSelection is not set. if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection && (flags & AccessibleSelection.AddSelection) == 0) { Owner.DataGridView.ClearSelection(); } }
public override void Select(AccessibleSelection flags) { view.Focus(); if ((flags & AccessibleSelection.TakeSelection) != 0 || (flags & AccessibleSelection.AddSelection) != 0) { view.SelectedNode = node; } else if ((flags & AccessibleSelection.RemoveSelection) != 0) { if (view.SelectedNode == this.node) { view.SelectedNode = null; } } }
public override void Select(AccessibleSelection flags) { try { _systemIAccessible.accSelect((int)flags, GetChildId()); } catch (ArgumentException) { // In Everett, the ListBox accessible children did not have any selection capability. // In Whidbey, they delegate the selection capability to OLEACC. // However, OLEACC does not deal w/ several Selection flags: ExtendSelection, AddSelection, RemoveSelection. // OLEACC instead throws an ArgumentException. // Since Whidbey API's should not throw an exception in places where Everett API's did not, we catch // the ArgumentException and fail silently. } }
public override void Select(AccessibleSelection flags) { // Focus the PropertyGridView window // if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { DataGrid.Focus(); } // Select the grid entry // if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { DataGrid.CurrentCell = new DataGridCell(owner.RowNumber, column); } }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: if (!this.owner.EnableCodedUITests) { this.owner.CurrentColumn = this.column; this.owner.CurrentRow = this.row; break; } break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { try { if (ParentCheckedListBox.IsHandleCreated) { ParentCheckedListBox.AccessibilityObject.GetSystemIAccessibleInternal()?.accSelect((int)flags, _index + 1); } } catch (ArgumentException) { // In Everett, the CheckedListBox accessible children did not have any selection capability. // In Whidbey, they delegate the selection capability to OLEACC. // However, OLEACC does not deal w/ several Selection flags: ExtendSelection, AddSelection, RemoveSelection. // OLEACC instead throws an ArgumentException. // Since Whidbey API's should not throw an exception in places where Everett API's did not, we catch // the ArgumentException and fail silently. } }
public override void Select(AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: this.group.Owner.CurrentItem = (ListViewDataItem)this.group; break; case AccessibleSelection.TakeSelection: case AccessibleSelection.ExtendSelection: case AccessibleSelection.AddSelection: this.group.Owner.Select(new ListViewDataItem[1] { (ListViewDataItem)this.group }); break; } base.Select(flags); }
public override void Select(AccessibleSelection flags) { ISelectionService service = this.GetService(typeof(ISelectionService)) as ISelectionService; if (service != null) { if (((flags & AccessibleSelection.TakeFocus) > AccessibleSelection.None) || ((flags & AccessibleSelection.TakeSelection) > AccessibleSelection.None)) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Replace); } else if ((flags & AccessibleSelection.AddSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Add); } else if ((flags & AccessibleSelection.RemoveSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Remove); } } }
public override void Select(AccessibleSelection flags) { ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService; if (selectionService != null) { if (((flags & AccessibleSelection.TakeFocus) > 0) || ((flags & AccessibleSelection.TakeSelection) > 0)) { selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Replace); } else if ((flags & AccessibleSelection.AddSelection) > 0) { selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Add); } else if ((flags & AccessibleSelection.RemoveSelection) > 0) { selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Remove); } } }
public override void Select(AccessibleSelection flags) { _node.TreeView.SelectedNode = _node; }
public override void Select(AccessibleSelection flags) { _tree.Select(); }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.DataGrid.CurrentCell = new DataGridCell(this.owner.RowNumber, this.column); } }
public override void Select(AccessibleSelection flags) { if (base.Owner == null) { throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewCellAccessibleObject_OwnerNotSet")); } DataGridViewColumnHeaderCell owner = (DataGridViewColumnHeaderCell) base.Owner; DataGridView dataGridView = owner.DataGridView; if (dataGridView != null) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.FocusInternal(); } if ((owner.OwningColumn != null) && ((dataGridView.SelectionMode == DataGridViewSelectionMode.FullColumnSelect) || (dataGridView.SelectionMode == DataGridViewSelectionMode.ColumnHeaderSelect))) { if ((flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) != AccessibleSelection.None) { owner.OwningColumn.Selected = true; } else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) { owner.OwningColumn.Selected = false; } } } }
public override void Select(AccessibleSelection flags) { if (this.Owner == null) { throw new InvalidOperationException(SR.GetString(SR.DataGridViewCellAccessibleObject_OwnerNotSet)); } DataGridViewRowHeaderCell dataGridViewCell = (DataGridViewRowHeaderCell)this.Owner; DataGridView dataGridView = dataGridViewCell.DataGridView; if (dataGridView == null) { return; } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.FocusInternal(); } if (dataGridViewCell.OwningRow != null && (dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect || dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect)) { if ((flags & (AccessibleSelection.TakeSelection | AccessibleSelection.AddSelection)) != 0) { dataGridViewCell.OwningRow.Selected = true; } else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) { dataGridViewCell.OwningRow.Selected = false; } } }
public override void Select(AccessibleSelection flags) { // Focus the PropertyGridView window // if ( (flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { DataGrid.Focus(); } // Select the grid entry // if ( (flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { DataGrid.CurrentRowIndex = owner.RowNumber; } }
public override void Select(AccessibleSelection flags) { if (this.owner == null) { throw new InvalidOperationException(SR.GetString(SR.DataGridViewCellAccessibleObject_OwnerNotSet)); } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.owner.DataGridView.FocusInternal(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.owner.Selected = true; this.owner.DataGridView.CurrentCell = this.owner; // Do not change old selection } if ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) { // it seems that in any circumstances a cell can become selected this.owner.Selected = true; } if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection && (flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) == 0) { this.owner.Selected = false; } }
public override void Select(AccessibleSelection flags) { // Focus the PropertyGridView window // if ( (flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { DataGrid.Focus(); } if ( (flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { Owner.FocusedRelation = relationship; } }
public override void Select(AccessibleSelection flags) { // vs 77963 -- make sure we're on the right thread. // if (PropertyGridView.InvokeRequired) { PropertyGridView.Invoke(new SelectDelegate(this.Select), new object[]{flags}); return; } // Focus the PropertyGridView window // if ( (flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { bool focused = PropertyGridView.FocusInternal(); } // Select the grid entry // if ( (flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { PropertyGridView.AccessibilitySelect(this.owner); } }
public override void Select(AccessibleSelection flags) { if (this.PropertyGridView.InvokeRequired) { this.PropertyGridView.Invoke(new SelectDelegate(this.Select), new object[] { flags }); } else { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.PropertyGridView.FocusInternal(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.PropertyGridView.AccessibilitySelect(this.owner); } } }
public virtual void Select(AccessibleSelection flags) { if (this.systemIAccessible != null) { try { this.systemIAccessible.accSelect((int) flags, 0); } catch (COMException exception) { if (exception.ErrorCode != -2147352573) { throw exception; } } } }
public override void Select (AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: dataGridViewRow.DataGridView.Focus(); break; case AccessibleSelection.TakeSelection: //dataGridViewRow.Focus(); break; case AccessibleSelection.AddSelection: dataGridViewRow.DataGridView.SelectedRows.InternalAdd(dataGridViewRow); break; case AccessibleSelection.RemoveSelection: dataGridViewRow.DataGridView.SelectedRows.InternalRemove(dataGridViewRow); break; } }
public override void Select(AccessibleSelection flags) { }
public override void Select(AccessibleSelection flags) { if (this.accessibleObjectType == AccessibleObjectType.Item) { ISelectionService service = this.GetService(typeof(ISelectionService)) as ISelectionService; ActivityDesigner associatedDesigner = this.AssociatedDesigner; if ((service != null) && (associatedDesigner != null)) { if (((flags & AccessibleSelection.TakeFocus) > AccessibleSelection.None) || ((flags & AccessibleSelection.TakeSelection) > AccessibleSelection.None)) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Replace); } else if ((flags & AccessibleSelection.AddSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Add); } else if ((flags & AccessibleSelection.RemoveSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { associatedDesigner.Activity }, SelectionTypes.Remove); } } } else { base.Select(flags); } }
public override void Select (AccessibleSelection flags) { base.Select (flags); }
public override void Select(AccessibleSelection flags) { view.Focus(); if ((flags & AccessibleSelection.TakeSelection) != 0 || (flags & AccessibleSelection.AddSelection) != 0) { view.SelectedNode = node; } else if ((flags & AccessibleSelection.RemoveSelection) != 0) { if (view.SelectedNode == this.node) { view.SelectedNode = null; } } }
public override void Select(AccessibleSelection flags) { this.view.Focus(); }
public override void Select (AccessibleSelection flags) { switch (flags) { case AccessibleSelection.TakeFocus: dataGridViewCell.dataGridViewOwner.Focus(); break; case AccessibleSelection.TakeSelection: //dataGridViewCell.Focus(); break; case AccessibleSelection.AddSelection: dataGridViewCell.dataGridViewOwner.SelectedCells.InternalAdd(dataGridViewCell); break; case AccessibleSelection.RemoveSelection: dataGridViewCell.dataGridViewOwner.SelectedCells.InternalRemove(dataGridViewCell); break; } }
public override void Select(AccessibleSelection flags) { ISelectionService service = this.GetService(typeof(ISelectionService)) as ISelectionService; if (service != null) { if (((flags & AccessibleSelection.TakeFocus) > AccessibleSelection.None) || ((flags & AccessibleSelection.TakeSelection) > AccessibleSelection.None)) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Replace); } else if ((flags & AccessibleSelection.AddSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Add); } else if ((flags & AccessibleSelection.RemoveSelection) > AccessibleSelection.None) { service.SetSelectedComponents(new object[] { this.activityDesigner.Activity }, SelectionTypes.Remove); } } }
public override void Select(AccessibleSelection flags) { if (this.owner == null) { throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewCellAccessibleObject_OwnerNotSet")); } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.owner.DataGridView.FocusInternal(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.owner.Selected = true; this.owner.DataGridView.CurrentCell = this.owner; } if ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) { this.owner.Selected = true; } if (((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) && ((flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) == AccessibleSelection.None)) { this.owner.Selected = false; } }
public override void Select(AccessibleSelection flags) { if (this.Owner == null) { throw new InvalidOperationException(SR.GetString(SR.DataGridViewCellAccessibleObject_OwnerNotSet)); } // AccessibleSelection.TakeFocus should focus the grid and then focus the first data grid view data cell if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { // Focus the grid this.Owner.DataGridView.FocusInternal(); if (this.Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0 && this.Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible) > 0) { // This means that there are visible rows and columns. // Focus the first data cell. DataGridViewRow row = this.Owner.DataGridView.Rows[this.Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)]; DataGridViewColumn col = this.Owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible); // DataGridView::set_CurrentCell clears the previous selection. // So use SetCurrenCellAddressCore directly. this.Owner.DataGridView.SetCurrentCellAddressCoreInternal(col.Index, row.Index, false /*setAnchorCellAddress*/, true /*validateCurrentCell*/, false /*thoughMouseClick*/); } } // AddSelection selects the entire grid. if ((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) { if (this.Owner.DataGridView.MultiSelect) { this.Owner.DataGridView.SelectAll(); } } // RemoveSelection clears the selection on the entire grid. // But only if AddSelection is not set. if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection && (flags & AccessibleSelection.AddSelection) == 0) { this.Owner.DataGridView.ClearSelection(); } }
public virtual void Select(AccessibleSelection flags) { // By default, do the system behavior // if (systemIAccessible != null) { try { systemIAccessible.accSelect((int)flags, 0); } catch (COMException e) { // Not all objects provide the select function // if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { throw e; } } return; } }
public virtual void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) != 0){ owner.Focus(); } return; }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.DataGrid.CurrentRowIndex = this.owner.RowNumber; } }
public override void Select(AccessibleSelection flags) { ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService; if (selectionService != null) { if (((flags & AccessibleSelection.TakeFocus) > 0) || ((flags & AccessibleSelection.TakeSelection) > 0)) selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Replace); else if ((flags & AccessibleSelection.AddSelection) > 0) selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Add); else if ((flags & AccessibleSelection.RemoveSelection) > 0) selectionService.SetSelectedComponents(new object[] { this.connectorHitInfo.SelectableObject }, SelectionTypes.Remove); } }
// Select this accessible object. public virtual void Select(AccessibleSelection flags) { // Nothing to do here. }
public override void Select(AccessibleSelection flags) { if (this.owner == null) { throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewRowAccessibleObject_OwnerNotSet")); } DataGridView dataGridView = this.owner.DataGridView; if (dataGridView != null) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.FocusInternal(); } if (((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) && (this.owner.Cells.Count > 0)) { if ((dataGridView.CurrentCell != null) && (dataGridView.CurrentCell.OwningColumn != null)) { dataGridView.CurrentCell = this.owner.Cells[dataGridView.CurrentCell.OwningColumn.Index]; } else { int index = dataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible).Index; if (index > -1) { dataGridView.CurrentCell = this.owner.Cells[index]; } } } if ((((flags & AccessibleSelection.AddSelection) == AccessibleSelection.AddSelection) && ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.None)) && ((dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect) || (dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect))) { this.owner.Selected = true; } if (((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) && ((flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) == AccessibleSelection.None)) { this.owner.Selected = false; } } }
public override void Select(AccessibleSelection flags) { if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { this.DataGrid.Focus(); } if ((flags & AccessibleSelection.TakeSelection) == AccessibleSelection.TakeSelection) { this.Owner.FocusedRelation = this.relationship; } }
public virtual void Select(AccessibleSelection flags) { }
public override void Select(AccessibleSelection flags) { try { ParentCheckedListBox.AccessibilityObject.GetSystemIAccessibleInternal().accSelect((int) flags, index + 1); } catch (ArgumentException) { // In Everett, the CheckedListBox accessible children did not have any selection capability. // In Whidbey, they delegate the selection capability to OLEACC. // However, OLEACC does not deal w/ several Selection flags: ExtendSelection, AddSelection, RemoveSelection. // OLEACC instead throws an ArgumentException. // Since Whidbey API's should not throw an exception in places where Everett API's did not, we catch // the ArgumentException and fail silently. } }