Beispiel #1
0
        /// <summary />
        private void RefreshAndParse()
        {
            this.SetIsRefreshingData(true);
            try
            {
                Action <string> updateStatus = new Action <string>(
                    delegate(string value)
                {
                    this.Dispatcher.BeginInvoke(new Action <string>(delegate(string val)
                    {
                        this.ParsingStatusText = val;
                    }), value);
                });

                ProFootballReferenceParser parser = new ProFootballReferenceParser(updateStatus);
                parser.ParseSeason(YEAR, ref this.season);
                ReplacementValueCalculator replacement = new ReplacementValueCalculator();
                replacement.Calculate(this.season);

                if (this.subscribers != null)
                {
                    foreach (var subscriber in this.subscribers)
                    {
                        subscriber(this.season);
                    }
                }
            }
            finally
            {
                this.SetIsRefreshingData(false);
            }
        }
Beispiel #2
0
        private void WhenRefreshInjuryStatusClicked(object sender, RoutedEventArgs e)
        {
            ProFootballReferenceParser parser = new ProFootballReferenceParser(null);

            parser.UpdatePlayerInjuryStatus(YEAR, ref this.season, p => MarkedPlayers.IsMarked(p.Name));
        }