public LangTableRow(NSString cellId, OnItemClick itemClick) : base(UITableViewCellStyle.Value2, cellId) { onClickCallback = itemClick; textLabel = new UITextView() { Font = UIFont.FromName("Arial", 14f), TextColor = Style.OptionView.ContentColor, BackgroundColor = UIColor.Clear, Editable = false, Selectable = false, UserInteractionEnabled = true, TextContainerInset = UIEdgeInsets.Zero }; imageView = new UIImageView(); SelectionStyle = UITableViewCellSelectionStyle.Gray; ContentView.LayoutMargins = new UIEdgeInsets(0, 0, 0, 0); ContentView.Superview.BackgroundColor = UIColor.Clear; ContentView.Superview.TintColor = Style.OptionView.ContentColor; ContentView.TintColor = Style.OptionView.ContentColor; ContentView.AddSubviews(new UIView[] { imageView, textLabel }); if (count++ % 2 == 0) { //ContentView.BackgroundColor = UIColor.Black; } }
internal async Task ItemClick(string Id) { if (OnItemClick.HasDelegate) { await OnItemClick.InvokeAsync(Id); } }
protected override void InsertItem(TableItem item, int index) { _box.Widgets.Insert(index, item); item.TouchDown += (sender, args) => { OnItemClick.Invoke(item); }; item.MouseEntered += (sender, args) => { SelectedItem = item; }; item.MouseLeft += (sender, args) => { item.IsSelected = false; }; }
public void UpdateButtons(IEnumerable <ToolButton> buttons) { foreach (var button in m_ExtraButtons) { button.gameObject.SetActive(false); } while (buttons.Count() > m_ExtraButtons.Count) { m_ExtraButtons.Add(Instantiate(m_ExtraButtonPrebab, m_ScrollView.content)); } int i = 0; foreach (var button in buttons) { m_ExtraButtons[i].gameObject.SetActive(true); m_ExtraButtons[i].Name = button.transform.parent.name; m_ExtraButtons[i].Icon = button.buttonIcon.sprite; m_ExtraButtons[i].OnClick = () => { button.button.onClick?.Invoke(); if (m_DialogModeGetter.GetValue() == SetDialogModeAction.DialogMode.Normal) { button.transform.parent.gameObject.SetActive(true); OnItemClick?.Invoke(); } }; i++; } }
private void HandleItemClick(TItem item) { if (OnItemClick.HasDelegate) { OnItemClick.InvokeAsync(item); } }
private void ItemSelected(int id) { if (OnItemClick != null) { OnItemClick.Invoke(id); } }
protected override void OnItemViewClick(object sender, EventArgs e) { base.OnItemViewClick(sender, e); var holder = (MvxRecyclerViewHolder)sender; OnItemClick?.Invoke(this, new SelectedItemEventArgs(holder.AdapterPosition, holder.ItemView, holder.DataContext)); }
protected override void DoubleClickedItem(int id) { var select = hierarchyData.SingleOrDefault(x => x.id == id); if (select == null) { return; } OnItemClick?.Invoke(select.transform.gameObject); }
private void tileControl1_ItemClick(object sender, TileItemEventArgs e) { try { OnItemClick?.Invoke(sender, e); } catch (Exception ex) { MsgBox.ShowException(ex, this); } }
public void OnItemButtonClick(int x, int y, ButtonItem buttonItem) { buttonItem.SetType((int)currentType); buttonItem.SetSprite(resourceManager.GetSpriteByItemType(currentType)); buttonItem.SetInteractable(false); OnItemClick?.Invoke(x, y, currentType); ItemClicked?.Invoke(currentType); var index = (((int)currentType) + 1) % itemTypesCount; currentType = (ItemTypes)index; }
protected override void DoubleClickedItem(int id) { var single = serializedPropertys.SelectMany(x => x.Value).SingleOrDefault(m => m.id == id); if (single == null) { SetExpandedRecursive(id, !IsExpanded(id)); return; } if (single.values is SerializedProperty) { var sp = (SerializedProperty)single.values; OnItemClick?.Invoke((SerializedProperty)single.values); } }
private void ItemImageControl_OnMouseDown(object sender, MouseButtonEventArgs e) { OnItemClick?.Invoke(null, int.Parse(NumIndex)); if (blSelectedflag) { blSelectedflag = false; GridMain.Background = new SolidColorBrush(Colors.DarkOrange); } else { GridMain.Background = new SolidColorBrush(Colors.LightGray); blSelectedflag = true; OnSelectedItem?.Invoke(null, this); } }
void Click(CardAdapter2ClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(CommentAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void Click(FavoriteUserAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
private void onItemClick(int position) => OnItemClick?.Invoke(this, data[position]);
void OnClick(ContactsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void OnClick(AdapterClickEvents args) { OnItemClick?.Invoke(this, args); }
void Click(RowSoundLiteAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(NotificationsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void OnClick(int position, View view, object dataContext) => OnItemClick?.Invoke(this, new SelectedItemEventArgs(position, view, dataContext));
public void Click(GiftAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
void Click(HSoundAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(ArtistsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(AllMediaAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void onItemClickCallback(object o, int position) => OnItemClick?.Invoke(o, data[position]);
private void Click(LastChatAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
void Click(GenresCheckerAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(BlockedUsersAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private async Task OnClick(bool isHalf) { await OnItemClick.InvokeAsync(isHalf && this.AllowHalf); }