private void buttonSingleClick_Click(object sender, EventArgs e) { if (listBoxAccObjects.SelectedItem == null) { return; } var accObj = listBoxAccObjects.SelectedItem as AccessibleObject; _oldAccObj = accObj; accObj.Click(); }
public void DrawAccessibleObjectLocation(WinTypes.MouseHookStruct ml) { var accList = listBoxAccObjects.DataSource as IList <AccessibleObject>; if (accList == null) { return; } AccessibleObject q = accList.SingleOrDefault(p => (p.Location.Left >= ml.pt.x) && (p.Location.Top >= ml.pt.y) && (p.Location.Right <= ml.pt.x) && (p.Location.Bottom <= ml.pt.y) ); if (q != null) { listBoxAccObjects.SelectedItem = q; } }
private void listBoxAccObjects_SelectedIndexChanged(object sender, EventArgs e) { if (listBoxAccObjects.SelectedItem == null) { return; } if (_oldAccObj != null) { NativeMethods.DrawSelectRect(_hWnd, _oldAccObj); } var accObj = listBoxAccObjects.SelectedItem as AccessibleObject; _oldAccObj = accObj; textBoxAccObjPath.Text = accObj.Name; NativeMethods.DrawSelectRect(_hWnd, accObj); propertyGrid1.SelectedObject = accObj; // accObj.Click(); }
private void DragHandleImageMouseUp(object sender, MouseEventArgs e) { if (!_dragInProgress) { return; } _dragInProgress = false; Cursor = Cursors.Default; if (_oldWnd != IntPtr.Zero) { if (!DisableInternal) { NativeMethods.AppBridge(_oldWnd); } _oldAccObj = null; LoadAccessibleObjects(); NativeMethods.DrawSelectRect(_oldWnd); _popupMenu.Show(MousePosition); _oldWnd = IntPtr.Zero; } }