private void Button_Click(object sender, RoutedEventArgs e) { var selected = ItemsComboBox.SelectedValue; ItemHasBeenSelected?.Invoke(this, new SelectedItemEventArgs { }); }
private void DataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { _selectedStream = _VODList[e.RowIndex]; ItemHasBeenSelected?.Invoke(this, new SelectedItemEventArgs { SelectedChoice = _selectedStream }); } }
/// <summary> /// Datagridview click event that processes the button click in the datagridview by /// invoking ItemHasBeenSelected event with the corresponding selectedStreamer object /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void StreamerGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { UserInformation selectedStreamer = _followedStreamerInformation[e.RowIndex]; ItemHasBeenSelected?.Invoke(this, new SelectedItemEventArgs { SelectedChoice = selectedStreamer }); } }