Example #1
0
        private CompletedSchedule ProcessFinalItems(string result)
        {
            CompletedSchedule returnType;
            try
            {
                returnType = JsonHelpers.DeserializeJson<List<CompletedSchedule>>(result).First();
            }
            catch (Exception)
            {
                returnType = new CompletedSchedule();
            }

            return returnType;
        }
Example #2
0
        private CompletedViewSchedule UpdateFinalScore(CompletedSchedule input)
        {
            var output = new CompletedViewSchedule
                             {
                                 Teams = String.Format("{0} vs {1}", input.HomeTeam, input.VisitingTeam),
                                 GameDateTime =
                                     string.Format("{0}", input.StartDateLocal.ToShortDateString()),
                                 FinalScores = input.FinalScores
                             };

            if (!string.IsNullOrWhiteSpace(output.FinalScores))
            {
                _isolated["FinalKey"] = output.FinalScores;
            }

            string fs = null;
            if (_isolated.Contains("FinalKey"))
            {
                fs = _isolated["FinalKey"].ToString();
            }

            string backContent = fs;
            UpdateTile("Final Score", backContent);
            NotifyComplete();
            return output;
        }
Example #3
0
        private static CompletedViewSchedule ConvertToFinalView(CompletedSchedule input)
        {
            var output = new CompletedViewSchedule
                             {
                                 Teams = String.Format("{0} vs {1}", input.HomeTeam, input.VisitingTeam),
                                 GameDateTime =
                                     string.Format("{0}", input.StartDateLocal.ToShortDateString()),
                                 FinalScores = input.FinalScores
                             };

            return output;
        }