void OnKeyUp(object sender, EvasKeyEventArgs e) { if (e.KeyName == "Enter" && _focusArea.IsFocused) { RequestSelected?.Invoke(this, EventArgs.Empty); } }
bool OnKeyEvent(object?source, KeyEventArgs e) { if (e.Key.IsAcceptKeyEvent()) { RequestSelected?.Invoke(this, EventArgs.Empty); return(true); } return(false); }
bool OnTouchEvent(object?source, TouchEventArgs e) { if (e.Touch.GetState(0) == PointStateType.Down) { return(true); } else if (e.Touch.GetState(0) == PointStateType.Up && this.IsInside(e.Touch.GetLocalPosition(0))) { RequestSelected?.Invoke(this, EventArgs.Empty); return(true); } return(false); }
/// <summary> /// Responsible for invoking the RequestSelected event with the proper arguments /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataGridSelectionChanged(object sender, EventArgs e) { if (RequestSelected != null) { //finds the last selected row and extracts the request id int rowId = _dataGrid.Rows.GetLastRow(DataGridViewElementStates.Selected | DataGridViewElementStates.Visible); if (rowId > -1) { DataGridViewRow row = _dataGrid.Rows[rowId]; int requestId = Convert.ToInt32(row.Cells["_id"].Value); RequestHeader requestHeader = _dataSource.GetRequestHeader(requestId); RequestSelected.Invoke(new TVDataAccessorDataArgs(requestId, requestHeader)); } } }
protected virtual void OnClicked(object sender, EventArgs e) { RequestSelected?.Invoke(this, EventArgs.Empty); }