Exemple #1
0
 void OnKeyUp(object sender, EvasKeyEventArgs e)
 {
     if (e.KeyName == "Enter" && _focusArea.IsFocused)
     {
         RequestSelected?.Invoke(this, EventArgs.Empty);
     }
 }
Exemple #2
0
        bool OnKeyEvent(object?source, KeyEventArgs e)
        {
            if (e.Key.IsAcceptKeyEvent())
            {
                RequestSelected?.Invoke(this, EventArgs.Empty);
                return(true);
            }

            return(false);
        }
Exemple #3
0
 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));
         }
     }
 }
Exemple #5
0
 protected virtual void OnClicked(object sender, EventArgs e)
 {
     RequestSelected?.Invoke(this, EventArgs.Empty);
 }