Пример #1
0
		public void UpdateGoals (FixtureViewModel fixture)
		{
			Device.BeginInvokeOnMainThread (() => {
				this.AwayTeamGoals = fixture.AwayTeamGoals;
				this.HomeTeamGoals = fixture.HomeTeamGoals;
			});
		}
Пример #2
0
 public void UpdateGoals(FixtureViewModel fixture)
 {
     Device.BeginInvokeOnMainThread(() => {
         this.AwayTeamGoals = fixture.AwayTeamGoals;
         this.HomeTeamGoals = fixture.HomeTeamGoals;
     });
 }
Пример #3
0
        public void SetCardData(FixtureViewModel fixture)
        {
            _homeTeamDetails.TeamGoals.BindingContext = fixture;
            _awayTeamDetails.TeamGoals.BindingContext = fixture;

            _homeTeamDetails.SetDetailViewData(fixture?.Fixture.HomeTeam);
            _awayTeamDetails.SetDetailViewData(fixture?.Fixture.AwayTeam);
        }
Пример #4
0
        public FixtureCardView(FixtureViewModel fixture)
        {
            _homeTeamDetails = new FixtureCardDetailsView (fixture?.Fixture?.HomeTeam);
            _homeTeamDetails.TeamGoals.BindingContext = fixture;
            _homeTeamDetails.TeamGoals.SetBinding(Label.TextProperty, nameof(FixtureViewModel.HomeTeamGoals));

            _awayTeamDetails = new FixtureCardDetailsView (fixture?.Fixture?.AwayTeam);
            _awayTeamDetails.TeamGoals.BindingContext = fixture;
            _awayTeamDetails.TeamGoals.SetBinding(Label.TextProperty, nameof(FixtureViewModel.AwayTeamGoals));

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

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

            grid.Children.Add (_homeTeamDetails, 1, 0);

            grid.Children.Add (_awayTeamDetails, 1, 1);

            Content = grid;
        }
Пример #5
0
		public MatchDetailPage (FixtureViewModel vm)
		{
			BindingContext = vm;
			this.SetBinding (ContentPage.TitleProperty, path:nameof (FixtureViewModel.MatchTitle));
			CreateLayout ();
		}