public void OnPointerClick(PointerEventData eventData)
 {
     if (GlobalValues.CurrentScene == GlobalValues.Scene.Town)
     {
         OnCardClicked?.Invoke(this.gameObject);
     }
 }
示例#2
0
        public LeagueCardView(LeagueItem context)
        {
            BindingContext = context;

            Grid grid = new Grid {
                Padding         = new Thickness(1, 1, 2, 2),
                RowSpacing      = 0,
                ColumnSpacing   = 0,
                BackgroundColor = Color.FromHex("E3E3E3").MultiplyAlpha(0.5),
                RowDefinitions  =
                {
                    new RowDefinition {
                        Height = new GridLength(100, GridUnitType.Absolute)
                    }
                },
                ColumnDefinitions =
                {
                    new ColumnDefinition {
                        Width = new GridLength(4, GridUnitType.Absolute)
                    },
                    new ColumnDefinition {
                    }
                }
            };

            grid.Children.Add(
                new FixtureCardStatusView()
                , 0, 0);
            grid.Children.Add(new LeagueCardDetailsView(LeagueItem), 1, 0);

            var tgr = new TapGestureRecognizer {
                NumberOfTapsRequired = 1
            };

            tgr.Tapped += (sender, args) => {
                OnCardClicked?.Invoke(LeagueItem);
            };
            grid.GestureRecognizers.Add(tgr);
            Content = grid;
        }
示例#3
0
 void Button_Clicked(object sender, EventArgs e)
 {
     OnCardClicked?.Invoke(LeagueItem);
 }
示例#4
0
 private void HandleClicked()
 {
     OnCardClicked?.Invoke(this);
 }
示例#5
0
 public void OnClickCard()
 {
     OnCardClicked?.Invoke(this);
 }
 protected virtual void ClickEvent(object sender, EventArgs e)
 {
     OnCardClicked?.Invoke(sender, e);
 }
示例#7
0
 public void SendValueOnClick()
 {
     OnCardClicked?.Invoke(Value);
     OnCardClicked    = null;
     cardFront.sprite = NumberToSprite(Value);
 }