Пример #1
0
        private async Task PopulateData(DateTime day, Station station)
        {
            // test that 'station' is not null and throw an exception. 
            if (station == null)
            {
                throw new ArgumentNullException("station");
            }

            ChimetDataProvider dataDownloader = new ChimetDataProvider(station);

            var data = await dataDownloader.DownloadData(day);

            this.LineSeries_Average.ItemsSource = data.Select(record => new OxyPlot.DataPoint(OxyPlot.Axes.DateTimeAxis.ToDouble(record.Time), record.AverageWindSpeed)).ToArray();
            this.LineSeries_Gust.ItemsSource = data.Select(record => new OxyPlot.DataPoint(OxyPlot.Axes.DateTimeAxis.ToDouble(record.Time), record.MaximumWindSpeed)).ToArray();
        }
 public ChimetDataProvider(Station station)
 {
     this.Station = station;
 }