Ejemplo n.º 1
0
        public CardView(Card card)
        {
            var initialOffsetY = ScreenResolutionMatcher.ContentViewStartingY();
            this.AddSubview(
                new UILabel{
                    Frame = new RectangleF(0,0,320,initialOffsetY),
                    BackgroundColor = UIColor.FromRGBA(222/255f, 222/255f, 225/255f, 0.25f)
            });

            this.AddSubview(
                new UILabel{
                    Text = card.TournamentName,
                    TextAlignment = UITextAlignment.Center,
                    Frame = new RectangleF(0,initialOffsetY,320,30),
                    TextColor = UIColor.White,
                    Font = UIFont.BoldSystemFontOfSize(19),
                    BackgroundColor = UIColor.FromRGBA(222/255f, 222/255f, 225/255f, 0.25f)
            });

            this.AddSubview(
                new UILabel{
                    Text = card.WeekName,
                    TextAlignment = UITextAlignment.Center,
                    Frame = new RectangleF(0,initialOffsetY+30,320,30),
                    TextColor = UIColor.White,
                    Font = UIFont.BoldSystemFontOfSize(15),
                    BackgroundColor = UIColor.FromRGBA(222/255f, 222/255f, 225/255f, 0.25f)
            });
        }
Ejemplo n.º 2
0
        public void SubmitCard(Card card)
        {
            if (!AppManager.Current.ConfirmNetworkIsAvailable())
                return;

            AppManager.Current.OnNetworkUsageStarted("Tarjetas");

            Console.WriteLine("CardsService: Attempting to submit card async...");
            var url = string.Format(_cardsUrl, _loginNickName, _loginPassword, Constants.WEB_SERVER_URL);

            var client = new WebClientProxy();
            client.OnHttpPostCompleted += _HttpPostCompleted;
            client.HttpPostAsync(url, card.ToJson());
        }
Ejemplo n.º 3
0
            public static JsonCard BuildFromCard(Card card)
            {
                List<JsonMatch> jsonMatches = new List<JsonMatch>();
                foreach (var match in card.Matches) {
                    jsonMatches.Add(new JsonMatch {
                        match_id = match.MatchId,
                        home_score = match.HomeUserScore,
                        guest_score = match.GuestUserScore });
                }

                return new JsonCard { week_id = card.WeekId, matches = jsonMatches };
            }
Ejemplo n.º 4
0
 private Card StripOverdueMatches(Card card)
 {
     card.Matches.RemoveAll(m => !m.IsEditable());
     return card;
 }