Esempio n. 1
0
        public FixtureCardDetailsView(FixtureTeam team)
        {
            _teamName = new Label()
            {
                LineBreakMode   = LineBreakMode.TailTruncation,
                Text            = team?.TeamName,
                FontSize        = 18,
                TextColor       = Color.Black,
                VerticalOptions = LayoutOptions.CenterAndExpand
            };

            TeamGoals = new Label()
            {
                Text                    = team?.TeamGoals.ToString(),
                FontSize                = 15,
                FontFamily              = "AvenirNext-DemiBold",
                TextColor               = ScoresAppStyleKit.NavigationBarTextColor,
                BackgroundColor         = ScoresAppStyleKit.NavigationBarBackgroundColor,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                HeightRequest           = 20,
                WidthRequest            = 20,
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment   = TextAlignment.Center,
                HorizontalOptions       = LayoutOptions.EndAndExpand
            };

            _teamImage = new SvgImage {
                SvgPath           = team?.TeamImage,
                HeightRequest     = 40,
                WidthRequest      = 40,
                HorizontalOptions = LayoutOptions.Start,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            var stack = new StackLayout()
            {
                BackgroundColor = ScoresAppStyleKit.MenuBackgroundColor,
                Spacing         = 10,
                Padding         = new Thickness(5, 0, 5, 0),
                Orientation     = StackOrientation.Horizontal,
                Children        =
                {
                    _teamImage,
                    _teamName,
                    TeamGoals
                }
            };

            Content = stack;
        }
Esempio n. 2
0
        public Holder(string key, string fileName, League league) : this()
        {
            Key      = key;
            FileName = fileName;
            League   = league;

            foreach (LeagueTeam lt in League.Teams)
            {
                if (!Fixture.Teams.Exists(ft => ft.LeagueTeam == lt))
                {
                    FixtureTeam ft = new FixtureTeam();
                    ft.LeagueTeam = lt;
                    ft.Name       = lt.Name;
                    Fixture.Teams.Add(ft);
                }
            }
        }
Esempio n. 3
0
        void FormFixtureShown(object sender, EventArgs e)
        {
            if (Fixture != null)
            {
                if (Fixture.Teams.Count == 0)
                {
                    foreach (var lt in League.Teams)
                    {
                        var ft = new FixtureTeam();
                        ft.LeagueTeam = lt;
                        ft.Name       = lt.Name;
                        Fixture.Teams.Add(ft);
                    }
                }

                textBoxTeams.Text = Fixture.Teams.ToString();

                if (Fixture.Games.Any())
                {
                    textBoxGames.Text = Fixture.Games.ToString();
                    textBoxGrid.Lines = Fixture.Games.ToGrid(Fixture.Teams);
                }
            }
        }
Esempio n. 4
0
 public void SetDetailViewData(FixtureTeam team)
 {
     _teamName.Text     = team?.TeamName;
     _teamImage.SvgPath = team?.TeamImage;
 }